Assuming you have to measure max 18 volts, then you will need a resistor devider by 4 which will yield 4,5 volts to the ADC input. Assuming you will use a 10 bits convertion then:
45000/1024 = 44 (rounded)
Your 16 leds graphs = $FFFF >>( 16- ((ADC * 44 * 16)/45000))
Cheers
Al.
Bookmarks