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 //definicije registrov za periferijo PWM
71GA 0:3b7f012600ec 2
71GA 0:3b7f012600ec 3 //PWM0
71GA 0:3b7f012600ec 4 #define IR (*((volatile unsigned int *) 0x40014000))
71GA 0:3b7f012600ec 5 #define TCR (*((volatile unsigned int *) 0x40014004))
71GA 0:3b7f012600ec 6 #define TC (*((volatile unsigned int *) 0x40014008))
71GA 0:3b7f012600ec 7 #define PR (*((volatile unsigned int *) 0x4001400C))
71GA 0:3b7f012600ec 8 #define PC (*((volatile unsigned int *) 0x40014010))
71GA 0:3b7f012600ec 9
71GA 0:3b7f012600ec 10 #define MCR (*((volatile unsigned int *) 0x40014014))
71GA 0:3b7f012600ec 11 #define MR0 (*((volatile unsigned int *) 0x40014018))
71GA 0:3b7f012600ec 12 #define MR1 (*((volatile unsigned int *) 0x4001401C))
71GA 0:3b7f012600ec 13 #define MR2 (*((volatile unsigned int *) 0x40014020))
71GA 0:3b7f012600ec 14 #define MR3 (*((volatile unsigned int *) 0x40014024))
71GA 0:3b7f012600ec 15 #define MR4 (*((volatile unsigned int *) 0x40014040))
71GA 0:3b7f012600ec 16 #define MR5 (*((volatile unsigned int *) 0x40014044))
71GA 0:3b7f012600ec 17 #define MR6 (*((volatile unsigned int *) 0x40014048))
71GA 0:3b7f012600ec 18
71GA 0:3b7f012600ec 19 #define CCR (*((volatile unsigned int *) 0x40014028))
71GA 0:3b7f012600ec 20 #define CR0 (*((volatile unsigned int *) 0x4001402C))
71GA 0:3b7f012600ec 21 #define CR1 (*((volatile unsigned int *) 0x40014030))
71GA 0:3b7f012600ec 22
71GA 0:3b7f012600ec 23 #define PCR (*((volatile unsigned int *) 0x4001404C))
71GA 0:3b7f012600ec 24 #define LER (*((volatile unsigned int *) 0x40014050))
71GA 0:3b7f012600ec 25 #define CTCR (*((volatile unsigned int *) 0x40014070))
71GA 0:3b7f012600ec 26
71GA 0:3b7f012600ec 27 /*
71GA 0:3b7f012600ec 28 //PWM1
71GA 0:3b7f012600ec 29 #define IR (*((volatile unsigned int *) 0x40018000))
71GA 0:3b7f012600ec 30 #define TCR (*((volatile unsigned int *) 0x40018004))
71GA 0:3b7f012600ec 31 #define TC (*((volatile unsigned int *) 0x40018008))
71GA 0:3b7f012600ec 32 #define PR (*((volatile unsigned int *) 0x4001800C))
71GA 0:3b7f012600ec 33 #define PC (*((volatile unsigned int *) 0x40018010))
71GA 0:3b7f012600ec 34
71GA 0:3b7f012600ec 35 #define MCR (*((volatile unsigned int *) 0x40018014))
71GA 0:3b7f012600ec 36 #define MR0 (*((volatile unsigned int *) 0x40018018))
71GA 0:3b7f012600ec 37 #define MR1 (*((volatile unsigned int *) 0x4001801C))
71GA 0:3b7f012600ec 38 #define MR2 (*((volatile unsigned int *) 0x40018020))
71GA 0:3b7f012600ec 39 #define MR3 (*((volatile unsigned int *) 0x40018024))
71GA 0:3b7f012600ec 40 #define MR4 (*((volatile unsigned int *) 0x40018040))
71GA 0:3b7f012600ec 41 #define MR5 (*((volatile unsigned int *) 0x40018044))
71GA 0:3b7f012600ec 42 #define MR6 (*((volatile unsigned int *) 0x40018048))
71GA 0:3b7f012600ec 43
71GA 0:3b7f012600ec 44 #define CCR (*((volatile unsigned int *) 0x40018028))
71GA 0:3b7f012600ec 45 #define CR0 (*((volatile unsigned int *) 0x4001802C))
71GA 0:3b7f012600ec 46 #define CR1 (*((volatile unsigned int *) 0x40018030))
71GA 0:3b7f012600ec 47
71GA 0:3b7f012600ec 48 #define PCR (*((volatile unsigned int *) 0x4001804C))
71GA 0:3b7f012600ec 49 #define LER (*((volatile unsigned int *) 0x40018050))
71GA 0:3b7f012600ec 50 #define CTCR (*((volatile unsigned int *) 0x40018070))
71GA 0:3b7f012600ec 51 */