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.
adc.h
00001 #ifndef ADC_H 00002 #define ADC_H 00003 00004 #define SPI_NO_BITS_PER_FRAME 8 00005 00006 #define SPI_CLOCK_POLARITY 0 00007 #define SPI_PHASE_MODE 0 00008 #define SPI_CLOCK_PHASE (SPI_CLOCK_POLARITY << 1 | SPI_PHASE_MODE) 00009 00010 #define SPI_FREQUENCY 400000 00011 00012 #define SPI_MAX_SYNC_TRYS 19 00013 00014 #define SPI_CONF_DELAY 0.2 00015 00016 /* Math coefficients. */ 00017 #define ADC_R 8.31451 00018 #define ADC_F 96487.0 00019 #define ADC_dEdT -0.0011012283386 00020 00021 #define MAX_CONF_PIN_CHECKS 21 00022 #define MAX_PIN_CHECKS 201 00023 00024 /* 00025 * Init analog to digital communication and config ADC(analog to digital converter) 00026 */ 00027 void adcInit(); 00028 00029 /* 00030 * Get data from analog to digital converter. 00031 * For calculation are used the following extern variables: 00032 * A, B, C, D, PHTEMPF, EOSINGLEPT. 00033 * All received data will be written to the extern variables: 00034 * PHTEMP, pH, pHNoGain, pHCorrected, pHT. 00035 */ 00036 void adcGetData(); 00037 00038 #endif
Generated on Tue Sep 27 2022 18:47:00 by
1.7.2