I have 7 relays configured in binary fasion. They then represent 0-128 in digital.
I want to scan/read the state of the relays continuously light up a single LED to indicate the relative position on a 33 LED bargraph.
Example 1:
1) The relays that are ON represent say digital value of 128.
2) Light up only the 16th LED on the bargraph. This represents 100% of the output.
Example 2:
1) The relays that are ON represent say digital value of 64.
2) Light up only the 33rd LED on the bargraph. This represents approximately 50% of the output.
Example 3:
1) The relays that are ON represent say digital value of 5.
2) Light up only the 1st LED on the bargraph. This represents approximately 4% of the output.
Would like to use 16F628a or another better choice?
Since only one LED is lit, the current draw is limited to 10mA when turning ON any of the 33 LEDs.
Any suggestions?
Thanks for you help!
Russ![]()
Bookmarks