ADC Interfacing Tutorial for LPC21xx - ARM7
- Posted by admin
- on Jan, 29, 2013
- in ADC Interfacing, Analog Designs, ARM Microcontroller, ARM7, Interfacing Tutorial, LPC21xx, NXP
- Blog 1 Comment.
Reference : Document UM10139 Chapter 19
Purpose:
To learn, How to enable & use the inbuilt ADC module of LPC21xx ??? Display the current digital value of analog signal on channel 3 of ADC0 onto an alphanumeric LCD.
Notes:
- LPC2148 has two inbuilt ADC modules, ADC0 & ADC1.
- Each ADC is of 10 bit resolution, using Successive approximation conversion technique.
- ADC0 has 6 channels and ADC1 has 8 channels. (14 analog Channels)
- Supports maximum clock at 4.5 MHz.
- Lots of registers are there associated to ADC, but i am going to tell you only important ones here, any time you can refer UM10139, chapter 19 for more details of ADC’s special function registers.
- The register we must know about is, ADC Control register (AD0CR or AD1CR) & ADGDR (ADC Global data register)

Go through all the bit description above, see how many opearating modes are there, How to configure the clock to ADC.
Look carefully to bits 6:15 and 31 of ADGDR register.
Code snippet from adc.c
Download fully commented source code below.
Comments & Responses
Recent Posts
- Product Review: OKI78SR-5/1.5 Switching Regulator from muRata Power Solutions
- Product Review - STM8S- Discovery by ST Microelectronics
- Know How : Using GSM Modem - Part 2/2
- Know How : Using GSM Modem - Part 1/2
- ST Microelectronics launches STM32 Nucleo Series
- SW18020P Vibration Switch Testing “Shake Switch”
- TCM8230MD Camera Breakout Board PCB, Can also mount AT45DB Series Flash Memory Chip
- IC Packages of Many Kinds - A comprehensive list
- Keil project setup for STM32F4 Discovery
- DIY - 12V 7.2Ah SMF Battery Charger Circuit
- Lonely Night Projects : DIY PMMC and Series Motor Model
- Toys from Trash with Arvind Gupta
- BodyCom Technology by Microchip for Embedded Security & Authentication
- Programmers for Atmel AVR Microcontrollers
- Nikola Tesla - The Greatest Inventor Ever Lived
- Crystal, Resonator and Oscillators, what’s the difference ?
- Pitfalls in STM32 Standard Peripheral Library & Possible Solutions
- Interrupt Driven UART Serial Communication for Atmel AVR
- DIY PICkit2
- What Thomas Edison expected job candidates to know !
- What does ‘AVR’ stands for ?
- Interfacing MCP4725, 12 bit DAC with AVR Microcontroller #avrPrayog
- Interfacing AT93C46 SPI EEPROM with avrPrayog
- How to recover the Unallocated space on Your SD card due to Raspberry Pi OS
- Driving an Alphanumeric LCD with avrPrayog
- Using Arduino/Freeduino as AVR ICSP Programmer
- DoCircuits : Turn your Web Browser into Prototyping Desk
- Running .NET Micro Framework on STM32F4 Discovery Board
- Getting Started with STM32F4 Discovery board
- World’s best Open Source Hardware Projects
Things You find here
- ADC Interfacing (1)
- Analog Design (3)
- Analog Designs (6)
- Arduino (7)
- ARM Microcontroller (11)
- ARM7 (5)
- Atmel AVR (8)
- Battery Chargers (2)
- Camera Interfacing (1)
- Display (1)
- EAGLE (2)
- EEPROM (2)
- Electrical Enginnering (4)
- Electronics (25)
- General Interest (12)
- General Know How (24)
- GSM Modem (2)
- Hello World (4)
- I2C (2)
- Interfacing Tutorial (13)
- Lonely Night Projects (4)
- LPC21xx (4)
- Make (2)
- mbed (1)
- Microchip (1)
- Microchip PIC (1)
- NXP (4)
- Open Source Ecology (2)
- Open Source Hardware (8)
- PCB Designing (1)
- Physical Computing (5)
- PIC Related (1)
- Power Supply (4)
- Product Review (1)
- Raspberry PI (1)
- Repair Tricks (2)
- SPI (1)
- ST Micro (7)
- STM32 (7)
- STM32F4 Doscovery (7)
- stm8 bit (1)
- Switch Mode Power supply (1)
- Technology (2)
- UART (2)
- Uncategorized (1)
Recently Said
- Akshay Gulati on I2C EEPROM Interfacing with STM32F4 Discovery
- Sarath V on How to recover the Unallocated space on Your SD card due to Raspberry Pi OS
- mohamed on DIY - 12V 7.2Ah SMF Battery Charger Circuit
- KOUROSH on Free PCBs
- Byron on Keil project setup for STM32F4 Discovery
- Bojan on Crystal, Resonator and Oscillators, what’s the difference ?
- Helmut on I2C EEPROM Interfacing with STM32F4 Discovery
- hayouta on I2C EEPROM Interfacing with STM32F4 Discovery
- kevin on How to recover the Unallocated space on Your SD card due to Raspberry Pi OS
- Jon on Keil project setup for STM32F4 Discovery

simply superb