ADC Peripheral in Microcontrollers. Petr Cesak, Jan Fischer, Jaroslav Roztocil

Similar documents
Large Area, High Speed Photo-detectors Readout

Interfacing Analog to Digital Data Converters. A/D D/A Converter 1

Decade Counters Mod-5 counter: Decade Counter:

TV Synchronism Generation with PIC Microcontroller

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver

Converters: Analogue to Digital

Data Conversion and Lab (17.368) Fall Lecture Outline

A FOUR GAIN READOUT INTEGRATED CIRCUIT : FRIC 96_1

PICOSECOND TIMING USING FAST ANALOG SAMPLING

SMPTE-259M/DVB-ASI Scrambler/Controller

Microcontrollers and Interfacing week 7 exercises

Hello and welcome to this presentation of the STM32L4 Analog-to-Digital Converter block. It will cover the main features of this block, which is used

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

PHYS 3322 Modern Laboratory Methods I Digital Devices

MBI5050 Application Note

STA2051E VESPUCCI 32-BIT SINGLE CHIP BASEBAND CONTROLLER FOR GPS AND TELEMATIC APPLICATIONS 1 FEATURES. Figure 1. Packages

SDA 3302 Family. GHz PLL with I 2 C Bus and Four Chip Addresses

DP8212 DP8212M 8-Bit Input Output Port

16 Stage Bi-Directional LED Sequencer

nc... Freescale Semiconductor, I

Point System (for instructor and TA use only)

CLC011 Serial Digital Video Decoder

Triple RTD. On-board Digital Signal Processor. Linearization RTDs 20 Hz averaged outputs 16-bit precision comparator function.

Chapter 5 Flip-Flops and Related Devices

S6B CH SEGMENT DRIVER FOR DOT MATRIX LCD

PALCE26V12 Family. 28-Pin EE CMOS Versatile PAL Device DISTINCTIVE CHARACTERISTICS GENERAL DESCRIPTION FINAL COM L: H-7/10/15/20 IND: H-10/15/20

WINTER 15 EXAMINATION Model Answer

Chapter 2. Digital Circuits

ABOV SEMICONDUCTOR 11 SEGMENT X 7 GRID LED DRIVER WITH KEYSCAN MC2302. Data Sheet (Ver. 1.20)

GFT Channel Slave Generator

USE GAL DEVICES FOR NEW DESIGNS

ABOV SEMICONDUCTOR 10 SEGMENT X 7 GRID LED DRIVER WITH KEYSCAN MC2102. Data Sheet (Ver. 1.21)

MT8814AP. ISO-CMOS 8 x 12 Analog Switch Array. Features. -40 to 85 C. Description. Applications

OBSOLETE. CMOS 80 MHz Monolithic (18) Color Palette RAM-DACs ADV478/ADV471

AD9884A Evaluation Kit Documentation

AN-605 APPLICATION NOTE

Interfacing the TLC5510 Analog-to-Digital Converter to the

SignalTap Plus System Analyzer

CDK3402/CDK bit, 100/150MSPS, Triple Video DACs

Bell. Program of Study. Accelerated Digital Electronics. Dave Bell TJHSST

Digital Circuits I and II Nov. 17, 1999

64CH SEGMENT DRIVER FOR DOT MATRIX LCD

Digital Delay / Pulse Generator DG535 Digital delay and pulse generator (4-channel)

3 V/5 V, 450 μa 16-Bit, Sigma-Delta ADC AD7715

1 Watt, MHz, SMT Tunable Band Pass Filter (MINI-ERF ) 1.75 x 2.40 x 0.387

3-Channel 8-Bit D/A Converter

DT9857E. Key Features: Dynamic Signal Analyzer for Sound and Vibration Analysis Expandable to 64 Channels

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

MACH220-10/12/15/20. Lattice Semiconductor. High-Density EE CMOS Programmable Logic DISTINCTIVE CHARACTERISTICS GENERAL DESCRIPTION BLOCK DIAGRAM

ADC0804C, ADC BIT ANALOG-TO-DIGITAL CONVERTERS WITH DIFFERENTIAL INPUTS

Analog to Digital Conversion

HCF40193B PRESETTABLE UP/DOWN COUNTERS (DUAL CLOCK WITH RESET) BINARY TYPE

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

AN-822 APPLICATION NOTE

Section bit Analog-to-Digital Converter (ADC)

SWITCH: Microcontroller Touch-switch Design & Test (Part 2)

MACH130-15/20. Lattice/Vantis. High-Density EE CMOS Programmable Logic

High Performance TFT LCD Driver ICs for Large-Size Displays

Checkpoint 2 Video Interface

OBSOLETE FUNCTIONAL BLOCK DIAGRAM 256-COLOR/GAMMA PALETTE RAM. RED 256 x 10. GREEN 256 x 10 CONTROL REGISTERS PIXEL MASK REGISTER TEST REGISTERS MODE

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT /12/14 BIT 10 TO 105 MSPS ADC

3 V/5 V, CMOS, 500 A Signal Conditioning ADC AD7714

successive approximation register (SAR) Q digital estimate

DATASHEET HA457. Features. Applications. Ordering Information. Pinouts. 95MHz, Low Power, AV = 2, 8 x 8 Video Crosspoint Switch

3 V/5 V, CMOS, 500 A Signal Conditioning ADC AD7714

Name: Date: Suggested Reading Chapter 7, Digital Systems, Principals and Applications; Tocci

A 400MHz Direct Digital Synthesizer with the AD9912

RX40_V1_0 Measurement Report F.Faccio

Chapter 11 Sections 1 3 Dr. Iyad Jafar

3. Configuration and Testing

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

Using an IEEE Test Bus for Fault Diagnosis of Analog Parts of Electronic Embedded Systems. Zbigniew Czaja 1, Bogdan Bartosinski 2

Special Applications Modules

A MISSILE INSTRUMENTATION ENCODER

Logic Design Viva Question Bank Compiled By Channveer Patil

Combinational vs Sequential

Complete 14-Bit, 56 MSPS Imaging Signal Processor AD9941

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous)

THE NOISE PERFORMANCE OF EVALUATION BOARDS FOR A UNIVERSAL TRANSDUCER INTERFACE WITH USB CONNECTION

Generation and Measurement of Burst Digital Audio Signals with Audio Analyzer UPD

An Introduction to CY8C22x45

DT9837 Series. High Performance, USB Powered Modules for Sound & Vibration Analysis. Key Features:

Obsolete Product(s) - Obsolete Product(s)

Flip-Flops and Related Devices. Wen-Hung Liao, Ph.D. 4/11/2001

NS8050U MICROWIRE PLUSTM Interface

Static Timing Analysis for Nanometer Designs

Counter/timer 2 of the 83C552 microcontroller

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

HCF4054B 4 SEGMENT LIQUID CRYSTAL DISPLAY DRIVER WITH STROBED LATCH FUNCTION

GHz Sampling Design Challenge

Vorne Industries. 87/719 Analog Input Module User's Manual Industrial Drive Itasca, IL (630) Telefax (630)

HCF4027B DUAL J-K MASTER SLAVE FLIP-FLOP

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

FLIP-FLOPS AND RELATED DEVICES

MBI5152 Application Note

FEATURES DESCRIPTION APPLICATION BLOCK DIAGRAM. PT6311 VFD Driver/Controller IC

Embedded System Training Module ABLab Solutions

Keyboard Controlled Scoreboard

ECE 372 Microcontroller Design

Transcription:

ADC Peripheral in s Petr Cesak, Jan Fischer, Jaroslav Roztocil Czech Technical University in Prague, Faculty of Electrical Engineering Technicka 2, CZ-16627 Prague 6, Czech Republic Phone: +420-224 352 186, Fax: +420-233 339 929, Email: cesakp1 / fischer / roztocil @fel.cvut.cz Abstract- This paper presents an analog-to-digital converter (ADC) embedded as a in a microcontroller and influence of asynchronous digital input signals on results of ADC conversion. A schematic diagram of a SAR ADC analog input circuit in a microcontroller was described and its model was designed. A practical measurement was performed using crosstalk measurement setup and causes of measurement errors were identified. I. Introduction A microcontroller can be found in embedded systems where it very often interfaces analog and digital world by means of and analog-to-digital converter (ADC). Its function can be to measure an analog signal, process data and show results in case of an embedded measurement system. The ADC embedded as a in the microcontroller can be used for measuring the analog input signal. The ADC can be of various architectures. A successive-approximation-register ADC (SAR ADC) is a typical architecture of the ADC embedded as a in microcontrollers. An 8-bit, 10-bit or 12-bit SAR ADC with a conversion time about 2 µs and multiplexed inputs is usually available in microcontrollers. Also 16-bit or 24-bit ADCs are available (not SAR architecture, very often the sigma-delta architecture) but a long conversion time of these high-resolutions ADCs is only usable for DC signal measurement. There are many microcontroller manufacturers on the market; however, they offer very similar designs of their microcontrollers. The design is limited by a microcontroller package pin count; it leads to a situation when one pin is shared by two or even more s and also both digital and analog power supply is sometimes be shared. Basic s are counters, timers, and digital input/output. These s allow the microcontroller to control other components in the embedded system and enable measurements of digital signals (i.e. periodical time measurement). The microcontrollers with the ADC are mixed-signal systems-onchip (SoC) and in this paper it is shown that some digital switching noise can affects the ADC conversion results. This noise is measured and it is made a recommendation to reduce it. The inspiration comes from reference [1], [2], where the authors described digital switching noise. II. SAR ADC and microcontroller Analog-to-digital converters also, of course, exist as standalone integrated circuits and with those embedded as s in microcontrollers they have some common features. These features are independent on the manufacture an analog input circuit and a timing of SAR ADC, for instance. A. SAR ADC analog input circuit A typical schematic diagram of a SAR ADC analog input circuit in a microcontroller is shown in Figure 1. This schematic diagram was obtained from datasheet [3] and modified by information from datasheet [4]. The value of voltage V ADC is V DD /2 in case of an Atmel microcontroller [4]. The typical value of the pin capacitance C PIN is about 5 pf. The other parameters are very dependent on a manufacturer. The serial resistance can vary in the range from 1 kω to 100 kω in an Atmel microcontroller [4]. The value of sampling capacitance C ADC is 120 pf in a PIC microcontroller [3] or it is 14 pf in an Atmel microcontroller [4]. This capacitance is only connected to the input pin when a SAR ADC is sampling. The values of SAR ADC analog input circuit in a PIC microcontroller [3] are shown in Table 1.

V DD R IN R S S/H V IN C PIN I L C ADC V ADC SAR ADC Figure 1. Schematic diagram of SAR ADC analog input circuit in a microcontroller. Table 1. Component values of SAR ADC analog input circuit in a PIC microcontroller [3]. B. SAR ADC timing Symbol Description Typical value V IN Input source voltage - R IN Input source resistance - C PIN Pin capacitance 5 pf I L Leakage current ±500 na R S Serial resistance 8 kω C ADC Sample/Hold capacitance 120 pf The converter, either standalone or embedded, has to have a clock source for timing. The timing of a SAR ADC is common for any microcontroller and it is shown in Figure 2. The SAR ADC is clocked by ADC CLK which should be in the range specified by the manufacturer. This clock signal is typically derived from the CPU clock signal. It is required to use internal oscillator if the CPU clock is too slow. This internal oscillator is especially devoted to the SAR ADC and cannot be used by any other. A trigger (signal ADC START ) is required to get the sample from a selected analog input. Triggering can be done in software (by setting a bit in register) or by other sources, like external trigger (typically clocked by ADC CLK ) or internal timer overflow. When the ADC START signal is asserted the first rising edge of signal ADC CLK starts a sampling period (or falling edge it is depended on the architecture). During the sampling period a sampling capacitance C ADC (Figure 1) is connected to the selected analog input to be charged to a value given by the input voltage. This is represented by the signal ADC SH. The duration of this period can be extended to more than one period of the ADC CLK clock. At the end of the sampling period the capacitance C ADC is disconnected and the SAR ADC continues by a conversion. The conversion takes N cycles of ADC CLK clock (N corresponds to the ADC resolution in bits). The first cycle of the conversion is used to determine MSB value, the second cycle to determine MSB-1 value and it continues down to LSB value. After finishing the conversion the SAR ADC can immediately start a new sampling period (Free Running mode) or it waits for a next trigger. This operation is more described in [4]. CPU ADC CLK ADC START ADC SH STATE SAMPLE MSB MSB-1 LSB Figure 2. Typical timing of the SAR ADC circuit in a microcontroller.

III. Crosstalk measurement Typically, a SAR ADC does not use sampling circuitry as it is expected. The capacitance of a SAR ADC structure is used as part of sampling circuit represented in Figure 1 as the sampling capacitance C ADC. Typically, no input buffer is employed in a microcontroller ADC in order to reduce input channel capacitance. In this case, the value of the analog input source resistance R IN is important for a valid conversion. Some digital (logic) signals are often present in an embedded measurement system and they are connected to the microcontroller. The digital signals can be asynchronous with respect to the internal clocking from which the ADC is also clocked. Figure 3 shows a situation where one analog signal is connected to the input channel of the SAR ADC and another digital input signal is connected to a counter. It is expected that the result of an ADC conversion can be affected by crosstalk between the digital input signal and the analog one at the end of sampling period ADC SH (Figure 2). A. Crosstalk measurement setup The analog source V IN with serial impedance R IN is connected to the analog input channel labelled as pin 1 in Figure 3. The digital source V TLL with serial impedance R TTL is connected to the input pin labelled as pin 2 which is shared by an analog multiplexer input channel MUX and a counter. Pin 3 is configured as output port and it is generating a trigger pulse by software before a SAR ADC starts sampling. The trigger is required to synchronize internal clock of the microcontroller with clock of the digital source V TLL. The MCB2100 Evaluation Board with a microcontroller LPC2129 [5] was used. The LPC2129 has a 10-bit SAR ADC. V IN R IN Crosstalk MUX ADC Pin 2 R TTL V TTL Counter Trigger Pin 3 IO port PCB Figure 3. Crosstalk measurement setup. B. Crosstalk measurement results For the measurement a constant voltage V IN was selected (825 mv that corresponds to the ADC result 256). The digital source V TTL is a pulse generator with amplitude of 3.3 V and programmable delay, which is triggered by the microcontroller. The trigger has a jitter close to 33 ns because of the 30 MHz oscillator in the generator. The serial resistance R IN of the analog source is being changed to values 50 Ω, 180 Ω, 350 Ω and 610 Ω during the experiment. The serial resistance R TTL of digital source is constant and it is 50 Ω. The delay is programmable with step 2.3 ns and the zero value is selected as delay for which the crosstalk interference disappears. This should be close to the end of the sample period of the SAR ADC (see Figure 2). It can not be determined correctly because manufacturer's datasheet [5] does not contain enough information. The measurement is carried out so that the microcontroller captures 100 000 samples and calculates the mean value. Each sample takes 11 cycles of the SAR ADC clock which has frequency 1 MHz (it was divided from CPU clock which is 60 MHz). One cycle is used for sampling period (1 µs). The results of crosstalk measurement for various serial resistances R IN are shown in Figure 4 the top figure is for a rising edge, the bottom one is for a falling edge of digital signal.

