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 /*Program Example 4.1: Three values of DAC are output in turn on Pin 18. Read the output on a DVM. 00002 */ 00003 #include "mbed.h" 00004 AnalogOut Aout(p18); //create an analog output on pin 18 00005 int main() 00006 { 00007 while(1) { 00008 Aout=0.25; // 0.25*3.3V = 0.825V 00009 wait(2); 00010 Aout=0.5; // 0.5*3.3V = 1.65V 00011 wait(2); 00012 Aout=0.75; // 0.75*3.3V = 2.475V 00013 wait(2); 00014 } 00015 }
Generated on Wed Jul 27 2022 04:35:59 by
1.7.2