User manual

LPCXpresso Experiment Kit - User’s Guide
Page 54
Copyright 2013 © Embedded Artists AB
Figure 23 Trimming Potentiometer on Schematic Page 4
Begin with building the breadboard circuit below.
Figure 24 Breadboard Connections for Trimming Potentiometer R7
Create a function for reading the analog value of a specified analog channel. Use constants to define
the possible channels to convert.
Tip #1: Read in the ADC chapter in the LPC111x User’s Manual about the CR register. By setting bit
24 and the channel to convert (in bit 0-7) a conversion is started.
Tip #2: A conversion takes some time. Check the DONE bit in register AD0GDR or AD0DRx (where x
is the channel to convert).