I want to have a row of 20 lights (LEDs maybe) and be able to turn on 3 of them in a row based on a number in my PIC (for arguments sake I'll saying using the ADC with a Pot).
I want it so when you turn the pot the three lights that are on move up and down the string of lights.
Does any one have any possible idea about how this could be done. I really can't think of any ideas at all. I obviously don't want to do a compare for every possible sequence of lights. Well not if I don't have to.
(edit): I'm using a PIC 16f877a, 4mhz crystal (irrelevant?), and programming in assembly. Probably the only thing that really matters is I'm using a Pic. Cheers.
I want it so when you turn the pot the three lights that are on move up and down the string of lights.
Does any one have any possible idea about how this could be done. I really can't think of any ideas at all. I obviously don't want to do a compare for every possible sequence of lights. Well not if I don't have to.
(edit): I'm using a PIC 16f877a, 4mhz crystal (irrelevant?), and programming in assembly. Probably the only thing that really matters is I'm using a Pic. Cheers.
Last edited: