ADC in LPC2148 ARM7 Microcontroller Analog To Digital Converter
ADC in LPC2148 ARM7 Microcontroller Analog To Digital Converter
Converter
Microcontrollers are very useful especially when it comes to communicate with other devices,
such as sensors, motors, switches, memory and even other microcontroller. As we all know
many interface methods have been developed over years to solve complex problem of
balancing need of features, cost, size, power consumption, reliability etc. but ADC Analog-to-
Digital converter remains famous among all. Interfacing analog sensors using ADC is simple
and efficient technique to read data from sensor.
So in this case we can measure minimum 2.23 mV (Approx.) . This is how step size defines
an accuracy of ADC circuit.
Register
Function
Name
A/D Control Register: The ADCR register must be written to select the
ADCR
operating mode before A/D conversion can occurs.
A/D Global Data Register: This register contains ADC’s DONE bit and the
ADGDR
result of the most recent A/D conversion.
A/D Status Register: This register contains DONE and OVERRUN flag for all
ADSTAT
the A/D Channels, as well as the A/D interrupt flag.
A/D Global Start Register: This address can be written (in the AD0 address
ADGSR
range) to start conversions in both A/D converters simultaneously.
A/D Interrupt Enable Register: This register contains enable bits that allow
ADINTEN the DONE flag of each A/D channel to be included or excluded from
contributing to the generation of an A/D interrupt.
Example Project: In this example project we will be using 10K POT to provide analog input
at ADC Channel 0 i.e. Pin P0.28 of LPC2148 Microcontroller. To read ADC count from POT
we will configure UART0 of LPC2148 and read data on terminal emulator. When we vary
resistance of POT the change in ADC count will reflect on terminal in real time. The circuit
connection shown as: