117 #include <LiquidCrystal.h> 137 #define vdiv_gain 10.75 // Measured from actual supply 138 #define imon_gain 10.0 139 #define tmon_gain 100.0 159 LiquidCrystal
lcd(2, 3, 4, A0, A1, A2, A3);
168 lcd.print(
"Hello, DC2132");
170 lcd.print(
"Power Supply! :)");
181 Serial.begin(115200);
200 uint8_t adc_command_high;
201 uint8_t adc_command_low;
205 float temperature, tj,
adc_voltage, vout_voltage, iout_current;
218 lcd.print(vout_voltage, 2);
230 lcd.print(iout_current, 2);
241 temperature = 27.0 + ((adc_voltage-0.028) / 93.5e-6);
246 lcd.print(temperature, 1);
static float LTC2498_vref
The LTC2498 ideal reference voltage.
unsigned char user_command
static uint8_t rejection_mode
The LTC2498 rejection mode settings.
#define LTC2498_INTERNAL_TEMP
Header File for Linduino Libraries and Demo Code.
LTC2498: 24-Bit, 16-Channel Delta Sigma ADCs with Easy Drive Input Current Cancellation.
const uint8_t BUILD_1X_2X_COMMAND[2]
Lookup table to build 1X / 2X bits.
int8_t LTC2498_EOC_timeout(uint8_t cs, uint16_t miso_timeout)
Checks for EOC with a specified timeout.
static uint8_t demo_board_connected
Two-Channel Panel Meter based on the LTC2492, using any 2x16 LCD display compatible with the Arduino ...
static uint8_t two_x_mode
The LTC2498 2X Mode settings.
LTC24XX General Library: Functions and defines for all SINC4 Delta Sigma ADCs.
static void setup()
Initialize Linduino.
static uint16_t eoc_timeout
timeout in ms
void LTC2498_read(uint8_t cs, uint8_t adc_command_high, uint8_t adc_command_low, int32_t *adc_code)
Reads from LTC2498.
void quikeval_SPI_init(void)
Configure the SPI port for 4Mhz SCK.
int8_t discover_demo_board(char *demo_name)
Read the ID string from the EEPROM and determine if the correct board is connected.
LT_SPI: Routines to communicate with ATmega328P's hardware SPI port.
const uint8_t BUILD_COMMAND_DIFF[16]
Lookup table to build the command for differential mode.
LT_I2C: Routines to communicate with ATmega328P's hardware I2C port.
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...
float LTC2498_code_to_voltage(int32_t adc_code, float vref)
Calculates the voltage corresponding to an adc code, given the reference (in volts) ...
#define LTC2498_CS
Define the SPI CS pin.
static void loop()
Repeats Linduino loop.
void quikeval_I2C_init(void)
Initializes Linduino I2C port.
const uint8_t BUILD_COMMAND_SINGLE_ENDED[16]
Lookup table to build the command for single-ended mode.
LiquidCrystal lcd(2, 3, 4, A0, A1, A2, A3)