Hi all,
I am having problems getting GP3 to function as input only in a PIC10f202. Just for testing purposes I am trying to very simply blink and LED once per second on GP0 and throw in an extra pulse (pulse twice per second) when GP3 reads a low on input.
Here is my code:
Code:
trisio.3 = 0
loop:
high gpio.0
pause 100
low gpio.0
pause 500
if gpio.3 = 0 then
high gpio.0
pause 100
low gpio.0
endif
pause 500
goto loop
It is currently pulsing twice per second, and the chip ceases to work when I make GP3 low by pulling it down to ground.
I am using MPLAB IDE v7.11
Are there any obvious settings I have missed?
Bookmarks