Keil™, An ARM® Company

File Download Area

Philips LPC21xx A/D Example Program

This example program shows how to configure and use the A/D Converter of the following microcontrollers:

  • Philips LPC2114
  • Philips LPC2119
  • Philips LPC2124
  • Philips LPC2129
  • Philips LPC2131
  • Philips LPC2132
  • Philips LPC2138
  • Philips LPC2194

After configuring the A/D Converter, the program reads A/D channel 0 and outputs the converted value using the serial port.

To run this program...

  1. Select the Device (Project - Options for Target - Device)
  2. Build the project (Project - Build Target)
  3. Start the uVision Debugger
  4. Open the Serial Window (View - Serial Window 1)
  5. Click Run (F5)
  6. Click on the Toolbox buttons to change input voltages

A debug script (debug.ini) creates buttons that set different analog values in A/D channels. As the program runs, you will see the A/D input and output change.

Other buttons create signals that generate sine wave or sawtooth patterns as analog inputs. µVision3 users may enable the built-in Logic Analyzer to view, measure and compare these input signals graphically.

LPC21XX_ADC.ZIP (35K)
Thursday, April 21, 2005

Estimated File Download Time:
< 10 Seconds: 56Kb Modem
< 10 Seconds: 128Kb ISDN
< 10 Seconds: T1/Broadband