![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Linear Technology DC935A Demonstration Board LTC2605: Octal 16-/14-/12-Bit Rail-to Rail DACs in 16-Lead SSOP. More...
Linear Technology DC935A Demonstration Board LTC2605: Octal 16-/14-/12-Bit Rail-to Rail DACs in 16-Lead SSOP.
NOTES Setup: Set the terminal baud rate to 115200 and select the newline terminator. The program displays calculated voltages which are based on the voltage of the reference used, be it internal or external. A precision voltmeter is needed to verify the actual measured voltages against the calculated voltage displayed. If an external reference is used, a precision voltage source is required to apply the external reference voltage. A precision voltmeter is also required to measure the external reference voltage. No external power supply is required. Any assembly option may be used: Explanation of Commands: 1- Select DAC: Select one of four DACs to test: A, B, C, D. 2- Write to DAC input register: Value is stored in the DAC for updating later, allowing multiple channels to be updated at once, either through a software "Update All" command or by asserting the LDAC# pin. User will be prompted to enter either a code in hex or decimal, or a voltage. If a voltage is entered, a code will be calculated based on the active scaling and reference parameters - ideal values if no calibration was ever stored. 3- Write and Update: Similar to item 1, but DAC is updated immediately. 4- Update DAC: Copies the value from the input register into the DAC Register. Note that a "write and update" command writes the code to BOTH the input register and DAC register, so subsequent "update" commands will simply re-copy the same data (no change in output). 5- Power Down DAC: Disable DAC output. Power supply current is reduced. DAC code present in DAC registers at time of shutdown are preserved. USER INPUT DATA FORMAT: decimal : 1024 hex : 0x400 octal : 02000 (leading 0 "zero") binary : B10000000000 float : 1024.0
http://ww.linear.com/product/LTC2605
http://www.linear.com/product/LTC2605#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 DC935A.ino.
Go to the source code of this file.
Functions | |
static void | print_title () |
Prints the title block when program first starts. More... | |
static void | print_prompt (int16_t selected_dac) |
Prints main menu. More... | |
static int16_t | prompt_voltage_or_code () |
Prompt user to enter a voltage or digital code to send to DAC. More... | |
static uint16_t | get_voltage (float LTC2605_lsb, int16_t LTC2605_offset) |
Get voltage from user input, calculate DAC code based on lsb, offset. More... | |
static uint16_t | get_code () |
Get code to send to DAC directly, in decimal, hex, or binary. More... | |
static int8_t | calibrate_dac (uint8_t index) |
static int8_t | menu_1_select_dac (int16_t *selected_dac) |
Select which DAC to operate on. More... | |
static int8_t | menu_2_write_to_input_register (int16_t selected_dac) |
Write data to input register, but do not update DAC output. More... | |
static int8_t | menu_3_write_and_update_dac (int16_t selected_dac) |
Write data to DAC register (which updates output immediately) More... | |
static int8_t | menu_4_update_power_up_dac (int16_t selected_dac) |
Update DAC with data that is stored in input register, power up if sleeping. More... | |
static int8_t | menu_5_power_down_dac (int16_t selected_dac) |
Power down DAC. More... | |
static void | setup () |
Initialize Linduino. More... | |
static void | loop () |
Repeats Linduino loop. More... | |
Macros | |
#define | REF_INTERNAL LTC2605_CMD_INTERNAL_REFERENCE |
Stored reference state is Internal. More... | |
#define | REF_EXTERNAL LTC2605_CMD_EXTERNAL_REFERENCE |
Stored reference state is External. More... | |
Enumerations | |
enum | { PROMPT_VOLTAGE = 0, PROMPT_CODE = 1 } |
Used to keep track to print voltage or print code. More... | |
Variables | |
static uint8_t | demo_board_connected |
Set to 1 if the board is connected. More... | |
static uint8_t | shift_count = 0 |
The data align shift count. More... | |
static uint8_t | reference_mode = REF_INTERNAL |
Tells whether to set internal or external reference. More... | |
static float | reference_voltage = 5 |
Reference voltage, either internal or external. More... | |
static int16_t | LTC2605_offset = 0 |
DAC offset. More... | |
static float | LTC2605_lsb = (reference_voltage / (pow(2,16) -1)) |
const uint8_t | address_map [9] = {LTC2605_DAC_A, LTC2605_DAC_B, LTC2605_DAC_C, LTC2605_DAC_D, LTC2605_DAC_E, LTC2605_DAC_F , LTC2605_DAC_G, LTC2605_DAC_H, LTC2605_DAC_ALL} |
Lookup table for DAC address. More... | |
|
static |
|
static |
Get code to send to DAC directly, in decimal, hex, or binary.
Definition at line 310 of file DC935A.ino.
|
static |
Get voltage from user input, calculate DAC code based on lsb, offset.
LTC2605_lsb | the voltage LSB of the DAC |
LTC2605_offset | the Offset of the DAC |
Definition at line 295 of file DC935A.ino.
|
static |
Repeats Linduino loop.
Definition at line 160 of file DC935A.ino.
|
static |
Select which DAC to operate on.
selected_dac | what DAC to operate on |
Definition at line 206 of file DC935A.ino.
|
static |
Write data to input register, but do not update DAC output.
selected_dac | what DAC to operate on |
Definition at line 220 of file DC935A.ino.
|
static |
Write data to DAC register (which updates output immediately)
selected_dac | what DAC to operate on |
Definition at line 238 of file DC935A.ino.
|
static |
Update DAC with data that is stored in input register, power up if sleeping.
selected_dac | what DAC to operate on |
Definition at line 259 of file DC935A.ino.
|
static |
Power down DAC.
selected_dac | what DAC to operate on |
Definition at line 269 of file DC935A.ino.
|
static |
Prints main menu.
selected_dac | what DAC to operate on |
Definition at line 341 of file DC935A.ino.
|
static |
Prints the title block when program first starts.
Definition at line 326 of file DC935A.ino.
|
static |
Prompt user to enter a voltage or digital code to send to DAC.
Definition at line 280 of file DC935A.ino.
|
static |
Initialize Linduino.
Definition at line 145 of file DC935A.ino.
#define REF_EXTERNAL LTC2605_CMD_EXTERNAL_REFERENCE |
Stored reference state is External.
Definition at line 105 of file DC935A.ino.
#define REF_INTERNAL LTC2605_CMD_INTERNAL_REFERENCE |
Stored reference state is Internal.
Definition at line 104 of file DC935A.ino.
anonymous enum |
Used to keep track to print voltage or print code.
Enumerator | |
---|---|
PROMPT_VOLTAGE | 0 |
PROMPT_CODE | 1 |
Definition at line 138 of file DC935A.ino.
const uint8_t address_map[9] = {LTC2605_DAC_A, LTC2605_DAC_B, LTC2605_DAC_C, LTC2605_DAC_D, LTC2605_DAC_E, LTC2605_DAC_F , LTC2605_DAC_G, LTC2605_DAC_H, LTC2605_DAC_ALL} |
Lookup table for DAC address.
Allows the "All DACs" address to be indexed right after DAC D in loops. This technique is very useful for devices with non-monotonic channel addresses. Map entered option 0..2 to DAC address
Definition at line 135 of file DC935A.ino.
|
static |
Set to 1 if the board is connected.
Definition at line 122 of file DC935A.ino.
|
static |
Definition at line 129 of file DC935A.ino.
|
static |
DAC offset.
Definition at line 128 of file DC935A.ino.
|
static |
Tells whether to set internal or external reference.
Definition at line 124 of file DC935A.ino.
|
static |
Reference voltage, either internal or external.
Definition at line 127 of file DC935A.ino.
|
static |
The data align shift count.
For 16-bit=0, for 14 bits=2 for 12-bits=4
Definition at line 123 of file DC935A.ino.