Example host software for the Maxim Integrated MAX5715 12-bit 4-channel voltage-output DAC. Hosted on the MAX32625MBED.
Dependencies: MAX5715
Diff: main.cpp
- Revision:
- 13:9fdbd02b6e46
- Parent:
- 12:f84771a41b3b
--- a/main.cpp Wed Jul 10 01:45:10 2019 +0000 +++ b/main.cpp Sun Aug 04 01:47:56 2019 -0700 @@ -32,6 +32,7 @@ // */ // CODE GENERATOR: example code includes // example code includes +// standard include for target platform #include "mbed.h" //#include "max32625.h" #include "MAX5715.h" @@ -107,21 +108,23 @@ //g_MAX5715_device.CODEallLOADall(code); // CODE GENERATOR: example code: member function CODEnLOADn + uint16_t ch; + uint16_t code; // - uint16_t ch = 0; - uint16_t code = 0xccc; // 80% 2.0V (REF=2.5V) + ch = 0; + code = 0x0ccc; // 80.0% 2.00V (REF=2.50V) g_MAX5715_device.CODEnLOADn(ch, code); // ch = 1; - code = 0x800; // 50% 1.25V (REF=2.5V) + code = 0x07ff; // 50.0% 1.25V (REF=2.50V) g_MAX5715_device.CODEnLOADn(ch, code); // ch = 2; - code = 0x666; // 40% 1.0V (REF=2.5V) + code = 0x0666; // 40.0% 1.00V (REF=2.50V) g_MAX5715_device.CODEnLOADn(ch, code); // ch = 3; - code = 0xFFF; // 100% 2.5V (REF=2.5V) + code = 0x0fff; // 100.0% 2.50V (REF=2.50V) g_MAX5715_device.CODEnLOADn(ch, code); // CODE GENERATOR: example code: has no member function ScanManual