ADC logging with demo drive board for calibration
Dependencies: mbed MODSERIAL FastPWM ADS8568_ADC
Diff: main.cpp
- Revision:
- 15:a08527d78ffa
- Parent:
- 14:d764e256ac6d
- Child:
- 16:2c563709cf09
diff -r d764e256ac6d -r a08527d78ffa main.cpp --- a/main.cpp Mon Aug 05 17:19:21 2019 +0000 +++ b/main.cpp Mon Aug 05 17:36:42 2019 +0000 @@ -1,30 +1,30 @@ #include "mbed.h" -#define CH_A 1 // value of convst bus to read channel A only -#define CH_AC 5 // value of convst bus to read channels A and C -#define CH_ABCD 15 // value of convst bus to read all chanels simultaneously +#define CH_A 1 // value of convst bus to read channel A only +#define CH_AC 5 // value of convst bus to read channels A and C +#define CH_ABCD 15 // value of convst bus to read all chanels simultaneously -#define MEAS_DELAY 1000 // measurement delay after turning on FET (us) (themocycling control programme uses 50 us) +#define MEAS_DELAY 50 // measurement delay after turning on FET (us) (themocycling control programme uses 50 us) #define LOG_INTERVAL 5000 // log file interval (ms) -#define N_STEPS 1000 -#define CAM_TRIG 20 // camera trigger pulse width (us) +#define N_STEPS 1000 +#define CAM_TRIG 20 // camera trigger pulse width (us) -Serial pc(USBTX, USBRX); // tx, rx +Serial pc(USBTX, USBRX); // tx, rx DigitalOut drive(p21); DigitalOut yLED(p27); DigitalOut gLED(p28); DigitalOut rLED(p26); DigitalOut camTrig(p24); -DigitalOut mbedIO(p25); // MBED IO +DigitalOut mbedIO(p25); // MBED IO AnalogIn battVolt(p19); AnalogIn auxVolt(p20); BusOut convt(p11, p12, p13, p14); -SPI spi(p5, p6, p7); // mosi, miso, sclk -DigitalOut cs(p8); // chip select +SPI spi(p5, p6, p7); // mosi, miso, sclk +DigitalOut cs(p8); // chip select DigitalIn busy(p9); DigitalOut reset(p10); DigitalIn userButton(p16);