94 uint32_t elapsedTime = millis();
95 Serial.print(
"elapsedTime: ");
96 Serial.println(elapsedTime);
99 uint32_t elapsedMinutes = elapsedTime / (1000L*60L);
103 uint32_t hours = 1 + (((minutes / 60) - 1) % 12);
107 Serial.print(
"minutes: ");
108 Serial.println(minutes);
109 Serial.print(
"hours: ");
110 Serial.println(hours);
113 uint32_t mV = hours * 100L + minutes;
115 Serial.print(
"Outputting ");
117 Serial.println(
" mV on DAC 0");
LTC2422: 1-/2-Channel 20-Bit uPower No Latency Delta-Sigma ADC in MSOP-10.
char demo_name[]
Demo Board Name stored in QuikEval EEPROM.
uint16_t LTC2607_voltage_to_code(float dac_voltage, float LTC2607_lsb, int32_t LTC2607_offset)
Calculates an LTC2607 DAC code for the desired output voltage.
#define output_high(pin)
Set "pin" high.
Header File for Linduino Libraries and Demo Code.
#define LTC2607_ALL_DACS
Command (and DAC code) will modify both DAC A and DAC B.
#define LTC2607_WRITE_UPDATE_COMMAND
Command to write and update (and power up) the LTC2607.
void quikeval_SPI_init(void)
Configure the SPI port for 4Mhz SCK.
static uint32_t startMinutes
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.
LT_I2C: Routines to communicate with ATmega328P's hardware I2C port.
#define LTC2607_DAC_B
Command (and DAC code) will modify DAC B.
const uint8_t address_map[3]
Look-up table for DAC_A, DAC_B, or both command byte option.
static void setup()
Initialize Linduino.
static int8_t demo_board_connected
Set to 1 if the board is connected.
void quikeval_SPI_connect()
Connect SPI pins to QuikEval connector through the Linduino MUX. This will disconnect I2C...
#define LTC2607_I2C_GLOBAL_ADDRESS
LTC2607 Global I2C Address.
#define LTC2422_CS
Define the SPI CS pin.
void quikeval_I2C_init(void)
Initializes Linduino I2C port.
void quikeval_I2C_connect(void)
Switch MUX to connect I2C pins to QuikEval connector.
LTC2607: 16-Bit, Dual Rail-to-Rail DACs with I2C Interface.
int8_t LTC2607_write(uint8_t i2c_address, uint8_t dac_command, uint8_t dac_address, uint16_t dac_code)
Writes command, DAC address, and DAC code to the LTC2607.
#define LTC2607_DAC_A
Command (and DAC code) will modify DAC A.