66 #define CS QUIKEVAL_CS 103 Serial.begin(115200);
104 Serial.println(F(
"Welcome to the LTC2499 Test Program\n"));
114 if (!demo_board_connected)
115 Serial.println(F(
"Standard demo board not detected, verify hardware connections to your circuit."));
132 Serial.println(user_command);
134 switch (user_command)
139 read_LTC2449(LTC2499_vref, EOC_timout, channel_read_delay);
146 read_LTC2449(LTC2499_vref, EOC_timout, channel_read_delay);
149 while (Serial.available() ==
false);
153 Serial.println(F(
"Incorrect Option"));
162 Serial.println(F(
"S-Single Loop"));
163 Serial.println(F(
"C-Continuous Loop"));
164 Serial.println(F(
" Enter any character to exit Continuous Loop"));
166 Serial.print(F(
"Enter a command: "));
179 for (i=0; i<=15; i++)
181 delay(channel_delay);
194 for (i=0; i<=15; i++)
196 Serial.print(results[i], 8);
197 if (!((i+1)%16)) Serial.println();
198 else Serial.print(F(
" , "));
#define LTC24XX_MULTI_CH_OSR_32768
#define LTC24XX_MULTI_CH_CH3
static void print_prompt()
Print the Prompt.
#define LTC24XX_MULTI_CH_CH14
#define LTC24XX_MULTI_CH_OSR_8192
unsigned char user_command
#define LTC24XX_MULTI_CH_CH8
#define LTC24XX_MULTI_CH_CH15
static uint16_t loop_delay
#define LTC24XX_MULTI_CH_CH13
#define LTC24XX_MULTI_CH_CH1
#define LTC24XX_MULTI_CH_OSR_256
#define LTC24XX_MULTI_CH_CH6
#define LTC24XX_MULTI_CH_P13_N12
#define LTC24XX_MULTI_CH_OSR_1024
#define LTC24XX_MULTI_CH_P1_N0
Header File for Linduino Libraries and Demo Code.
int8_t LTC24XX_EOC_timeout(uint8_t cs, uint16_t miso_timeout)
Checks for EOC with a specified timeout.
#define LTC24XX_MULTI_CH_CH5
static void setup()
Initialize Linduino.
#define LTC24XX_MULTI_CH_P4_N5
#define LTC24XX_MULTI_CH_CH0
#define LTC24XX_MULTI_CH_CH11
static void loop()
Repeats Linduino loop.
const uint8_t DIFF_CONFIG_ARRAY[16]
Lookup table to build the command for differential mode.
static float LTC2499_vref
The LTC2499 reference voltage.
LTC24XX General Library: Functions and defines for all SINC4 Delta Sigma ADCs.
#define LTC24XX_MULTI_CH_P9_N8
#define LTC24XX_MULTI_CH_P14_N15
void LTC24XX_SPI_16bit_command_32bit_data(uint8_t cs, uint8_t adc_command_high, uint8_t adc_command_low, int32_t *adc_code)
Reads from LTC24XX ADC that accepts a 16 bit configuration and returns a 32 bit result.
#define LTC24XX_MULTI_CH_OSR_64
#define LTC24XX_MULTI_CH_CH2
const uint8_t SINGLE_ENDED_CONFIG_ARRAY[16]
Lookup table to build the command for single-ended mode.
static uint16_t eoc_timeout
timeout in ms
#define LTC24XX_MULTI_CH_P3_N2
#define LTC24XX_MULTI_CH_OSR_4096
#define LTC24XX_MULTI_CH_P2_N3
#define LTC24XX_MULTI_CH_OSR_16384
#define LTC24XX_MULTI_CH_OSR_128
void quikeval_SPI_init(void)
Configure the SPI port for 4Mhz SCK.
static void read_LTC2449(float vref, uint16_t eoc_timeout, uint16_t channel_delay)
Reads the LTC2449 and displays the results.
int8_t discover_demo_board(char *demo_name)
Read the ID string from the EEPROM and determine if the correct board is connected.
#define LTC24XX_MULTI_CH_P10_N11
#define LTC24XX_MULTI_CH_CH12
#define LTC24XX_MULTI_CH_OSR_512
#define LTC24XX_MULTI_CH_P12_N13
LT_SPI: Routines to communicate with ATmega328P's hardware SPI port.
#define LTC24XX_MULTI_CH_CH7
#define LTC24XX_MULTI_CH_P5_N4
static void print_all(float *results)
Displays the the data in the array.
const uint8_t OSR_CONFIG_ARRAY[10]
Lookup table to build the OSR command.
LT_I2C: Routines to communicate with ATmega328P's hardware I2C port.
#define CS
LTC2449: 24-Bit High Speed 16-Channel Delta Sigma ADCs with Selectable Speed/Resolution.
#define LTC24XX_MULTI_CH_P8_N9
#define LTC24XX_MULTI_CH_P7_N6
float LTC24XX_diff_code_to_voltage(int32_t adc_code, float vref)
Calculates the voltage corresponding to an ADC code, given the reference voltage. ...
char demo_name[]
Demo Board Name stored in QuikEval EEPROM.
void quikeval_SPI_connect()
Connect SPI pins to QuikEval connector through the Linduino MUX. This will disconnect I2C...
#define LTC24XX_MULTI_CH_CH10
static uint16_t EOC_timout
#define LTC24XX_MULTI_CH_CH9
#define LTC24XX_MULTI_CH_P15_N14
void quikeval_I2C_init(void)
Initializes Linduino I2C port.
#define LTC24XX_MULTI_CH_P11_N10
#define LTC24XX_MULTI_CH_OSR_2048
#define LTC24XX_MULTI_CH_P0_N1
#define LTC24XX_MULTI_CH_CH4
static uint16_t channel_read_delay
#define LTC24XX_MULTI_CH_P6_N7
static uint8_t demo_board_connected
Set to 1 if the board is connected.