![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Linear Technology DC2025A Demonstration Board. More...
Linear Technology DC2025A Demonstration Board.
LTC2666: 8 Channel SPI 16-/12-Bit Rail-to-Rail DACs with 10ppm/C Max Reference.
NOTES Setup: Set the terminal baud rate to 115200 and select the newline terminator. An external +/- 15V power supply is required to power the circuit. 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. Explanation of Commands: 1- Select DAC: Select one of eight DACs to test : 0 to 7 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 shut down are preserved. 6- Set reference mode, either internal or external: Selecting external mode powers down the internal reference voltage. It is the users responsibility to apply a 2.5v reference. 7- Set SoftSpan: There are four options. In external mode, it is the users responsibility to compensate for the desired voltage. 8- Toggle Selected Word: Switch between register A or B for DAC code. 9- Set MUX: Enables / disables the MUX and sets the channel. 10- Global Toggle Bit Settings - Enabling this feature sets the DAC to toggle from register A(when TGL pin is LOW) and register b(when TGL pin is HIGH). TGL pin is set HIGH with an internal pull up when the global toggle bit is set, and TGL pin is set LOW with an internal pull down when the global toggle bit is not set. 11- Enable, disable, or store to EEPROM: To store to EEROM ensure all registers are set to their desired settings. Next, go to the store setting EEPROM menu and select it. Upon Linduino power up, the previously stored settings will be restored. 12- Voltage Ramp: Sets a voltage ramp to all the channels. CH0 = 0V, CH1 = 0.1V, CH2 = 0.2V, CH3 = 0.4V, ect. USER INPUT DATA FORMAT: decimal : 1024 hex : 0x400 octal : 02000 (leading 0 "zero") binary : B10000000000 float : 1024.0
http://www.linear.com/product/LTC2666
http://www.linear.com/product/LTC2666#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 DC2196A.ino.
Go to the source code of this file.
Data Structures | |
union | eeprom_data_union |
Used to manipulate EEPROM data. More... | |
struct | eeprom_data_union::data_struct_type |
EEPROM data structure. More... | |
Functions | |
static void | restore_dac_from_eeprom () |
Read the alert settings from EEPROM. More... | |
static void | print_title () |
Prints the title block when program first starts. More... | |
static void | print_prompt (int8_t selected_dac) |
Prints main menu. More... | |
static int16_t | prompt_voltage_or_code (uint8_t selected_dac) |
Prompt user to enter a voltage or digital code to send to DAC. More... | |
static uint16_t | get_voltage (uint8_t selected_dac) |
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 void | menu_1_select_dac (uint8_t *selected_dac) |
Select which DAC to operate on. More... | |
static void | menu_2_write_to_input_register (uint8_t selected_dac) |
Write data to input register, but do not update DAC output. More... | |
static void | menu_3_write_and_update_dac (uint8_t selected_dac) |
Write data to DAC register (which updates output immediately) More... | |
static void | menu_4_update_power_up_dac (uint8_t selected_dac) |
Update DAC with data that is stored in input register, power up if sleeping. More... | |
static void | menu_5_power_down_dac (uint8_t selected_dac) |
Power down DAC. More... | |
static void | menu_6_set_reference_mode (void) |
Set reference mode. More... | |
static void | menu_7_set_softspan_range (uint8_t selected_dac) |
Set SoftSpan Range. More... | |
static void | menu_8_toggle_select_word () |
Enter toggle select word, which also sets the register that will be written if bit is 0, register A is written, if 1, register B is written. More... | |
static void | menu_9_set_mux () |
Enable / Disable and sets the channel for the MUX. More... | |
static void | menu_10_global_toggle_settings () |
Enable / Disable the global toggle bit. More... | |
static void | menu_11_enable_disable_eeprom_restore () |
Enable / Disable restoration of DAC values from EEPROM Use with caution - behaviour is undefined if you enable restoration and data has NOT been previously stored from a known state. More... | |
static void | menu_12_voltage_ramp () |
Sets a voltage ramp to all the channels. More... | |
static void | menu_13_settling_test () |
static void | menu_14_demo_board_test () |
static void | menu_15_loopback_test () |
static void | setup () |
Initialize Linduino. More... | |
static void | loop () |
Repeats Linduino loop. More... | |
Macros | |
#define | REF_EXTERNAL LTC2666_REF_DISABLE |
External mode. More... | |
#define | REF_INTERNAL 0 |
Internal mode. More... | |
#define | INTEGRATOR_CONTROL 2 |
#define | SETTLE_TRIGGER 3 |
#define | SETTLE_CHANNEL 0 |
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... | |
eeprom_data_union | eeprom |
|
static |
Get code to send to DAC directly, in decimal, hex, or binary.
Definition at line 853 of file DC2196A.ino.
|
static |
Get voltage from user input, calculate DAC code based on lsb, offset.
Definition at line 831 of file DC2196A.ino.
|
static |
Repeats Linduino loop.
Definition at line 214 of file DC2196A.ino.
|
static |
Enable / Disable the global toggle bit.
Definition at line 500 of file DC2196A.ino.
|
static |
Enable / Disable restoration of DAC values from EEPROM Use with caution - behaviour is undefined if you enable restoration and data has NOT been previously stored from a known state.
Definition at line 520 of file DC2196A.ino.
|
static |
Sets a voltage ramp to all the channels.
Definition at line 547 of file DC2196A.ino.
|
static |
Definition at line 576 of file DC2196A.ino.
|
static |
Definition at line 693 of file DC2196A.ino.
|
static |
Definition at line 775 of file DC2196A.ino.
|
static |
Select which DAC to operate on.
Definition at line 285 of file DC2196A.ino.
|
static |
Write data to input register, but do not update DAC output.
Definition at line 297 of file DC2196A.ino.
|
static |
Write data to DAC register (which updates output immediately)
Definition at line 334 of file DC2196A.ino.
|
static |
Update DAC with data that is stored in input register, power up if sleeping.
Definition at line 372 of file DC2196A.ino.
|
static |
Power down DAC.
Definition at line 382 of file DC2196A.ino.
|
static |
Set reference mode.
Definition at line 392 of file DC2196A.ino.
|
static |
Set SoftSpan Range.
Definition at line 418 of file DC2196A.ino.
|
static |
Enter toggle select word, which also sets the register that will be written if bit is 0, register A is written, if 1, register B is written.
Definition at line 452 of file DC2196A.ino.
|
static |
Enable / Disable and sets the channel for the MUX.
Definition at line 470 of file DC2196A.ino.
|
static |
Prints main menu.
Definition at line 881 of file DC2196A.ino.
|
static |
Prints the title block when program first starts.
Definition at line 866 of file DC2196A.ino.
|
static |
Prompt user to enter a voltage or digital code to send to DAC.
Definition at line 798 of file DC2196A.ino.
|
static |
Read the alert settings from EEPROM.
Definition at line 944 of file DC2196A.ino.
|
static |
Initialize Linduino.
Definition at line 194 of file DC2196A.ino.
#define INTEGRATOR_CONTROL 2 |
Definition at line 568 of file DC2196A.ino.
#define REF_EXTERNAL LTC2666_REF_DISABLE |
External mode.
Definition at line 133 of file DC2196A.ino.
#define REF_INTERNAL 0 |
Internal mode.
Definition at line 134 of file DC2196A.ino.
#define SETTLE_CHANNEL 0 |
Definition at line 573 of file DC2196A.ino.
#define SETTLE_TRIGGER 3 |
Definition at line 571 of file DC2196A.ino.
anonymous enum |
Used to keep track to print voltage or print code.
Enumerator | |
---|---|
PROMPT_VOLTAGE | 0 |
PROMPT_CODE | 1 |
Definition at line 187 of file DC2196A.ino.
|
static |
Set to 1 if the board is connected.
Definition at line 162 of file DC2196A.ino.
eeprom_data_union eeprom |
Definition at line 182 of file DC2196A.ino.