This is probably quite simple
My program (below) executes only once. Even if I remove power and re-apply, it won't execute again. What have I done wrong?
LED VAR BYTE
symbol config = $2007 'address of configuration register
PORTB = %00000000
TRISB = %1111100
poke config, %10000110100001 'Set pin #4 as Master Clear, use
'pullup resistor. Set oscillator as
'XT, use 4mHz quartz crystal.
again:
pause 30 'wait 3 seconds
for LED = 1 to 5
PORTB.0 = 1
PAUSE 63 'turn on LEDs for 63 milliseconds
PORTB.0 = 0
pause 63 'turn off LEDs for 63 milliseconds
next LED
PORTB.1 = 1
PAUSE 5000 'turn on sound for 5 seconds
PORTB.1 = 0
goto again ' for testing purposes only
Watchdog timer on PIC18F452
Sorry about that....I am using the PIC18F452 that came with the PICDEM2 board.
I started poking around in some of the files and came across "_WDT_OFF_2H" in a "__config" statement. That solved my problem.
Thanks for the help!