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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
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.
Resolved in version 0.95 of Great Cow Basic.
Last edit: Anobium 2015-10-03
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.
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
Oops, my bad, I see what possibly happened there.
Hooray! That new chip file fixed it. Thanks guys!
Fixed: This is now permanently resolved in Great Cow Basic v0.95 September 2015 or later.