This program demonstrates the usage of the ADC. Program sets pin P1.31 as an ADC chanel 5 input to which we connect the potentiometer. Program then turns on an embedded LED on the LPC4088 QSB when the potentiometer's digital value exceeds the middle value.

Dependencies:   mbed

Committer:
71GA
Date:
Sat May 02 17:33:44 2015 +0000
Revision:
0:3b7f012600ec
This is the first commit of this program.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
71GA 0:3b7f012600ec 1 //register definitions for ADC peripheral
71GA 0:3b7f012600ec 2
71GA 0:3b7f012600ec 3 #define CR (*((volatile unsigned int *) 0x40034000))
71GA 0:3b7f012600ec 4 #define GDR (*((volatile unsigned int *) 0x40034004))
71GA 0:3b7f012600ec 5 #define INTEN (*((volatile unsigned int *) 0x4003400C))
71GA 0:3b7f012600ec 6
71GA 0:3b7f012600ec 7 #define DR0 (*((volatile unsigned int *) 0x40034010))
71GA 0:3b7f012600ec 8 #define DR1 (*((volatile unsigned int *) 0x40034014))
71GA 0:3b7f012600ec 9 #define DR2 (*((volatile unsigned int *) 0x40034018))
71GA 0:3b7f012600ec 10 #define DR3 (*((volatile unsigned int *) 0x4003401C))
71GA 0:3b7f012600ec 11 #define DR4 (*((volatile unsigned int *) 0x40034020))
71GA 0:3b7f012600ec 12 #define DR5 (*((volatile unsigned int *) 0x40034024))
71GA 0:3b7f012600ec 13 #define DR6 (*((volatile unsigned int *) 0x40034028))
71GA 0:3b7f012600ec 14 #define DR7 (*((volatile unsigned int *) 0x4003402C))
71GA 0:3b7f012600ec 15
71GA 0:3b7f012600ec 16 #define STAT (*((volatile unsigned int *) 0x40034030))
71GA 0:3b7f012600ec 17 #define TRM (*((volatile unsigned int *) 0x40034034))