ADC 1 Analog to Digital Converter. ADC 2 ADC Features n General Features -Supports 8 or 10-bit resolution Modes, -Track period fully programmable up to.

Slides:



Advertisements
Similar presentations
8086 [2] Ahad. Internal! External? 8086 vs _bit Data Bus 20_bit Address 8_bit Data Bus 20_bit Address Only external bus of 8088 is.
Advertisements

Dr. Rabie A. Ramadan Al-Azhar University Lecture 3
Mark Neil - Microprocessor Course 1 Device Drivers – Digital Voltmeter.
ECE 2211 Microprocessor and Interfacing Chapter 8 The 8088/8086 Microprocessors and their memory and I/O interfaces Br. Athaur Rahman Bin Najeeb Room.
Khaled A. Al-Utaibi 8086 Bus Design Khaled A. Al-Utaibi
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Sistemi Elettronici Programmabili13-1 MULTI OSC + CLOCK FILTER LVD POWER SUPPLY CONTROL 8 BIT CORE ALU PROGRAM MEMORY RAM I2CI2C PORT A SPI PORT B 16-BIT.
Instructor: Dr Aleksandar Milenkovic Lecture Notes
Analog Comparator Positive input chooses bet. PB2 and Bandgap Reference. Negative input chooses bet. PB3 and the 8 inputs of the A/D. ACME= Analog Comparator.
Oscilloscope Watch Teardown. Agenda History and General overview Hardware design: – Block diagram and general overview – Choice of the microcontroller.
SAM7 Hardware Considerations Frederic BOYER AT91 Support Group. Version 1.0 October 2006.
Introduction of Holtek HT-46 series MCU
1 Analog-to-Digital Converter (ADC). 2 ADC Features (1/3) ADC conversion rate 1 MHz and 12-bit resolution – 1µs conversion time at 56 MHz – 1.17µs conversion.
ECE 371 – Unit 15 Data Acquisition Systems A/Ds in MC9S12DPS56B Microcontroller.
Analog to Digital Converters (ADC)
HT46 A/D Type MCU Series Data Memory (Byte) Program Memory HT46R22 (OTP) HT46C22 (Mask) 2Kx Kx16 4Kx HT46R23 (OTP) HT46C23 (Mask) HT46R24.
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
BLDC MOTOR SPEED CONTROL USING EMBEDDED PROCESSOR
NS Training Hardware. System Controller Module.
DEEPAK.P MICROPROCESSORS AND APPLICATIONS Mr. DEEPAK P. Associate Professor ECE Department SNGCE 1.
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 Clock Generator.
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
ARM Timers.
System Clocks.
8086/8088 Hardware Specifications A Course in Microprocessor Electrical Engineering Dept. University of Indonesia.
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
Timers The timers of the PIC16C7X microcontroller can be briefly described in only one sentence. There are three completely independent timers/counters.
Clock Options and Sleep Modes. Clock Sources Flash Fuse bits can be programmed to choose one of the following Clock sources: 1. External RC Osc. f = 1/(3RC).
MICROPROCESSOR INPUT/OUTPUT
AT91 Embedded Peripherals
Digital to Analogue Converter
Lecture 13 A/D Converter & D/A Converter. Outline Basic Operation Single Scan Mode Continuous Scan Mode Group Scan Mode Interrupt Sources Registers D/A.
Gauge Operation and Software by Scott A. Ager. Computer Recommendations 750 MHz Pentium III 64 Meg SRAM 40 Gig Hard Drive 1024 x 768 graphics CD Writer.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
SIGMA-DELTA ADC SD16_A Sigma-Delta ADC Shruthi Sujendra.
Prepared by Eng. Musa Alyaman1 Chapter Seven Chapter Seven PIC16F87x.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
Features of the new Alibava firmware: 1. Universal for laboratory use (readout of stand-alone detector via USB interface) and for the telescope readout.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Module Introduction Purpose  This training module provides an overview of the analog interfaces.
IO Subsystem IV Ports and peripherals. IO Subsystem (1) All devices connected to the system buses, other than memory and CPU – Input and output ports.
AT91 Memory Interface. 2 Features –Up to 8 programmable chip select lines –Remap Command allows dynamic exception vectors –Glue-less for both 8-bit and.
1 ARM University Program Copyright © ARM Ltd 2013 Using Direct Memory Access to Improve Performance.
Interrupts  An interrupt is any service request that causes the CPU to stop its current execution stream and to execute an instruction stream that services.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.
Lecture 4 General-Purpose Input/Output NCHUEE 720A Lab Prof. Jichiang Tsai.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an introduction to the peripheral functions.
Analog to Digital Converter (ADC)
بسم الله الرحمن الرحيم MEMORY AND I/O.
AT91 Hardware and Power considerations. Power Supply considerations.
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 AD converter.
AT91 Power Management This training module describes the Power Management options provided by the AT91 family of microcontrollers. These options address.
Application Case Study Security Camera Controller
Workshop 3. Digital-to-analog and analog-to digital conversion
Analog Comparator An analog comparator is available on pins PE2(AIN0), PE3(AIN1) The comparator operates like any other comparator. -when (+) exceeds (-)
Microcontroller Applications
Programming Microcontroller ADC – Analog Digital Converter
Dr. Michael Nasief Lecture 2
RX 8-Bit Timer (TMR) 4/20/2011 Rev. 1.00
AT91 Memory Interface This training module describes the External Bus Interface (EBI), which generatesthe signals that control the access to the external.
ADC, DAC, and Sensor Interfacing
Lecture 13 A/D Converter & D/A Converter
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
MSP432™ MCUs Training Part 6: Analog Peripherals
AVR – ATmega103(ATMEL) Architecture & Summary
ANALOG TO DIGITAL CONVERTER (ATD).
Programmable Interval Timer
Presentation transcript:

ADC 1 Analog to Digital Converter

ADC 2 ADC Features n General Features -Supports 8 or 10-bit resolution Modes, -Track period fully programmable up to 17 ADC clock cycles, -10 ADC clock cycles for a 8 or 10-bit conversion, -Up to 8 Analog inputs. n Triggering Mode -Software Mode, -By using an internal Counter/Timer output, -By using a specific application signal via a dedicated pin. n Running Mode -Sleep Mode, -One shot on Mono-Channel, -One shot on Multi-Channel, -Continuous Mode in Mono or Multi-Channel by using external triggering. n Processor-less transfer capability -Peripheral Data Controller (PDC).

ADC 3 View of the external ADC Signals n Analog Inputs -4 Analog inputs (AD4 up to AD7), -4 multiplexed lines between Analog and PIO (AD0 up to AD3), n Dedicated external trig input through ADTRG, n External Voltage Reference input through ADVREF.

ADC 4 Hardware consideration n The ADC is powered on VDDIN power rail, n ADx Impedance requirements: With a programmable track period (T track ), up to 17 ADC Clock cycles, the user can drive ADC input with impedance up to: -Z OUT <=(T track - 470) x 10 in 8-bit Mode, -Z OUT <=(T track - 589) x 7.69 in 10-bit Mode, With: T Track expressed in ns, Z OUT expressed in Ohms.

ADC 5 How to start conversions ? ADC_CR (Control Register) START TIOA Channel 0 Rising edge on ADTRG pin TRGSEL Field ADC_MR (Mode Register) TRGEN TRGSEL TRGEN Bit 1 TIOA Channel 1 0 Software Trig Hardware Trig ADC Trig Input

ADC 6 How to valid Mono/Multi-Channel Conversion n After one start event, the ADC start -one analog to digital conversion on the enabled channel by the user via the ADC_CHER register => Mono-channel Conversion, -successive analog to digital conversions on the enabled channels by the user via the ADC_CHER register => Multi-channel Conversion, 0 CH [0 to 7] 7 ADC_CHER(Channel Enable Register)

ADC 7 Can I perform Continuous Conversions ? n With a continuous trigger source, the ADC will perform continuous conversions: -With the Timer/Counter as trigger source: As soon as AND As long as the Timer/Counter is triggered, conversions are started at defined sampling rate In Mono-channel mode, In Multi-channel mode. -With the dedicated trig input pin: As soon as AND As long as there are rising edge on the ADC’s trigger input pin, Free-conversion are started In Mono-channel mode, In Multi-channel mode.

ADC 8 Power-up, Reset and Sleep Mode n After a Power-up or a hardware or software reset, the ADC Clock is enabled at PMC level by default: -The ADC is in Sleep Mode: Low Power Mode, -Get out from the Sleep mode requires a Startup Time. The user will have to set the STARTUP field according to the data in electrical datasheet (20 µs min) ADC_MR (Mode Register) STARTUP Field n The SLEEP bit in ADC_MR Register -Enable the low power mode between each conversion (reduce current consumption from 1mA down to 1µA), -But, the ADC will start the next ADC conversion after the necessary wake up time defined in STARTUP field as after power-up or reset. 5 SLEEP

ADC 9 Software Reset bit: SWRST n It is possible to complete a reset at ADC level by using the dedicated SWRST bit in ADC Control register. n Set the SWRST bit act on: -The ADC registers will be set with their default values, -The ADC will be in SLEEP mode. ADC_CR (Control Register) SWRST 1 0

ADC 10 Set up the ADC in your Application Reset State Set up the ADC parameters Enable the required Channel n Initial State or Software Reset at ADC_CR register level n Set up the following parameters through the ADC_CR register - Track Period for the sampling, - Startup Time of the ADC, - Clock Frequency of the ADC, - Enable or Disable the Sleep Mode, - Select the 8 or 10-bit resolution Mode, - Select between Software or Hardware trigger sources, - Select the hardware source of the trigger (between Timer/Counter or external signal) n Use the ADC_CHER register in order to enable the channel required by the application. The ADC is now ready to start conversions

