I will indeed try that out with a 1fF1825. Could you please clarify for me where I set the individual on/off values for each of the 8 LEDs? In my existing implementation (5 separate 12F683's) I have code like this:
Code:
' Changing the value for "Cycle" will change the time it takes
' to fade from 100% to 0% (or 0% to 100% if duty is increasing)
' Lower number = faster fade in/out
Cycle = 1
' Higher step value produces faster fade, but too high a value
' will introduce flicker
STEP_CNTR = 2
Main:
' Fade in
For Duty = 0 TO 255 step STEP_CNTR
PWM LED_0, Duty, Cycle
Next
' Stay on LGHTS_ON_MS
HIGH LED_0
Pause LGHTS_ON_MS
' Fade out
For Duty = 255 TO 0 STEP -STEP_CNTR
PWM LED_0, Duty, Cycle
Next
' Stay off for LGHTS_OFF_MS
Pause LGHTS_OFF_MS
' Fade in
For Duty = 0 TO 255 step STEP_CNTR
PWM LED_0, Duty, Cycle
Next
' Stay on LGHTS_ON_MS
HIGH LED_0
Pause (LGHTS_ON_MS - 200)
' Fade out
For Duty = 255 TO 0 STEP -STEP_CNTR
PWM LED_0, Duty, Cycle
Next
' Stay off for LGHTS_OFF_MS
Pause (LGHTS_OFF_MS + 100)
GOTO Main
(In actuality, I extend the fade in/stay on/fade out/stay off with various timings to randomize the effect. Old 1960's Christmas tree lights did not have constant blink rates).
Bookmarks