You are on page 1of 4

 Introduction to Analog To Digital Converter

 Specification of ADC
 ADC conversion Formula
 MSP430 ADC
 ADC Registers
 Interfacing LDR to MSP430

Analog to digital Converter


A real world signal such as light,sound etc are analog in nature.An ADC(Analog to digital Converter) is a
converter which converts this analog signal into digital signal. The input to the ADC is voltage and the
output is binary numbers. These binary numbers can be in different length - 2, 4, 8, 10-bit. The more bits
the binary number has, the higher the resolution of the - A/D.
Some controllers have an inbuilt ADC.An ADC enables us to interface:-
1) Light sensors
2) Pressure sensors
3) Temperature sensors
4) C02,C0 & other sensors

Specifications of ADC
1) Resolution
It is the most important parameter to be considered when selecting an ADC. This specifies how
accurately the ADC measures the analog input signals. Common ADCs are 8 bit, 10 bit and 12
bit. A 10bit ADC (210 = 1024 discrete analog levels) with a reference voltage of 5volts can measure
(5/1024 = 4.88mV) accurately. This means that any input voltage of 4.88mV will be easily detected
by ADC while the voltage less than that will not be read.

2) Reference Voltage
The reference voltage specifies the minimum and maximum voltage range of analog input.

3) ADC Channels
An ADC has several input channels. A sensor output is connected to this channel. ADC circuitry
includes a multiplexer which selects the required input channel.

4) Acquisition Time
Acquisition Time is the time that it takes for the ADC to acquire and convert an analog signal to a
digital value. Once acquisition time is over the input channel is disconnected from the source and
the conversions begin. The acquisition times depends on several factors like the source
impedance, Vdd of the system and temperature.

ADC Value To Voltage Conversion

The formula is given as

Resolution of the ADC ADC Reading


System Voltage Analog Voltage Measured

If ADC has a 10bit resolution,5V reference voltage,ADC value is 512,then

210 512
5 X

X = ( 512 * 5 )/1024 = 2.5Volts is the input voltage

MSP430G2553 ADC

MSP430G2553 has a 10bit,8-channel ADC. It is also called ADC10 core. Port 1 pins can also be used as
ADC pins.

Resolution = (3V )/210 = 2.93mV per step.

ADC Registers

 ADC10AE0
This register enables the specific GPIO pin/s as analog input.
 ADC10CTL0
This control register configures the ADC10 core.

Pin No. Name Description


0 ADC10SC Start conversion. ADC10SC is reset automatically
1 ENC Enable ADC conversion. ADC10SC and ENC may be set together
with one instruction.
2 ADC10IFG Interrupt flag.The bit is set when the conversion completes.
3 ADC10IE Interrupt Enable
4 ADC10ON ADC ON.
11-12 ADC10SHTx ADC sample and hold time
14 SREFx Select reference voltage.

 ADC10CTL1
This control register also configures the ADC10 core.

Pin No. Name Description


5-6-7 ADC10DIVx ADC clock divider
12-13-14-15 INCHx Selecting the input channel

 ADC10MEM
The ADC core converts an analog input to its 10-bit digital representation and stores the result in
the ADC10MEM register.

LDR

LDR stands for Light Dependent Resistor. It is also called cadmium sulfide (CdS) LDR. It is used in light
and darkness detectors circuits. The electrical resistance of an LDR varies with light. The resistance falls
with increasing light intensity.LUX is the unit of illuminance.
The sensitivity of a photodetector is the relationship between the light falling on the device and the
resulting output signal. The output signal in LDR is its resistance.

Connection
LDR is connected to a microcontroller using a voltage divider circuit.
The output voltage of the voltage divider circuit is given as

When light falls on the LDR, its resistance decreases. This increases the output voltage. This voltage can
be sensed by any of the ADC pins of MSP430G2553 controller.

You might also like