ADC 11 Read Method: Polling Mode n Polling Method -Firstly wait the read condition: EOC In mono-channel mode, read the respective End Of Conversion status bit according to the enabled Channel, In Multi-Channel mode, read the End Of Conversion status bit from the last converted channel. -Secondly read conversion result(s) In mono-channel mode, read the respective Channel Data Register or the Last Data Converter Register, In multi-channel mode, read the X results from each X Channel Data Registers according to the X enabled channels. ADC_LDCR ADC_CDR0 ADC_CDR7 ………… Contains the Last Converter Result A D AD0 AD7 … Each channel has its own result register

ADC 12 Read Method: Interrupt Mode ADC_SR (Status Register) EOC [0 to 7] n Interrupt Method after an End Of Conversion -An interrupt can be independently enabled for each EOC status bit ADC_IER (Interrupt Enable Register) EOC [0 to 7] n Method for application using multi-channel conversion: The EOC of the last converted channel should be used to start the read interrupt sub-routine in order to be sure the previous channel have been converted too.

ADC 13 Prevention about Overrunning n The user can be warn about overrunning -Do not read a data in a channel before the next conversion on the same channel will set the dedicated overrunning status bit in Status Register ADC_SR(Status Register) OVRE[0 to 7] 815 n Interrupt Capability -The user can enable an interrupt when one of OVRE Status bit rises ADC_IER(Interrupt Enable Register) OVRE[0 to 7] 815

ADC 14 Typical Result Read End Of Conversion (polling or interrupt method) Read the channel conversion result Read the dedicated overrun bit ADC_SR (Status Register) or 10-bit Conversion result Field 0 1 ADC_CDRx (Channel Data Register for the x channel) EOC0EOC1EOC OVR0OVR1OVR7 15 ADC_SR (Status Register) 8-bit Mode 10-bit Mode

ADC 15 Processor-less Transfer Capability n All previous running modes described are still possible with the processor in Idle Mode -ARM7TDMI ’s Clock stopped, -ADC results transfer from ADC to memory via PDC. n How to read PDC data buffer after a full transfer with -P valid channel, -N valid conversion

ADC 16 Memory Map of a PDC Data Buffer n Input data example: -2 enabled channels CH0 and CH1, -ADC set in 10-bit Conversion Mode, -PDC Counter set to 64 transfers for 32 targeted samples for each channel. x x + 1 CH0, data[0] CH1, data[1] CH0, data[2] CH1, data[3] CH1, data[63] x + 2 x + 3 x + 63 X is the Base Address of the PDC buffer Y is the Data Counter of the PDC n General rules to start this process -Set the ADC in 10-bit Mode set automatically the PDC in 16-bit transfer mode, -The PDC counter (Y in this example) shall be equal to [number of valid channels] x [number of samples by channel]. … 16-bit size n Result after completed transfer -Interleaving ADC results in PDC Memory Buffer

ADC 17 PDC Status and Interrupt n 2 Dedicated Status Bit for the ADC’s PDC ADC_SR(Status Register) ENDRXRXBUFF Both, Receive Counter Register and Receive Next Counter Register have a value of 0. The Receive Counter Register has reached 0 since the last write in Receive Counter register or Receive Next Counter register (when the application uses dual buffers). ADC_IER(Interrupt Enable Register) ENDRXRXBUFF n PDC ‘s events can act on the system via dedicated interrupt

ADC 18 Last Converter Data Register and PDC New Result in ADC_LCDR set the DRDY Status bit ADC_SR(Status Register) GOVRE ADC_SR(Status Register) DRDY Two successive results in ADC_LCDR without previous read set the GOVRE Status Bit A D ADC_LCDR A D 2 successive conversions without any previous ADC_LCDR read by the PDC n The PDC uses the Last Converter Data Register to transfer Converter result to the PDC ’s RAM buffer. n The user can be warned after any overrun case when the PDC is running

ADC 19 Timing: Why, Compute, Constraint Necessary ADC Startup Time Track periodConvertion Time Depends on intrinsic ADC characteristic Depends on the highest user’s driver impedance connected on ADC’s input ADC_MR (Mode Register) 1620 STARTUP Field SHTIM Field PRESCALER Field In all cases, must be the lowest time with the SLEEP Mode enabled 8(STARTUP+1)/ADCClock (SHTIM+1)/ADCClock MCK/(2(PRESCALER+1)) Min. = 20 µs Z OUT <=(T track - 470) x 10 (in 8-bit Mode), Z OUT <=(T track - 589) x 7.69 (in 10-bit Mode), Z OUT <=(T track - 470) x 10 (in 8-bit Mode), Z OUT <=(T track - 589) x 7.69 (in 10-bit Mode), ADC Clock cannot be upper than 5 MHz

ADC 20 Current Consumption Consideration - After a power-up, a reset and before the first conversion, - Or, between conversion processes with the SLEEP mode enabled. - In convertion process, - Or, between conversion processes with the SLEEP Mode disabled. 1 µA 1 mA n The ADC is an analog Cell: Continuous bias currents are major current consumption. The lowest conversion time between the SLEEP Mode State results in the lowest current consumption average.