PDA

View Full Version : pic12f683 being picky about pins...



erice1984
- 26th March 2009, 20:34
So I have this PIC12F683 played with it for hours now, finally got one pin to act on a switch. I tried moving the working setup to another pin, and change just that in PBPro but it doesnt work! I change it back, and flash the program, it works... ? what gives

========Working Version======
define OSC 4 'Set oscillator (clk) to 4MHz
GPIO = %000000 'Set High/Low
TRISIO = %100001 'Set Input/Output

symbol IND = gpio.4
symbol BUT = gpio.5

ISR:
while but = 1
low ind
pause 100
high ind
pause 100
wend
goto pp

PP:
low ind
pause 5
goto isr

NP:
high IND
pause 5
goto isr

only change in the 'broke' version is

symbol BUT = gpio.0

erice1984
- 26th March 2009, 23:16
figured it out, needed to add in the

ANSEL = %0110000