Hi Guys
I have a code for dim 3 LEDs with 3 different brightness levels.I use timer interrupt to generate a steady PWM frequency.
What I want to do is I need to move these 3 brightness levels on PORTB Like original knight rider effect.
These are the brightness variables
The above is state1 in state 2 it must come like this
No need code just give me an idea.
I have a code for dim 3 LEDs with 3 different brightness levels.I use timer interrupt to generate a steady PWM frequency.
What I want to do is I need to move these 3 brightness levels on PORTB Like original knight rider effect.
These are the brightness variables
Code:
State1 movlw .10
movwf LED0 ;very dim
movlw .100
movwf LED1 ;medium bright
movlw .250
movwf LED2 ;full bright
The above is state1 in state 2 it must come like this
Code:
State2 movlw .00
movwf LED0 ;off
movlw .10
movwf LED1 ;very Dim
movlw .100
movwf LED2 ;medium bright
movlw .250
movwf LED3 ;full bright
No need code just give me an idea.
Last edited: