Hi,

I can't get a 12F683 PIC to accept inputs. Here is an example of what I've tried.

'03.01.14

'Test 12F683

OSCCON = %01100000 'Internal 4MHz osc
ADCON0 = 0 'A/D off
CMCON0 = 0x07 'Comparators off
ANSEL = 0 'Set all digital
WPU = 0 'Internal pull-ups = off
OPTION_REG = %10000000 'Pull-ups = off, GPIO.2 = I/O, prescaler to Timer1
GPIO = %00000000 'All outputs = 0 on boot
TRISIO = %00100100 'GPIO,0
Config GP2 = Input
start:
If GP2 = 1 Then
GP5 = 1
Else
If GP2 = 0 Then
GP5 = 0
Endif
Endif
Goto start

End

At one time I had a TOGGLE LED to show it was working, and even though the program didn't work properly, did show a change when the input went high.

I copied the top part where is sets up, and have changed it a little!

Cheers, Camerart.