Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

Linear Technology DC2222AB Demonstration Board. More...

Detailed Description

Linear Technology DC2222AB Demonstration Board.

LTC2508: 32-Bit Over-Sampling ADC with Configurable Digital Filter

NOTES

   Set the terminal baud rate to 115200 and select the newline terminator.
   Provide an external voltage supply of +/-9V or 10 V.
   QUIKEVAL_GPIO is connected to the SYNC pin.
   16 bits of configuration data: 1 0 0 0   0 0 0 0   0 SEL0 SEL1 0   0 0 0 0

   Steps involved:
   1. Set I2C mode on QuikEval connector.
   2. Send configuration data through sneaker port to set DF.
   3. Send a SYNC pulse.
   4. Set SPI mode on QuikEval connector.
   5. Send DF number of MCLK pulses.
   6. Read data out through SPI.

  Explanation of Commands:

   Option 1: Read 40 bits of data and calculate input analog voltage.
   Option 2: Set the DF value for filter.
   Option 3: Set the reference voltage.

USER INPUT DATA FORMAT:
 decimal : 1024
 hex     : 0x400
 octal   : 02000  (leading 0 "zero")
 binary  : B10000000000
 float   : 1024.0

http://www.linear.com/product/LTC2508-32

http://www.linear.com/product/LTC2508-32#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:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  • The use of this software may or may not infringe the patent rights of one or more patent holders. This license does not release you from the requirement that you obtain separate licenses from these patent holders to use this software.
  • Use of the software either in source or binary form, must be run on or directly connected to an Analog Devices Inc. component.

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 DC2222AB.ino.

Go to the source code of this file.

Functions

static void sneaker_port_init ()
 Send configuration data through sneaker port. More...
 
static void initialise_i2c_data (uint16_t value, uint8_t i2c_data[48])
 
static int8_t i2c_write_block_data_no_command (uint8_t address, uint8_t length, uint8_t *values)
 
static uint16_t decode_DF_value (uint8_t byte0)
 
static float code_to_voltage (uint8_t rx[5])
 
static void setup ()
 
static void loop ()
 
static void menu_1_read_voltage ()
 Displays the ADC output and calculated voltage. More...
 
static void menu_2_change_DF ()
 Function to change the DF value for filter. More...
 
static void menu_3_set_VREF ()
 Function to change the voltage reference. More...
 
static void print_title ()
 Prints the title block when program first starts. More...
 
static void print_prompt ()
 Prints main menu. More...
 

Variables

static float VREF = 5.0
 
static uint16_t global_config_data = CONFIG_DF_1024
 
static uint16_t num_of_mclk_pulses = 1024
 

Function Documentation

◆ code_to_voltage()

static float code_to_voltage ( uint8_t  rx[5])
static

◆ decode_DF_value()

static uint16_t decode_DF_value ( uint8_t  byte0)
static

◆ i2c_write_block_data_no_command()

static int8_t i2c_write_block_data_no_command ( uint8_t  address,
uint8_t  length,
uint8_t *  values 
)
static

◆ initialise_i2c_data()

static void initialise_i2c_data ( uint16_t  value,
uint8_t  i2c_data[48] 
)
static

Definition at line 242 of file DC2222AB.ino.

◆ loop()

static void loop ( void  )
static

Definition at line 116 of file DC2222AB.ino.

◆ menu_1_read_voltage()

static void menu_1_read_voltage ( )
static

Displays the ADC output and calculated voltage.

Definition at line 144 of file DC2222AB.ino.

◆ menu_2_change_DF()

static void menu_2_change_DF ( )
static

Function to change the DF value for filter.

Definition at line 165 of file DC2222AB.ino.

◆ menu_3_set_VREF()

static void menu_3_set_VREF ( )
static

Function to change the voltage reference.

Definition at line 198 of file DC2222AB.ino.

◆ print_prompt()

static void print_prompt ( )
static

Prints main menu.

Definition at line 297 of file DC2222AB.ino.

◆ print_title()

static void print_title ( void  )
static

Prints the title block when program first starts.

Definition at line 277 of file DC2222AB.ino.

◆ setup()

static void setup ( void  )
static

Definition at line 104 of file DC2222AB.ino.

◆ sneaker_port_init()

static void sneaker_port_init ( )
static

Send configuration data through sneaker port.

Send a SYNC pulse after configuration.

Definition at line 212 of file DC2222AB.ino.

Variable Documentation

◆ global_config_data

uint16_t global_config_data = CONFIG_DF_1024
static

Definition at line 93 of file DC2222AB.ino.

◆ num_of_mclk_pulses

uint16_t num_of_mclk_pulses = 1024
static

Definition at line 94 of file DC2222AB.ino.

◆ VREF

float VREF = 5.0
static

Definition at line 92 of file DC2222AB.ino.