Basicly I have a Pic18F2431 Setup connected to 3 LEDs, I wrote a really simple program that should simple flash the LEDs. At First I thought that the Pic had simple locked up and wasent executing any code but after letting it sit For a few mins i noticed it had switched to the nexts sequence of LEDs, After observing it over several tens of minutes i now discouvered that it does what the code tells it to but at a super slow rate.
the 3 LEDs are On PORTA.0, PORTA.1, PORTA.2
;Setup procedures
@ __CONFIG _CONFIG1H, _OSC_IRCIO_1H
@ __CONFIG _CONFIG3H, _MCLRE_OFF_3H
DEFINE OSC 8
ANSEL0 = %00000000
TRISA = %11110000
TRISB = %10110011
TRISC = %11110000
PORTA = %00000000
PORTB = %00000000
PORTC = %00000000
;Pin assignments
Symbol LED1 = PORTA.0
Symbol LED2 = PORTA.1
Symbol LED3 = PORTA.2
main:
LED1 = 0
LED2 = 1
LED3 = 1
pause 500
LED1 = 1
LED2 = 0
LED3 = 0
pause 500
goto main
Bookmarks