![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Linear Technology DC2692A Demonstration Board. More...
Linear Technology DC2692A Demonstration Board.
LTC2662: 5-Channel 16-/12-Bit 300mA SoftSpan Current Source DACs
NOTES Setup: Set the terminal baud rate to 115200 and select the newline terminator. An external +7V - 5V power supply is required to power the circuit. The program displays calculated currents which are based on the voltage of the reference used and Radj resistor, be it internal or external. A precision voltmeter is needed to verify the actual measured voltages against the calculated current 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 five DACs to test : 0 to 4 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 current. If a current 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. 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 1.25v reference. 7- Set SoftSpan: There are ten options. 8- Toggle Selected Word: Switch between register A or B for DAC code. 9- Set MUX: 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 th store setting EEPROM menu and select it. Upon Linduinos power up, the previously stored settings will be restored. USER INPUT DATA FORMAT: decimal : 1024 hex : 0x400 octal : 02000 (leading 0 "zero") binary : B10000000000 float : 1024.0
http://www.linear.com/product/LTC2662
http://www.linear.com/product/LTC2662#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 DC2692A.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_current_or_code (uint8_t selected_dac) |
Prompt user to enter a current or digital code to send to DAC. More... | |
static uint16_t | get_current (uint8_t selected_dac) |
Get current 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 | display_fault (uint8_t fault) |
Display fault conditions. More... | |
static void | menu_1_select_dac (uint8_t *selected_dac) |
Select which DAC to operate on. More... | |
static uint8_t | menu_2_write_to_input_register (uint8_t selected_dac) |
Write data to input register, but do not update DAC output. More... | |
static uint8_t | menu_3_write_and_update_dac (uint8_t selected_dac) |
Write data to DAC register (which updates output immediately) More... | |
static uint8_t | 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 uint8_t | menu_5_power_down_dac (uint8_t selected_dac) |
Power down DAC. More... | |
static uint8_t | menu_6_set_reference_mode (void) |
Set reference mode. More... | |
static uint8_t | menu_7_set_softspan_range (uint8_t selected_dac) |
Set SoftSpan Range. More... | |
static uint8_t | 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 uint8_t | menu_9_set_mux () |
Sets the channel for the MUX. More... | |
static uint8_t | 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_13_settling_test () |
static void | menu_14_demo_board_test () |
static void | setup () |
Initialize Linduino. More... | |
static void | loop () |
Repeats Linduino loop. More... | |
Macros | |
#define | REF_EXTERNAL LTC2662_REF_DISABLE |
External mode. More... | |
#define | REF_INTERNAL 0 |
Internal mode. More... | |
#define | INTEGRATOR_CONTROL 2 |
#define | SETTLE_TRIGGER 3 |
Enumerations | |
enum | { PROMPT_CURRENT = 0, PROMPT_CODE = 1 } |
Used to keep track to print current 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 |
Display fault conditions.
Definition at line 859 of file DC2692A.ino.
|
static |
Get code to send to DAC directly, in decimal, hex, or binary.
Definition at line 711 of file DC2692A.ino.
|
static |
Get current from user input, calculate DAC code based on lsb, offset.
Definition at line 681 of file DC2692A.ino.
|
static |
Repeats Linduino loop.
Definition at line 209 of file DC2692A.ino.
|
static |
Enable / Disable the global toggle bit.
Definition at line 531 of file DC2692A.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 553 of file DC2692A.ino.
|
static |
Definition at line 898 of file DC2692A.ino.
|
static |
Definition at line 582 of file DC2692A.ino.
|
static |
Select which DAC to operate on.
Definition at line 276 of file DC2692A.ino.
|
static |
Write data to input register, but do not update DAC output.
Definition at line 289 of file DC2692A.ino.
|
static |
Write data to DAC register (which updates output immediately)
Definition at line 329 of file DC2692A.ino.
|
static |
Update DAC with data that is stored in input register, power up if sleeping.
Definition at line 370 of file DC2692A.ino.
|
static |
|
static |
|
static |
|
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 469 of file DC2692A.ino.
|
static |
|
static |
Prints main menu.
Definition at line 739 of file DC2692A.ino.
|
static |
Prints the title block when program first starts.
Definition at line 724 of file DC2692A.ino.
|
static |
Prompt user to enter a current or digital code to send to DAC.
Definition at line 648 of file DC2692A.ino.
|
static |
Read the alert settings from EEPROM.
Definition at line 815 of file DC2692A.ino.
|
static |
Initialize Linduino.
Definition at line 189 of file DC2692A.ino.
#define INTEGRATOR_CONTROL 2 |
Definition at line 892 of file DC2692A.ino.
#define REF_EXTERNAL LTC2662_REF_DISABLE |
External mode.
Definition at line 128 of file DC2692A.ino.
#define REF_INTERNAL 0 |
Internal mode.
Definition at line 129 of file DC2692A.ino.
#define SETTLE_TRIGGER 3 |
Definition at line 895 of file DC2692A.ino.
anonymous enum |
Used to keep track to print current or print code.
Enumerator | |
---|---|
PROMPT_CURRENT | 0 |
PROMPT_CODE | 1 |
Definition at line 182 of file DC2692A.ino.
|
static |
Set to 1 if the board is connected.
Definition at line 157 of file DC2692A.ino.
eeprom_data_union eeprom |
Definition at line 177 of file DC2692A.ino.