mbed PCF8591 I2C ADC Read program for LPC11U24

Dependencies:   PCF8591_ADC_LPC11U24_Rajesh_NIELIT_Calicut mbed

Files at this revision

API Documentation at this revision

Comitter:
rajeshnielit
Date:
Wed Jun 15 21:48:30 2016 +0000
Commit message:
mbed PCF8591 I2C ADC Read program for LPC11U24

Changed in this revision

PCF8591_ADC_LPC11U24.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 70461019ca89 PCF8591_ADC_LPC11U24.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PCF8591_ADC_LPC11U24.lib	Wed Jun 15 21:48:30 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/rajeshnielit/code/PCF8591_ADC_LPC11U24_Rajesh_NIELIT_Calic/#3c4cd2f477ea
diff -r 000000000000 -r 70461019ca89 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jun 15 21:48:30 2016 +0000
@@ -0,0 +1,22 @@
+/*RAJESH M , NIELIT Calicut, rajesh@calicut.nielit.in 
+PCF8591 ADC usage
+ myadc.ADC_read(ADC_CHxx);  replace xx with 00 , 01 , 02 , 03 for reading from 
+ different channels*/
+
+#include "mbed.h"
+#include "PCF8591.h"
+I2C i2c(p28,p27); /* sda and scl*/
+PCF8591 myadc(&i2c);
+Serial pc(USBTX,USBRX);
+
+
+int main() {
+    
+    while(1) {
+        wait(3);
+         pc.printf("read=%x\r\n",myadc.ADC_read(ADC_CH00));
+         }
+         
+        
+    
+}
diff -r 000000000000 -r 70461019ca89 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Jun 15 21:48:30 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34
\ No newline at end of file