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

Revision:
0:3b7f012600ec
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LPC4088-gpio.h	Sat May 02 17:33:44 2015 +0000
@@ -0,0 +1,52 @@
+//definicija registrov za periferijo GPIO
+
+//GPIO
+#define DIR0           (*((volatile unsigned int *) 0x20098000))    //Port0
+#define MASK0          (*((volatile unsigned int *) 0x20098010))
+#define PIN0           (*((volatile unsigned int *) 0x20098014))
+#define SET0           (*((volatile unsigned int *) 0x20098018))
+#define CLR0           (*((volatile unsigned int *) 0x2009801C))
+
+#define DIR1           (*((volatile unsigned int *) 0x20098020))    //Port1
+#define MASK1          (*((volatile unsigned int *) 0x20098030))
+#define PIN1           (*((volatile unsigned int *) 0x20098034))
+#define SET1           (*((volatile unsigned int *) 0x20098038))
+#define CLR1           (*((volatile unsigned int *) 0x2009803C))
+
+#define DIR2           (*((volatile unsigned int *) 0x20098040))    //Port2
+#define MASK2          (*((volatile unsigned int *) 0x20098050))
+#define PIN2           (*((volatile unsigned int *) 0x20098054))
+#define SET2           (*((volatile unsigned int *) 0x20098058))
+#define CLR2           (*((volatile unsigned int *) 0x2009805C))
+
+#define DIR3           (*((volatile unsigned int *) 0x20098060))    //Port3
+#define MASK3          (*((volatile unsigned int *) 0x20098070))
+#define PIN3           (*((volatile unsigned int *) 0x20098074))
+#define SET3           (*((volatile unsigned int *) 0x20098078))
+#define CLR3           (*((volatile unsigned int *) 0x2009807C))
+
+#define DIR4           (*((volatile unsigned int *) 0x20098080))    //Port4
+#define MASK4          (*((volatile unsigned int *) 0x20098090))
+#define PIN4           (*((volatile unsigned int *) 0x20098094))
+#define SET4           (*((volatile unsigned int *) 0x20098098))
+#define CLR4           (*((volatile unsigned int *) 0x2009809C))
+
+#define DIR5           (*((volatile unsigned int *) 0x200980A0))    //Port5
+#define MASK5          (*((volatile unsigned int *) 0x200980B0))
+#define PIN5           (*((volatile unsigned int *) 0x200980B4))
+#define SET5           (*((volatile unsigned int *) 0x200980B8))
+#define CLR5           (*((volatile unsigned int *) 0x200980BC))
+
+
+//GPIO interrupts
+#define int_STATUS     (*((volatile unsigned int *) 0x40028080))
+#define int_STATR0     (*((volatile unsigned int *) 0x40028084))
+#define int_STATF0     (*((volatile unsigned int *) 0x40028088))
+#define int_CLR0       (*((volatile unsigned int *) 0x4002808C))
+#define int_ENR0       (*((volatile unsigned int *) 0x40028090))
+#define int_ENF0       (*((volatile unsigned int *) 0x40028094))
+#define int_STATR2     (*((volatile unsigned int *) 0x400280A4))
+#define int_STATF2     (*((volatile unsigned int *) 0x400280A8))
+#define int_CLR2       (*((volatile unsigned int *) 0x400280AC))
+#define int_ENR2       (*((volatile unsigned int *) 0x400280B0))
+#define int_ENF2       (*((volatile unsigned int *) 0x400280B4))