Pondicherry Engineering College

Slides:



Advertisements
Similar presentations
Analog to digital converter
Advertisements

Analog-to-Digital Converter (ADC) And
8253/54 Timer Section /54 Timer Description and Initialization
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.
Digital to Analogue Conversion Chapter 13. Why is conversion needed? Most signals in the world are analogue. Microprocessors and most computers computers.
Lecture 11 Digital-to-Analog Converters and Analog Comparators.
Analog to Digital Conversion. 12 bit vs 16 bit A/D Card Input Volts = A/D 12 bit 2 12 = Volts = Volts = 2048 −10 Volts = 0 Input Volts.
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.
Slides created by: Professor Ian G. Harris Inputs and Outputs PIC Vcc RA3 RA4 RA5  Make an LED toggle state when button is pressed  Need to read RA3,
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.
EET260: A/D and D/A converters
Railway Foundation Electronic, Electrical and Processor Engineering.
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
Railway Foundation Electronic, Electrical and Processor Engineering.
Engineering 4862 Microprocessors Lecture 26 Cheng Li EN-4012
Lecture 9 Timer Operations and Programming. 2  Introduction  Summary of timers  Timer programming sequence  Summary of timer SFRs  Timer 0: 8-bit.
Serial Peripheral Interface (SPI) Bus. SPI Bus There is no official specification for the SPI bus. It is necessary to consult the data sheets of the devices.
DEEPAK.P MICROPROCESSORS AND APPLICATIONS Mr. DEEPAK P. Associate Professor ECE Department SNGCE 1.
Data Converters ELEC 330 Digital Systems Engineering Dr. Ron Hayne
Lecture 9. - Synchronous Devices require a timing signal. Clock generated Interval Timer Microprocessor Interval Timer Clk PCLK = MHz PCLK (for.
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 Clock Generator.
PIT: Programmable Interval Timer
System Clocks.
LPC2148 Programming Using BLUEBOARD
8254 SOFTWARE PROGRAMMABLE TIMER/COUNTER
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Microcontroller & Embedded System Subject Code : 6871 Semester : 7th Department.
Digital to Analogue Converter
SIGMA-DELTA ADC SD16_A Sigma-Delta ADC Shruthi Sujendra.
ADVANCED DIGITAL STETHOSCOPE PHASE I SECOND REVIEW BY E.MURUGA LAKSHMI (ROLL NO:12) Project Guide: Dr. E.JANARTHANAN Department of ECE.
1 LHO 13 The 8051CF020 and the University Daughter Card.
1 © Unitec New Zealand Interrupt Lecture 6 Date: - 20 Sept, 2011 Embedded Hardware ETEC 6416.
The Silicon Laboratories C8051F020
8254 Timer.
Analog Capture- Port E. Digital to Analog and Analog to Digital Conversion D/A or DAC and A/D or ADC.
By James Cockrell and Justin Loveless
ECE 2799 Electrical and Computer Engineering Design ANALOG to DIGITAL CONVERSION Prof. Bitar Last Update:
Embedded Systems Design 1 Lecture Set C Interfacing the MCS-51 to: –D/A Converter –A/D Converter.
Analog to Digital Conversion - ADC Mark Neil - Microprocessor Course 1 Device Drivers – Measuring Voltages.
0808/0809 ADC. Block Diagram ADC ADC0808/ADC Bit μP Compatible A/D Converters with 8-Channel Multiplexer The 8-bit A/D converter uses successive.
EKT 314/4 WEEK 9 : CHAPTER 4 DATA ACQUISITION AND CONVERSION ELECTRONIC INSTRUMENTATION.
1 Lab 4: D/A Converter Lab 4: D/A Converter This is a simple resistive network for a D/A converter Port 1, Port 0 are digital inputs ==> 00 (minimum),
Interfacing Touch screen via lpc21xx Resistive touch screens can be a great way to enable complex user input in your projects inexpensively and with a.
Electronic Devices and Circuit Theory
 The LPC2xxx devices currently have two on- chip UARTS.  Except UART1 has additional modem support.
 Mini-Computer ◦ Microprocessor  The Brains  Arithmetic Logic Unit (ALU)  Control Unit  Program/ Data Storage  Peripherals (Input/Output)  Low-Cost.
Digital-to-Analog Analog-to-Digital
The 8085 Microprocessor Architecture
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 (-)
Homework Reading Machine Projects Labs
Chapter 13 Linear-Digital ICs
NS Training Hardware.
The 8085 Microprocessor Architecture
Programming Microcontroller ADC – Analog Digital Converter
RX 8-Bit Timer (TMR) 4/20/2011 Rev. 1.00
Digital-to-Analog Analog-to-Digital
How to use peripherals on MCB1700
Introduction to Microprocessors and Microcontrollers
Chapter 7 Features and Interfacing of Programmable Devices for 8085 based systems.
Engineering 4862 Microprocessors Lecture 25
Simple ADC structures.
Simple ADC structures.
Programmable Interval timer 8253 / 8254
PIC18F458 Analog-to-Digital
Programmable Interval timer 8253 / 8254
Programmable Peripheral Interface
MSP432™ MCUs Training Part 6: Analog Peripherals
The 8085 Microprocessor Architecture
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
Presentation transcript:

Pondicherry Engineering College LPC2148 – ADC & DAC Dr.R.Sundaramurthy Department of EIE Pondicherry Engineering College sundar@pec.edu

ADC Two , 10 bit successive approximation ADCs ADC0 & ADC1 ADC0 = 6 Channels ADC1 = 8 Channels Total = 14 channels Measurement range 0 V to VREF (3.3V) 10 bit conversion time ≥ 2.44 μs Optional conversion on transition on input pin or Timer Match signal Burst conversion mode for single or multiple inputs

PLL VPBDIV = 0x00000001;

Pins Involved ADC0 ADC0.1 [Pin 13] P0.28 ADC0.2 [Pin 14] P0.29 pot ADC1 ADC1.0 [Pin 30] P0.6 ADC1.1 [Pin 33] P0.8 ADC1.2 [Pin 35] P0.10 ADC1.3 [Pin 38] P0.12 ADC1.4 [Pin 39] P0.13 ADC1.5 [Pin 45] P0.15 ADC1.6 [Pin 1] P0.21 ADC1.7 [Pin 2] P0.22

ADC POT connected to AD1.7

SFRs Involved VLSI Peripheral Bus Divider - VPBDIV P0 Pin Select Register - PINSEL1 ADC Control Register - ADCR ADC Data Register - ADDR

Pin Select SFRs PINSEL0 for GPIO pins 0.0 to 0.15 Each Pin is Associated with multiple functions Pin Select enable you to select which pin functions you would like to use

How to Use PINSEL PINSEL1 = PINSEL1|0x00001000; Each associated 'pin' in PINSEL is assigned a 2-bit address. PINSEL1 = PINSEL1|0x00001000;

ADC Control Register - ADCR

SEL 1 Channel - 7 This set of 8 bits corresponds to the 8 different 'channels' available on either A/D converter. You can indicate which channel you wish to use by setting it's appropriate bit to '1‘

CLKDIV The A/D Converters on the LPC2148 are able to run at a maximum speed of 4.5MHz. The conversion speed is selectable by the user To arrive at a number equal to or less than 4.5MHz, we need to 'divide' our PCLK (the speed at which our microprocessor is running) by a fixed number, which we provide (in binary format) using the 8 CLKDIV bits. In order to avoid a 'divide by 0' error, though, the A/D control register will add one to whatever value you supply. Pclk = 60 MHz, Div = 60/4.5 = 14  14-1 = 13 1

Burst Set this to 1 for doing repeated conversions. Set this bit to 0 for software controlled conversions , which take 11 clocks to finish. Here is a remark from datasheet : START bits must be set to 000 when BURST=1 or conversions will not start. Refer datasheet for detailed info. 10 Bit ADC

CLKS Used to Set Resolution of ADC 10 Bit ADC

PDN  ADC ON/OFF Used to Set whether the ADC is in Power Down Mode (Off) or Involved in data conversion (ON) 1 Turn ON ADC

ADC1 Control Register 0 0 2 1 0 D 8 0; 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 START PDN CLKS BURST CLKDIV SEL 1 0 0 2 1 0 D 8 0;

Starting the Conversion Bits (26:24) = 001

AD1GDR – ADC1 Global Data Register

Check End of Conversion Bit 31 = Done Bit While(AD1GDR & (0x01 << 31) == 0) ;

Unsigned int AcquireADC();

pinselect

End of Session sundar@pec.edu