Menu

PIC16F946 pin direction error message.

2015-03-16
2015-10-03
  • Nathan Macdonald

    I am using the PIC16F946 with GCbasic (noting that it is on the supported chips list http://gcbasic.sourceforge.net/chips.html) and when I attempt to use RG5 as an output I get the following error:

     Main Board RG5 test.gcb (13): Warning: Pin PORTG.5 cannot be used as an output
    
     The message has been logged to the file Errors.txt.
    

    This error message seems incorrect however as noted in Microchips documentation http://ww1.microchip.com/downloads/en/DeviceDoc/41265A.pdf (on pages 10 and 69) RG5 is noted as a general purpose I/O pin and no mention is made that RG5 can only be used as an input.

    The GCbasic test code is literally as simple as follows:
    'Main Board, 3/16/2015
    #chip 16F946
    DIR PORTG.5 Out

    So why in the world does the compiler think that RG5 cannot be used as a general purpose I/O pin?? I have been very impressed with GCbasic for quite some time and this is the first time I have encountered an error like this.

     
    • Anobium

      Anobium - 2015-10-03

      Resolved in version 0.95 of Great Cow Basic.

       

      Last edit: Anobium 2015-10-03
  • kent_twt4

    kent_twt4 - 2015-03-16

    It is a malformed 16f946.dat file from the GreatCowBasic/chipdata folder (i.e. there is no PortG register defined). No help from here on fix. Workaround would be not use PortG until fix arrives. I have used the 16f917 successfully with GCB.

     
  • Anobium

    Anobium - 2015-03-16

    Please test this file. This is from the latest build plus a mod to the portg.5.

    Please test and let us know the results.

     

    Last edit: Anobium 2015-03-16
  • kent_twt4

    kent_twt4 - 2015-03-16

    Oops, my bad, I see what possibly happened there.

     
  • Nathan Macdonald

    Hooray! That new chip file fixed it. Thanks guys!

     
  • Anobium

    Anobium - 2015-09-24

    Fixed: This is now permanently resolved in Great Cow Basic v0.95 September 2015 or later.

     

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.