Hello
I can get the following code to work correctly with an 18F877A on the X-1 board. Then I load the same code into an 18F876A and the light won't blink. I am taking power and ground from the X-1 board to pins on the back of a 28-pin adapter to test the 876A.
Can I use the 28-pin adapter for testing purposes? Is there something I am missing that is different between the 877A and the 876A? I have tested the LED so I know its not burnt out. Also I have tried three 876A PICS. Any input appreciated. Also I am learning how to set registers. Please advise concerning ADCON1, CMCON etc assuming commented input/output signals for each pin
Thanks
Toby
include "bs2defs.bas"
ADCON1=%00000111 'Turn off PortA A/D's
CMCON=%00000111 'Turn off Port A Comparator
OPTION_REG.7=0 'Enable Pull-Ups for BCD
TRISA = %111110 ' Port A0=LED PortA1-5=Digital Inputs
TRISB=$FF 'Port B Input for BCD
Light Var PortA.0
Flasher VAR byte
Flasher = 0
repeat
GOSUB ON_Off
Flasher = Flasher + 1
UNTIL Flasher = 2
On_Off:
HIGH Light
PAUSE 500
LOW Light
PAUSE 500
RETURN
Bookmarks