127 Serial.begin(115200);
138 if (Serial.available())
141 if (user_command !=
'm')
142 Serial.println(user_command);
143 switch (user_command)
155 Serial.println(
"Invalid Option");
181 display_code = display_code & 0xFFFF;
183 display_code = display_code & 0x3FFFF;
185 Serial.print(F(
" Received Code: b"));
186 Serial.println(display_code, BIN);
191 Serial.print(F(
" Equivalent voltage: "));
192 Serial.print(adc_voltage, 4);
193 Serial.println(F(
"V"));
203 Serial.println(F(
" 0 = No Gain Compression"));
204 Serial.println(F(
" 1 = Gain Compression"));
205 Serial.print(F(
" Enter a Command, based upon the position of jumper JP3: "));
208 Serial.println(user_command);
209 switch (user_command)
212 Serial.println(F(
" No Gain compression"));
216 Serial.println(F(
" Gain compression"));
221 Serial.println(
" Invalid Option");
235 Serial.println(F(
" 16 = 23XX-16"));
236 Serial.println(F(
" 18 = 23XX-18"));
237 Serial.print(F(
" Enter a Command, based upon the resolution of the part under test: "));
240 Serial.println(user_command);
241 switch (user_command)
244 Serial.println(F(
" 16 bits selected"));
248 Serial.println(F(
" 18 bits selected"));
253 Serial.println(
" Invalid Option");
265 Serial.println(F(
"*****************************************************************"));
266 Serial.println(F(
"* DC1805A Demonstration Program *"));
267 Serial.println(F(
"* *"));
268 Serial.println(F(
"* This program demonstrates how to receive data *"));
269 Serial.println(F(
"* from the following ADCs: *"));
270 Serial.println(F(
"* LTC2376-16 *"));
271 Serial.println(F(
"* LTC2376-18 *"));
272 Serial.println(F(
"* LTC2377-16 *"));
273 Serial.println(F(
"* LTC2376-18 *"));
274 Serial.println(F(
"* LTC2378-16 *"));
275 Serial.println(F(
"* LTC2378-18 *"));
276 Serial.println(F(
"* LTC2379-18 *"));
277 Serial.println(F(
"* LTC2380-16 *"));
278 Serial.println(F(
"* *"));
279 Serial.println(F(
"* Set the baud rate to 115200 and select the newline terminator.*"));
280 Serial.println(F(
"* *"));
281 Serial.println(F(
"*****************************************************************"));
288 Serial.println(F(
"*************************"));
289 Serial.println(F(
"1-Read ADC Input"));
290 Serial.println(F(
"2-Select No Gain Compression / Gain Compression (Default is no compression)"));
291 Serial.println(F(
"3-Select Number of bits (Default is 18 bits)\n"));
292 Serial.print(F(
"Enter a command:"));
static uint8_t LTC2380_bits
Default set for 18 bits.
unsigned char user_command
static void print_title()
Prints the title block when program first starts.
static void menu_3_select_bits()
Select number of bits.
Header File for Linduino Libraries and Demo Code.
static float LTC2380_vref
static void menu_1_read_input()
Read channel.
#define LTC2380_CS
Define the SPI CS pin.
void LTC2380_read(uint8_t cs, int32_t *ptr_adc_code)
Reads the LTC2380 and returns 32-bit data in 2's complement format.
static uint8_t LTC2380_dgc
Default set for no gain compression.
void quikeval_SPI_init(void)
Configure the SPI port for 4Mhz SCK.
static void print_user_command(uint8_t menu)
LT_SPI: Routines to communicate with ATmega328P's hardware SPI port.
static void menu_2_select_gain_compression()
Select gain compression.
LT_I2C: Routines to communicate with ATmega328P's hardware I2C port.
static void print_prompt()
Prints main menu.
void quikeval_SPI_connect()
Connect SPI pins to QuikEval connector through the Linduino MUX. This will disconnect I2C...
float LTC2380_code_to_voltage(int32_t adc_code, uint8_t gain_compression, float vref)
Calculates the LTC2380 input voltage given the binary data and lsb weight.
static int32_t display_code
static void loop()
Repeats Linduino loop.
void quikeval_I2C_init(void)
Initializes Linduino I2C port.
static void setup()
Initialize Linduino.
LTC2376-16: 16-Bit, 250Ksps ADC LTC2376-18: 18-Bit, 250Ksps ADC LTC2376-20: 20-Bit, 250Ksps ADC LTC2377-16: 16-Bit, 500Ksps ADC LTC2377-18: 18-Bit, 500Ksps ADC LTC2377-20: 20-Bit, 500Ksps ADC LTC2378-16: 16-Bit, 1Msps ADC LTC2378-18: 18-Bit, 1Msps ADC LTC2378-20: 20-Bit, 1Msps ADC LTC2379-18: 18-Bit, 1.6Msps ADC LTC2380-16: 16-Bit, 2Msps ADC.