1 / 16

Analog to Digital Converter(Atmega128)

Analog to Digital Converter(Atmega128). Analog to Digital Converter. Features 10-bit Resolution 13 - 260 μs Conversion Time 8 Multiplexed Single Ended Input Channels 7 Differential Input Channels 2 Differential Input Channels with Optional Gain of 10x and 200x

Télécharger la présentation

Analog to Digital Converter(Atmega128)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Analog to Digital Converter(Atmega128)

  2. Analog to Digital Converter • Features • 10-bit Resolution • 13 - 260 μs Conversion Time • 8 Multiplexed Single Ended Input Channels • 7 Differential Input Channels • 2 Differential Input Channels with Optional Gain of 10x and 200x • Optional Left Adjustment for ADC Result Readout • 0 - VCC ADC Input Voltage Range • Selectable 2.56 V ADC Reference Voltage • Free Running or Single Conversion Mode • Interrupt on ADC Conversion Complete

  3. ATmega128 ADC • 8채널 아날로그 입력은 PORT F를 통해 입력되며, Analog Multiplexer에 의해 A/D 변환기에 연결된다. • 변환 기간 동안 아날로그 입력전압을 일정하게 하는 Sample/Hold회로를 내장하고 있다. • 기준전압 VREF는 A/D 변환되는 전압의 범위를 나타내며, 단 극성 모드에서 VREF는 0x3FF로 변환된다. VREF는 AVCC, 내부 2.56V, 외부 AREF 단자에 공급되는 전압 중에서 선택 한다. • 단 극성인 경우 0~ VREF의 입력전압이 공급되어 x000~0x3FF(0~1023)의 디지털 값으로 변환되며, • 차동입력의 경우 차동 입력전압이 2의 보수 0x200~0x1FF(-512~511)로 변환된다. • 변환결과는 16비트 A/D변환기 데이터 레지스터에 좌측 또는 우측으로 정렬되어 저장

  4. Analog to Digital Converter Block Schematic

  5. ADC Prescaler

  6. ADC Conversion Time ADC Conversion Result • Single Ended Conversion • ADC = (Vin *1024) / VREF • Differential Channel Conversion • ADC = ((Vpos – VNEG) * Gain * 512) / VREF

  7. ADCMUX (ADC Multiplexer Selection Register) • ADC 기준전압(reference voltage) 선택 • ADC 변환 값 정렬 방법 지정 • ADC 입력채널 지정 • (ADCSRA)ADC Control and Status Register • ADC Enable/Disable • ADC Start Conversion • ADC Free Running Select • ADC Interrupt Flag • ADC Interrupt Enable/Disable • ADC ClockDivision Factor • ADCL, ADCH ( ADC Data Register) ATmega128 ADC 레지스터

  8. ADMUX - ADC Multiplexer Selection Register • A/D 변환기의 아날로그 입력채널 선택, A/D 변환의 기준 전압을 설정하거나 변환결과의 저장 형식을 지정 Register Description • Bit 7:6 – REFS1:0: Reference Selection Bits • ADC 기준 전압을 설정하는 비트, 만약 이 Bit(7:6) 값들이 ADC 변환 도중에 변경된다면, 그 변환이 끝난 이후부터 변경된 값이 적용된다.

  9. Bit 5 – ADLAR: ADC Left Adjust Result • A/D 변환결과를 ADCH:ADCL에 저장하는 형식을 지정 • 0:하위부터 10비트를 사용, 1: 상위부터 10비트를 사용 • Bits 4:0 – MUX4:0: Analog Channel and Gain Selection Bits Register Description

  10. Bits 4:0 – MUX4:0: Analog Channel and Gain Selection Bits

  11. Bits 4:0 – MUX4:0: Analog Channel and Gain Selection Bits (1)은 offset calibration에 사용 한다.

  12. Bit 7 – ADEN: ADC Enable • ADEN = 1 ; ADC Enables • ADEN = 0 ; ADC Disables • Bit 6 – ADSC: ADC Start Conversion • Single Conversion mode 일 경우 • ADSC에 1을 Write ; A/D 변환이 시작,변환완료 시 0로 Reset • ADSC에 0을 Write ; No effect • Free Running mode 일 경우 • ADSC에 1을 Write ; Start the first conversion ADC Control and Status Register A

  13. Bit 5 – ADFR: ADC Free Running Select • Bit 4 – ADIF: ADC Interrupt Flag • Bit 3 - ADIE: ADC Interrupt Enable • Bits 2:0 – ADPS2:0: ADC Prescaler Select Bits • XTAL frequency 과 ADC Input clock의 division factor ADC Control and Status Register A

  14. ADC Control and Status Register A • Bit 4 – ADIF: ADC Interrupt Flag • Bit 3 - ADIE: ADC Interrupt Enable • Bits 2:0 – ADPS2:0: ADC Prescaler Select Bits • XTAL frequency 과 ADC Input clock의 division factor

  15. ADC Register Right Adjusted Mode: ADLAR = 0 Left Adjusted Mode: ADLAR = 1

  16. ATmega128 ADC 프로그램 예 • cho_adc_basic_lcd참고 요

More Related