Menu

Binary on 12F675

Help
Keith
2016-09-01
2016-09-02
  • Keith

    Keith - 2016-09-01

    I am busy with some code on a 12F675 and I could do with some help please.

    The problem I have is in writing a binary output to the five available ports. In the past with the 16Fxxx's I have used: PortC = b'000011' and PortC = b'000001' etcetera but I don't seem to be able to write the same to the GPOI 0 to 5 (except GPIO3 which is Input only)

    Will this device use the same address format?

     

    Last edit: Keith 2016-09-01
    • Anobium

      Anobium - 2016-09-02

      Use GPIO for addressing the ports. Scanning the datasheet should show that GPIO is register name and not PORT.

      You may also revew all the regîsters and bits in the Great Cow BASÎC chip support file. Find 12f675.dat and you will the information regarding regsters and bits.

       
  • Keith

    Keith - 2016-09-02

    Thanks Evan, found what I was looking for. I am putting this out here for any another newbie who may be struggling getting to grips with coding.

    GPIO = b'000001' GPIO = b'000010' and so forth writes BCD data to the pins. . GPIO.0, GPIo.1 etc.

     
    • Anobium

      Anobium - 2016-09-02

      :-)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.