[ create a new paste ] login | about

Link: http://codepad.org/xDKP0jYu    [ raw code | fork ]

Plain Text, pasted on Mar 17:
1
2
3
4
5
6
7
Example:
ADMUX = 0xED (ADC3 - ADC2, 10× gain, 2.56V reference, left adjusted result)
Voltage on ADC3 is 300 mV, voltage on ADC2 is 500 mV.
ADCR = 512 × 10 × (300 - 500) / 2560 = -400 = 0x270
ADCL will thus read 0x00, and ADCH will read 0x9C.
Writing zero to ADLAR right adjusts the result: ADCL = 0x70, ADCH = 0x02.



Create a new paste based on this one


Comments: