Dwayne,
The LEDs do not appear to be 'fading out' - in fact, they appear to be steady on. Here's the code exactly as it's compiled:
LEDs VAR BYTE
Counter VAR BYTE
Counter2 VAR BYTE
Counter3 VAR BYTE
LEDs = 3 'Light RB0 & RB1 pins
TRISB = 0 'Initialize all pins on PORTB to output
Loop:
For Counter = 255 TO 0 STEP -1
For Counter2 = 0 TO 255
For Counter3 = 0 TO 255
PORTB = LEDs
Pause Counter 'wait a while
PORTB = 0
Next Counter3
Next Counter2
Next Counter
Pause 3000
GoTo Loop
I think part of the problem is that there is no pause after going low, so they never appear to be off. I don't understand why it doesn't finish the 3 loops and exit with the LEDs off, wait 3 seconds, and then start again?
Bookmarks