I was assigned to make 4 programs that will satisfy the asked outputs and is to be programmed on PIC. (sadly i wasn't able to attend our scheduled seminar regarding PIC programming due to time restraint. so i thought of coming here again and would like to ask for help. I'd be thankful if you could help me with my project.)
1.) Running Light that will turn on/off all leds
Given were 8 leds with a time delay.
Cycle 1: 1 2 3 4 5 6 7 8 = on
Cycle 2: 1 2 3 4 5 6 7 8 = off
2) Running light that will turn on/off led one at a time
Cycle 1: 1 = on | 2 3 4 5 6 7 8 = off
Cycle 2: 2 = on | 1 3 4 5 6 7 8 = off
Cycle 3: 3 = on | 1 2 4 5 6 7 8 = off
Cycle 4: 4 = on | 1 2 3 5 6 7 8 = off
so on and so forth...
3) Running light that will turn on odd turn off even leds and vice versa
Cycle 1: 1 3 5 7 = on | 2 4 6 8 = off
Cycle 2: 2 4 6 8 = on | 1 3 5 7 = off
4) This time running light that will turn on/off led one at a time AND THEN runs reversed
Cycle 1: 1 = on | 2 3 4 5 6 7 8 = off
Cycle 2: 2 = on | 1 3 4 5 6 7 8 = off
Cycle 3: 3 = on | 1 2 4 5 6 7 8 = off
Cycle 4: 4 = on | 1 2 3 5 6 7 8 = off
so on and so forth...
Cycle 9: 8 = on | 1 2 3 4 5 6 7 = off
Cycle 10: 7 = on | 1 2 3 4 5 6 8 = off
Cycle 11: 6 = on | 1 2 3 4 5 7 8 = off
Cycle 12: 5 = on | 1 2 3 4 6 7 8 = off
1.) Running Light that will turn on/off all leds
Given were 8 leds with a time delay.
Cycle 1: 1 2 3 4 5 6 7 8 = on
Cycle 2: 1 2 3 4 5 6 7 8 = off
2) Running light that will turn on/off led one at a time
Cycle 1: 1 = on | 2 3 4 5 6 7 8 = off
Cycle 2: 2 = on | 1 3 4 5 6 7 8 = off
Cycle 3: 3 = on | 1 2 4 5 6 7 8 = off
Cycle 4: 4 = on | 1 2 3 5 6 7 8 = off
so on and so forth...
3) Running light that will turn on odd turn off even leds and vice versa
Cycle 1: 1 3 5 7 = on | 2 4 6 8 = off
Cycle 2: 2 4 6 8 = on | 1 3 5 7 = off
4) This time running light that will turn on/off led one at a time AND THEN runs reversed
Cycle 1: 1 = on | 2 3 4 5 6 7 8 = off
Cycle 2: 2 = on | 1 3 4 5 6 7 8 = off
Cycle 3: 3 = on | 1 2 4 5 6 7 8 = off
Cycle 4: 4 = on | 1 2 3 5 6 7 8 = off
so on and so forth...
Cycle 9: 8 = on | 1 2 3 4 5 6 7 = off
Cycle 10: 7 = on | 1 2 3 4 5 6 8 = off
Cycle 11: 6 = on | 1 2 3 4 5 7 8 = off
Cycle 12: 5 = on | 1 2 3 4 6 7 8 = off