I'm using PIC12F675. I have problems with digital outputs. It seems, that they are dependent to eachother.
DEFINE OSC 4 ' 4MHZ
ADCON0 =0 ' No analog inputs
ANSEL = 0
VRCON = 0
TRISIO = %00000000 ' Only digital outputs
loop:
GPIO.0 = 1 'LED 0
Pause 1000
GPIO.2 = 1 'LED 2
Pause 1000
GPIO.1 = 1 'LED 1
PAUSE 1000
goto loop
end
The outcome of this code is following:
LED 0 turns on, pause,
LED 0 turns off and LED 2 turns on, pause,
LED 1 turns on, pause,
LED 1 turns off and LED 0 turns on.
etc.
LED 2 remains all the time switched on. It seems, that GPIO.2 is somehow independent, and GPIO.0 and GPIO.1 are dependent. Why is it so? What I'm doing wrong? As much as I've read about it, all digital outputs should be independent.
Kristjan
Bookmarks