Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 #include "AD7791.h" 00003 //------------------------------------ 00004 // Hyperterminal configuration 00005 // 9600 bauds, 8-bit data, no parity 00006 //------------------------------------ 00007 00008 Serial pc(SERIAL_TX, SERIAL_RX); 00009 AD7791 ad7791(1.2,D8); // reference voltage 1.2 V - only used in voltage computations 00010 00011 00012 int main() { 00013 pc.printf("Hello AD7791 !\r\n"); 00014 ad7791.reset(); 00015 while(1) { 00016 wait(1); 00017 pc.printf("Data register read from the ADC is %x \r\n", ad7791.read_u16()); 00018 } 00019 } 00020
Generated on Wed Jul 13 2022 14:23:10 by
1.7.2
Analog Devices AD7791