-
Setting a pin twice
Is there something wrong with having this as code:
Code:
pause 500
low PortA.0
low PortA.1
pause 500
high PortA.0
low PortA.1
pause 500
low PortA.0
high PortA.1
When I run this code where a pin set to the same value twice (A.1 is set low twice) A.1 never goes high when it is supposed to. Does setting a pin to a value disable it?
-
I now seem to have a much deeper problem. The following code results in ONLY portA.1 being high:
Code:
DEFINE OSC 20
high PortA.0
high PortA.1
end
-
Alright, never mind. I switched to PortB instead of PortA and all is good. I guess I just have a PIC with a messed up PortA.
-
No! you have a PIC with 'features' on PORTA that must be disabled first!
-
*Reads datasheet*
Doh!
:)