Presentation is loading. Please wait.

Presentation is loading. Please wait.

Kuliah Mikrokontroler AVR ADC AVR Eru©September 2009 PENS.

Similar presentations


Presentation on theme: "Kuliah Mikrokontroler AVR ADC AVR Eru©September 2009 PENS."— Presentation transcript:

1 Kuliah Mikrokontroler AVR ADC AVR Eru©September 2009 PENS

2 ADC 8 Channel ADC Multiplexed –8 Single-ended –2 Differential with Programmable Gain at 1x, 10x, or 200x 8/10 bit resolution Variable Clock Speed Various Reference Voltage Free/Controlled Running Polling/Interrupt EOC Noise Reduction

3

4

5 ADC Clock – clkADC The ADC is provided with a dedicated clock domain. This allows halting the CPU and I/O clocks in order to reduce noise generated by digital circuitry. This gives more accurate ADC conversion results.

6 Features 10-bit Resolution 0.5 LSB Integral Non-linearity ±2 LSB Absolute Accuracy 13 - 260 µs Conversion Time Up to 15 kSPS at Maximum Resolution 8 Multiplexed Single Ended Input Channels 7 Differential Input Channels 2 Differential Input Channels with Optional Gain of 10x and 200x(1) Optional Left adjustment for ADC Result Readout 0 - VCC ADC Input Voltage Range Selectable 2.56V ADC Reference Voltage Free Running or Single Conversion Mode ADC Start Conversion by Auto Triggering on Interrupt Sources Interrupt on ADC Conversion Complete Sleep Mode Noise Canceler Note: 1. The differential input channels are not tested for devices in PDIP Package. This feature is only guaranteed to work for devices in TQFP and QFN/MLF Packages

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21 ADC Conversion Result After the conversion is complete (ADIF is high), the conversion result can be found in the ADC Result Registers (ADCL, ADCH). For single ended conversion, the result is where VIN is the voltage on the selected input pin and VREF the selected voltage reference (see Table 22-3 on page 221 and Table 22-4 on page 222). 0x000 represents ground, and 0x3FF represents the selected reference voltage minus one LSB.

22 If differential channels are used, the result is where VPOS is the voltage on the positive input pin, VNEG the voltage on the negative input pin, GAIN the selected gain factor, and VREF the selected voltage reference. The result is presented in two’s complement form, from 0x200 (-512d) through 0x1FF (+511d). Note that if the user wants to perform a quick polarity check of the results, it is sufficient to read the MSB of the result (ADC9 in ADCH). If this bit is one, the result is negative, and if this bit is zero, the result is posi- tive. Figure 22-14 shows the decoding of the differential input range. Table 22-2 shows the resulting output codes if the differential input channel pair (ADCn - ADCm) is selected with a gain of GAIN and a reference voltage of VREF. ADC VIN 1024 ⋅ VREF -------------------------- = ADC VPOS VNEG – () GAIN 512 ⋅⋅ VREF ------------------------------------------------------------------------ =

23

24

25

26

27

28

29

30

31

32

33

34

35 Contoh Aplikasi

36

37

38

39


Download ppt "Kuliah Mikrokontroler AVR ADC AVR Eru©September 2009 PENS."

Similar presentations


Ads by Google