![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Linear Technology DC934 Demonstration Board. More...
Linear Technology DC934 Demonstration Board.
LTC2607: 16-Bit, Dual Rail-to-Rail DACs with I2C Interface
Linear Technology DC936 Demonstration Board. LTC2609: Quad 16-/14-/12-Bit Rail-to-Rail DACs with I²C Interface.
Linear Technology DC812 Demonstration Board. LTC2606: 16-Bit Rail-to-Rail DACs with I²C Interface.
NOTES Setup: Set the terminal baud rate to 115200 and select the newline terminator. Calibration requires a precision voltmeter. No external power supply is required. USER INPUT DATA FORMAT: decimal : 1024 hex : 0x400 octal : 02000 (leading 0 "zero") binary : B10000000000 float : 1024.0
http://www.linear.com/product/LTC2607 http://www.linear.com/product/LTC2609 http://www.linear.com/product/LTC2606
http://www.linear.com/product/LTC2607#demoboards http://www.linear.com/product/LTC2609#demoboards http://www.linear.com/product/LTC2606#demoboards
Copyright 2018(c) Analog Devices, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file DC934A.ino.
Go to the source code of this file.
Functions | |
static void | print_title () |
Prints the title block. More... | |
static void | print_prompt (int16_t selected_dac) |
Prints the main menu, and prompts the user for an input command. More... | |
static int16_t | prompt_voltage_or_code () |
Prompts user to find out if they want to enter DAC code as a "voltage" or a "code". More... | |
static uint16_t | get_voltage (float LTC2607_lsb, int32_t LTC2607_offset) |
Read desired DAC output voltage from user input. More... | |
static uint16_t | get_code () |
static uint8_t | menu_1_select_dac (int16_t *selected_dac) |
Menu 1: Select DAC to update. More... | |
static uint8_t | menu_2_write_to_input_register (int16_t selected_dac) |
Menu 2: Write to input register only. More... | |
static uint8_t | menu_3_write_and_update_dac (int16_t selected_dac) |
Menu 3: Write to input register and update output voltage. More... | |
static uint8_t | menu_4_update_power_up_dac (int16_t selected_dac) |
Menu 4: Update/Power Up DAC. More... | |
static uint8_t | menu_5_power_down_dac (int16_t selected_dac) |
Menu 5: Power Down DAC. More... | |
static uint8_t | menu_6_read_adc () |
Menu 6: Read voltage from the ADC. More... | |
static uint8_t | menu_7_sweep () |
Menu 7: Voltage Sweep. More... | |
static uint8_t | menu_8_calibrate_all () |
Menu 8: Calibrate All. More... | |
static void | setup () |
Initialize Linduino. More... | |
static void | loop () |
Repeats Linduino loop. More... | |
Enumerations | |
enum | prompt { PROMPT_VOLTAGE = 0, PROMPT_CODE = 1 } |
Used to keep track to print voltage or print code. More... | |
Variables | |
const uint16_t | LTC2422_TIMEOUT = 1000 |
Configures the maximum timeout (ms) allowed for an LTC2607 read. More... | |
const uint8_t | address_map [3] = {LTC2607_DAC_A, LTC2607_DAC_B, LTC2607_ALL_DACS} |
Look-up table for DAC_A, DAC_B, or both command byte option. More... | |
const uint16_t | MISO_TIMEOUT = 1000 |
The MISO timout in ms. More... | |
static float | LTC2607_lsb [3] = {LTC2607_TYPICAL_lsb, LTC2607_TYPICAL_lsb, LTC2607_TYPICAL_lsb} |
The LTC2607 least significant bit value with 5V full-scale. More... | |
static float | LTC2422_lsb = LTC2422_TYPICAL_lsb |
The LTC2422 least significant bit value with 5V full-scale. More... | |
static int32_t | LTC2607_offset [3] = {LTC2607_TYPICAL_OFFSET, LTC2607_TYPICAL_OFFSET, LTC2607_TYPICAL_OFFSET} |
The LTC2422 offset variable. More... | |
static int8_t | demo_board_connected |
Set to 1 if the board is connected. More... | |
|
static |
Reads desired DAC code from user input.
Definition at line 271 of file DC934A.ino.
|
static |
Read desired DAC output voltage from user input.
LTC2607_lsb | lsb weight of the LTC2607 (possibly calibrated) |
LTC2607_offset | offset of LTC2607 (possibly calibrated) |
Definition at line 255 of file DC934A.ino.
|
static |
Repeats Linduino loop.
Definition at line 168 of file DC934A.ino.
|
static |
Menu 1: Select DAC to update.
Prompts user for DAC A, DAC B, or both. This is only a user menu. This function does not communicate with the LTC2607.
selected_dac | Overwritten with 0, 1, or 2 to indicate whether the user wants commands to act upon DAC A, DAC B, or both DACs respectively. |
Definition at line 324 of file DC934A.ino.
|
static |
Menu 2: Write to input register only.
Does not update the output voltage.
selected_dac | DAC to be updated. 0=A, 1=B, 2=All |
Definition at line 339 of file DC934A.ino.
|
static |
Menu 3: Write to input register and update output voltage.
selected_dac | DAC to be updated. 0=A, 1=B, 2=All |
Definition at line 358 of file DC934A.ino.
|
static |
Menu 4: Update/Power Up DAC.
selected_dac | DAC to be updated. 0=A, 1=B, 2=All |
Definition at line 377 of file DC934A.ino.
|
static |
Menu 5: Power Down DAC.
Definition at line 388 of file DC934A.ino.
|
static |
Menu 6: Read voltage from the ADC.
Definition at line 398 of file DC934A.ino.
|
static |
Menu 7: Voltage Sweep.
Definition at line 441 of file DC934A.ino.
|
static |
Menu 8: Calibrate All.
Definition at line 532 of file DC934A.ino.
|
static |
Prints the main menu, and prompts the user for an input command.
selected_dac | this parameter is passed so that it can be printed at the bottom of the menu. |
Definition at line 299 of file DC934A.ino.
|
static |
Prints the title block.
Definition at line 284 of file DC934A.ino.
|
static |
Prompts user to find out if they want to enter DAC code as a "voltage" or a "code".
Definition at line 239 of file DC934A.ino.
|
static |
Initialize Linduino.
Definition at line 144 of file DC934A.ino.
enum prompt |
Used to keep track to print voltage or print code.
Enumerator | |
---|---|
PROMPT_VOLTAGE | 0 |
PROMPT_CODE | 1 |
Definition at line 113 of file DC934A.ino.
const uint8_t address_map[3] = {LTC2607_DAC_A, LTC2607_DAC_B, LTC2607_ALL_DACS} |
Look-up table for DAC_A, DAC_B, or both command byte option.
Builds the command for dac address
Definition at line 123 of file DC934A.ino.
|
static |
Set to 1 if the board is connected.
Definition at line 141 of file DC934A.ino.
|
static |
The LTC2422 least significant bit value with 5V full-scale.
Initialized to typical value from datasheet. Can be calibrated through option menu.
Definition at line 135 of file DC934A.ino.
const uint16_t LTC2422_TIMEOUT = 1000 |
Configures the maximum timeout (ms) allowed for an LTC2607 read.
Definition at line 120 of file DC934A.ino.
|
static |
The LTC2607 least significant bit value with 5V full-scale.
Initialized to typical value from datasheet. Can be calibrated through option menu. Builds the lsb. Index 2 is used for All DACs
Definition at line 131 of file DC934A.ino.
|
static |
The LTC2422 offset variable.
Initialized to typical value from datasheet. Can be calibrated through option menu. Builds the offset. Index 2 is used for All DACs
Definition at line 139 of file DC934A.ino.
const uint16_t MISO_TIMEOUT = 1000 |
The MISO timout in ms.
Definition at line 125 of file DC934A.ino.