Still good to know, because as a default, GCBasic will try to initialize the a-d input pins to a digital output condition. That is not happening for the 16f84a or the 16f84 for that matter. Surprised this has not come up before.
The Port pins can be set as output/input individually like you have. Also, the whole port can be set by dir PortA out, or the TRISA = b'00000'.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi am new to the world of pic and have been trying to blink an LED for a while now and havent managed to do so with GCBASIC
The circuit i am using is http://www.voti.nl/blink/pics/b-84a-150.gif (without the D-plug)
When i use the HEX file supplyed with the Diagram it works fine, but when i use my code is does nothing...
my code is:
#chip 16F84A, 20
MAIN:
SET PORTA.0 high
Wait 1 s
SET PORTA.0 Low
Wait 1 s
goto MAIN
Any ideas that might help me resolve this?
Thanks
Dan
I have fixed the problem now i added
dir portA.0 out
thanks anyway
Still good to know, because as a default, GCBasic will try to initialize the a-d input pins to a digital output condition. That is not happening for the 16f84a or the 16f84 for that matter. Surprised this has not come up before.
The Port pins can be set as output/input individually like you have. Also, the whole port can be set by dir PortA out, or the TRISA = b'00000'.