257.8 257.6 257.4 257.2 Crosstalk measurement results for a rising edge of digital signal 50R 180R 350R 610R Mean value [LSB] 257 256.8 256.6 256.4 256.2 256 255.8-180 -160-140 -120-100 -80-60 -40-20 0 20 Delay [ns] 256.2 256 255.8 255.6 Crosstalk measurement results for a falling edge of digital signal 50R 180R 350R 610R Mean value [LSB] 255.4 255.2 255 254.8 254.6 254.4 254.2-180 -160-140 -120-100 -80-60 -40-20 0 20 Delay [ns] Figure 4. Crosstalk measurement for various serial resistances R IN. Analog input is kept at the level corresponding to 256 LSB. Mean value is calculated from 100 000 samples. Each sample takes 11 cycles at frequency 1 MHz. From the results, it can be concluded that if a serial resistance R IN of the analog source is 610 Ω then the falling edge of digital pulse changes a conversion result nearly by 2 LSB in the worst situation. This can cause a wrong reading. It is important the time when the edge occurs. C. Recommendation for asynchronous digital signals As it was explained and investigated in the previous paragraphs of the paper, asynchronous digital signal, which are connected to the microcontroller during a SAR ADC operation, can affects results of SAR ADC conversion. For such situations a gate, which disables the digital signal during sampling period of SAR ADC, can be used to prevent crosstalk, as it is shown in Figure 5. The gate can be controlled by any pin that has input/output capability. Because the triggering is controlled by a counter, the gate could also be controlled by another timer output that is configured to be active during the sampling period.

Analog signal Digital signal Crosstalk Pin 2 Pin 3 MUX Counter ADC Gate IO port PCB Figure 5. Recommended circuit diagram for asynchronous digital signal connected to a microcontroller. IV. Conclusions This paper presents an analog input circuitry and timing of a SAR ADC embedded as a in a microcontroller. The datasheets of microcontroller very often do not provide sufficient information on ADC. In a real embedded measurement system, asynchronous digital signals can be present. These signals can be connected to microcontroller and can affect readings of a SAR ADC conversion. This situation was studied in more details and this interference was measured. From the experimental measurement, a recommended circuit diagram was proposed. Further work in this field will be focused on other noise sources that can affect SAR ADC results pin sharing or power supply sharing, for instance. Also some test methods for a SAR ADC in microcontrollers should be developed because, typically, only a limited and small data memory is available, which excludes usage of standardized test methods [6], [7]. The ADC exponential stimulus histogram test [8] could solve this problem. References [1] Daniele Bonomi, Giorgio Boselli, Gabriella Trucco, and Valentino Liberali, Effects of Digital Switching Noise on Analog Voltage References in Mixed-Signal CMOS ICs, Proceedings of the 19th annual symposium on Integrated circuits and systems design, ISBN 1-59593-479-0, pp. 226-231, 2006. [2] Sonia Ben Dhia, Mohamed Ramdani and Etienne Sicard, EMC Test-chips, low-emission microcontrollers, Electromagnetic Compatibility of Integrated Circuits, ISBN 978-0-387-26601-5, pp. 311-394, 2006. [3] Microchip Technology Inc., PIC18F2480/2580/4480/4580 Data Sheet, 28/40/44-Pin Enhanced Flash s with ECAN Technology, 10-Bit A/D and nanowatt Technology, DS39637C, 2007. [4] Atmel Corporation, ATmega48/V, ATmega88/V, ATmega168/V, 8-bit AVR with 8K Bytes In-System Programmable Flash, 2545M AVR 09/07, 2007. [5] Philips Semiconductors (NXP Semiconductors), LPC2119/2129/2194/2292/2294 user manual, Single-chip 16/32-bit microcontrollers; 64/128/256 kb ISP/IAP flash with 10-bit ADC and CAN, 2004. [6] IEEE Std 1241-2000, IEEE standard for terminology and test methods for analog-to-digital converters, 2001. [7] IEEE Std 1057-2007, IEEE Standard for Digitizing Waveform Recorders, April 18 2008. [8] Linus Michaeli, Michal Sakmar, Jan Saliga, Some Errors of Analog Signal Sources for ADC Exponential Stimulus Histogram Test, 12th TC4 International Workshop on ADC Modelling and Testing, Iasi: CERMI Publishing House, ISBN 978-973-667-264-4, pp. 73-78, 2007.