??? 04/23/06 03:47 Read: times |
#114773 - Not quite! Responding to: ???'s previous message |
The output of the adc in the binary value in relation to its reference voltage. For the adc0808 your reference might be 5V. If you put 5V input the input (it won't like 6v!) it will give you a value of 11111111 (0xff) or 255 decimal. For 2.5v it will give you a value of 01111111 (0x7f) or 127 decimal. So each number represents a value of 5V/256 = 19.5mV. So for your example value of 155 decimal this would equate to a value of 155/256 * 5 = 3.02volts (assuming a reference voltage of 5v).
If we compare this to something like the icl7106 as used in many 3 1/2 digit multimeters, it uses a 200mV reference and it converts in bcd. If you want to measure voltages greater than the acceptable input voltage of you adc, you need a voltage divider composed of two resistors to break down the voltage to a lower value. So to display a representative voltage from your micro, you need to do some maths to scale the adc value to what you need. |
Topic | Author | Date |
Adc output | 01/01/70 00:00 | |
Back to basics | 01/01/70 00:00 | |
binary | 01/01/70 00:00 | |
Not quite! | 01/01/70 00:00 | |
A bad tip that works | 01/01/70 00:00 | |
bad? I'd say elegant | 01/01/70 00:00 | |
4.096 | 01/01/70 00:00 | |
It's an 8-bit converter | 01/01/70 00:00 | |
I know | 01/01/70 00:00 | |
2.56![]() | 01/01/70 00:00 |