AD7791 hello world application

Dependencies:   AD7791 mbed

For additional information check out the mbed page of the Analog Devices wiki: https://wiki.analog.com/resources/tools-software/mbed-drivers-all

Files at this revision

API Documentation at this revision

Comitter:
adisuciu
Date:
Wed May 04 08:32:13 2016 +0000
Commit message:
Initial revision

Changed in this revision

ad7791.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ad7791.lib	Wed May 04 08:32:13 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/AnalogDevices/code/ad7791/#075fe3d08488
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed May 04 08:32:13 2016 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "AD7791.h"
+//------------------------------------
+// Hyperterminal configuration
+// 9600 bauds, 8-bit data, no parity
+//------------------------------------
+
+Serial pc(SERIAL_TX, SERIAL_RX);
+AD7791 ad7791(1.2,D8); // reference voltage 1.2 V - only used in voltage computations
+
+ 
+int main() {
+  pc.printf("Hello AD7791 !\r\n");
+  ad7791.reset();
+  while(1) { 
+      wait(1);
+      pc.printf("Data register read from the ADC is %x \r\n", ad7791.read_u16());
+  }
+}
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed May 04 08:32:13 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/aae6fcc7d9bb
\ No newline at end of file