ee3954_fall13_10_adc

ee3954_fall13_10_adc - Microprocessors and Microcontrollers...

Info iconThis preview shows pages 1–16. Sign up to view the full content.

View Full Document Right Arrow Icon
ADC.1 Microprocessors and Microcontrollers Analog-to-Digital Conversion EE3954 by Maarten Uijt de Haag, Tim Bambeck
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ADC.2 PORTE RE0 RE1 RE2 RF3 RE4 RE5 RE6 RE7 PORTA RA0 RA1 RA2 RA3 RA4 RA5 RA6 RA7 Timer0 Timer1 Timer2 ADC CCPs Comparators Synchronous Serial Port USARTs Other Modules Parallel Slave Port LCD Drivers Voltage Reference Data EEPROM 8 Data Bus Figure 4-2 in the Reference Manual
Background image of page 2
ADC.3 Analog-to-Digital Conversion (ADC) Example PIC16F877 RA1/AN1 (ADC) Electric Circuit Microcontroller Transducer Signal Conditioner t x(t) Analog Signal
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ADC.4 Analog-to-Digital Conversion t v(t) Analog Signal k x [k] Digital Signal t v (t) Discrete-Amplitude Signal k x[k] Discrete-Time Signal
Background image of page 4
ADC.5 Digital-to-Analog Conversion (DAC) Example PIC16F877 DAC Microcontroller Transducer t x(t) Analog Signal k x’[k] Digital Signal PIC Microcontroller does NOT have a built-in DAC!!!
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ADC.6 ADC Comparator Basic Component : + _ Output, Vout Input signal, Vin Reference Voltage, Vref If Vin > Vref , Vout = 5VDC (Logic 1 ) If Vin Vref , Vout = 0VDC (Logic 0 )
Background image of page 6
ADC.7 ADC 1-bit Example 0V 5V 2.5V 1 0 Vin > 2.5V: Signal is 1 Vin 2.5V: 0 1-bit => 2 1 = 2 levels => 1 threshold
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ADC.8 ADC 2-bit Example 5.00 v 3.75 v 2.50 v 1.25 v 0.00 v 1.25 < Vin 2.50 V : Signal is 01 0.00 V ‹ Vin 1.25 V : 00 2.50 < Vin 3.75 V : 10 3.75 < Vin ‹ 5.00V : 11 5 v / 4 levels = 1.25 each increment (thresholds ) 2-bit => 2 2 = 4 levels => 3 thresholds
Background image of page 8
ADC.9 ADC 3-bit Example 3-bits => 2 3 = 8 levels => 7 thresholds (5v/8 = 0.625) 0.000 V 0.000V ‹ Vin 0.625V: Signal is 000 000 001 010 011 100 101 110 111 0.625 V 1.250 V 1.875 V 2.500 V 3.125 V 3.750 V 4.375 V 5.00 V 0.625V < Vin 1.250V: Signal is 001 1.250V < Vin 1.875V: Signal is 010 1.875V < Vin 2.500V: Signal is 011 2.500V < Vin 3.125V: Signal is 100 3.125V < Vin 3.750V: Signal is 101 3.750V < Vin 4.375V: Signal is 110 4.375V < Vin 5.00V: Signal is 111 A/D Converter Binary Output Input Voltage To A/D Converter
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ADC.10 ADC 3-bit Example Examples : Analog Input Voltage : 2.8756V -0.234V 4.9876V 1.1V 3.2V Examples : Digital Output : 100 000 111 001 101
Background image of page 10
ADC.11 ADC The PIC16F877 Microcontroller • 10-bits : – 2 10 = 1024 levels => 1023 thresholds – Resolution = 5V/1024 = 0.0048828125 V – Thresholds: • 0.0048828125 V • 0.009765625 V • 0.0146484375 V • Etc.
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ADC.12 ADC Implementation: Parallel-Encoded or Flash ADC Vref = 5V Vin Priority Encoder Digital Value out I 7 I 6 I 5 I 4 I 3 I 2 I 1 I 0 O 0 O 1 O 2 Example: 3-bit ADC 4.375V 3.125V 2.500V 1.875V 0.625V 1.250V 3.750V
Background image of page 12