Rainbow-electronics ATtiny26L Instrukcja Użytkownika Strona 83

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 151
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 82
83
ATtiny26(L)
1477BAVR04/02
Figure 51. Differential Measurement Range
Example:
ADMUX = 0xEB (ADC0 - ADC1, 20x gain, 2.56V reference, left adjusted result)
Voltage on ADC0 is 400 mV, voltage on ADC1 is 300 mV.
ADCR = 1024 * 20 * (400 - 300) / 2560 = 800 = 0x320
ADCL will thus read 0x00, and ADCH will read 0xC8. Writing zero to ADLAR right
adjusts the result: ADCL = 0x20, ADCH = 0x03.
Table 35. Correlation Between Input Voltage and Output Codes
V
ADCn
Read code Corresponding decimal value
V
ADCm
+ V
REF
/GAIN 0x3FF 1023
V
ADCm
+ 0.999 V
REF
/GAIN 0x3FF 1023
V
ADCm
+ 0.998 V
REF
/GAIN 0x3FE 1022
... ... ...
V
ADCm
+ 0.001 V
REF
/GAIN 0x001 1
V
ADCm
0x000 0
0
Output Code
0x3FF
0x000
V
REF
/GAIN
Differential Input
Voltage (Volts)
Przeglądanie stron 82
1 2 ... 78 79 80 81 82 83 84 85 86 87 88 ... 150 151

Komentarze do niniejszej Instrukcji

Brak uwag