Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

Linear Technology DC2218A Demonstration Board. More...

Detailed Description

Linear Technology DC2218A Demonstration Board.

LT3965 - 8-Switch Matrix LED Dimmer

  Setup:

   Follow the procedure below:
  1.  Set the PATTERN SELECT rotary switch S1 to any position between 0 and 6.
      Position 7 is reserved for use with the GUI (graphical user interface).
  2.  Connect 12V power to either the EMIVIN and GND banana jacks or to the
      J7 2.1mm (inside diameter) barrel jack.
  3.  Observe the red LED indicator light (D32). When it begins flashing,
      then the board is ready to start up.
  4.  When the red LED (D32) is flashing, push the Start button S3.
  5.  Observe the LED patterns and adjust the speed, brightness and pattern of
      the LEDs with the manual blue potentiometer R14.
  6.  Change the Pattern Select rotary switch to positions 0-6 to observe
      different patterns.
  7.  Press the Reset button S2 to start over again.



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

http://www.linear.com/product/LT3965

http://www.linear.com/product/LT3965#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 DC2218A.ino.

Go to the source code of this file.

Functions

static void fadewave ()
 Using the PWM dim WITH FADE commands, a wave of light is created by fading the LED brightnesses up and down. More...
 
static void analog ()
 Func Desc: All LEDs lighted up to the same level depending on pot value. More...
 
static void sidebend ()
 Func Desc: Varying number of brightened LEDs depending on pot. More...
 
static void sidebendAuto ()
 All sixteen LEDs adjust PWM dimming duty cycle and brightness based upon the position of the steering wheel (interactive potentiometer). More...
 
static void dazzle ()
 Consecutive LEDs alternate fading up and down. More...
 
static void pulse ()
 
static void wave ()
 A wave of light from right to left and from left to right changing PWM dimming brightness quickly increasing and decreasing at rates that look like a wave running from one side of the LEDs to the other. More...
 
static void steeringRightAndLeft ()
 Center headlight LEDs stay on to face directly forward while the right and left side LEDs turn on with brightness proportional to the amount that the steering wheel (interactive potentiometer) is turned. More...
 
static void sectionalBlanking ()
 All LEDs are illluminated to full brightness simulating a car with its high-beams turned on. More...
 
static void orbit ()
 LEDs illuminate around the outside of the board, giving the effect of a comet with a tail traveling around the board. More...
 
static void GraphicUI ()
 Function to talk to GUI. More...
 
static int readpot (void)
 Performs an analog read on the potentiometer pin using hysteresis to reduce variation in ADC values. More...
 
static void setThresh ()
 Sets the short circuit and open circuit thresholds defined for DC2218A. More...
 
static void LT3965_i2c_enable ()
 
static void setup ()
 Initialize Linduino. More...
 
static void loop ()
 Repeats Linduino loop. More...
 
static int8_t write_bytes (uint8_t size, uint8_t byte1, uint8_t byte2, uint8_t byte3)
 Function to write I2C bytes which are received from GUI. More...
 
static int8_t read_bytes (uint8_t size, uint8_t byte1, uint8_t byte2, uint8_t byte3)
 Function to read I2C bytes depending on the bytes received from GUI. More...
 
static void analogAuto ()
 Func Desc: All LEDs illuminated to the same brightness level depending on potentiometer value. More...
 

Variables

static uint8_t updown
 
static int lastread
 
static int currentread
 
static int16_t An2
 
static int16_t An1
 
static int16_t An0
 
static uint8_t inputByte_0
 
static uint8_t inputByte_1
 
static uint8_t inputByte_2
 
static uint8_t inputByte_3
 
static uint8_t inputByte_4
 
static uint8_t input
 
static uint8_t fade
 
static int set = 0
 
static uint8_t values [4]
 
bool startsequence = FALSE
 
static uint8_t startup = 0
 
long interval = 250
 
long previousTime = 0
 
static uint8_t ledState
 

Function Documentation

◆ analog()

static void analog ( )
static

Func Desc: All LEDs lighted up to the same level depending on pot value.

Definition at line 1562 of file DC2218A.ino.

◆ analogAuto()

static void analogAuto ( )
static

Func Desc: All LEDs illuminated to the same brightness level depending on potentiometer value.

Definition at line 502 of file DC2218A.ino.

◆ dazzle()

static void dazzle ( )
static

Consecutive LEDs alternate fading up and down.

Speed of fading controlled by the position of the potentiometer.

Definition at line 806 of file DC2218A.ino.

◆ fadewave()

static void fadewave ( )
static

Using the PWM dim WITH FADE commands, a wave of light is created by fading the LED brightnesses up and down.

WITH FADE option uses the logarithmic fade function of the LT3965 and allows the brightness to fade from low to high or from high to low with a single I2C bus command. This pattern has low bus traffic.

Definition at line 2353 of file DC2218A.ino.

◆ GraphicUI()

static void GraphicUI ( )
static

Function to talk to GUI.

Definition at line 379 of file DC2218A.ino.

◆ loop()

static void loop ( void  )
static

Repeats Linduino loop.

Definition at line 237 of file DC2218A.ino.

◆ LT3965_i2c_enable()

static void LT3965_i2c_enable ( )
static

Definition at line 129 of file DC2218A.ino.

◆ orbit()

static void orbit ( )
static

LEDs illuminate around the outside of the board, giving the effect of a comet with a tail traveling around the board.

The traveling speed of the comet is controlled by the posititon of the potentiometer. The pattern will continue running after the pattern select switch is changed from this position until the orbit() function has completed its pattern.

Definition at line 1715 of file DC2218A.ino.

◆ pulse()

static void pulse ( )
static

◆ read_bytes()

static int8_t read_bytes ( uint8_t  size,
uint8_t  byte1,
uint8_t  byte2,
uint8_t  byte3 
)
static

Function to read I2C bytes depending on the bytes received from GUI.

Definition at line 335 of file DC2218A.ino.

◆ readpot()

static int readpot ( void  )
static

Performs an analog read on the potentiometer pin using hysteresis to reduce variation in ADC values.

This prevents the read value of the potentiomter from bouncing between different values when the potentiometer is not being moved.

Definition at line 2968 of file DC2218A.ino.

◆ sectionalBlanking()

static void sectionalBlanking ( )
static

All LEDs are illluminated to full brightness simulating a car with its high-beams turned on.

Two LEDs will turn off creating a blank zone. This pattern shows how segments of a high-beam LED cluster can be turned off to avoid blinding oncomming traffic.

Definition at line 991 of file DC2218A.ino.

◆ setThresh()

static void setThresh ( )
static

Sets the short circuit and open circuit thresholds defined for DC2218A.

This function performs a series of single channel and all channel writes to ensure that threshold registers are set, as well as ensuring all fault registers are cleared.

Definition at line 3005 of file DC2218A.ino.

◆ setup()

static void setup ( void  )
static

Initialize Linduino.

Definition at line 137 of file DC2218A.ino.

◆ sidebend()

static void sidebend ( )
static

Func Desc: Varying number of brightened LEDs depending on pot.

Definition at line 1256 of file DC2218A.ino.

◆ sidebendAuto()

static void sidebendAuto ( )
static

All sixteen LEDs adjust PWM dimming duty cycle and brightness based upon the position of the steering wheel (interactive potentiometer).

This pattern represents a light that bends around the side of a car, projecting a turning headlight pattern that is linked to the steering wheel.

Definition at line 594 of file DC2218A.ino.

◆ steeringRightAndLeft()

static void steeringRightAndLeft ( )
static

Center headlight LEDs stay on to face directly forward while the right and left side LEDs turn on with brightness proportional to the amount that the steering wheel (interactive potentiometer) is turned.

Definition at line 856 of file DC2218A.ino.

◆ wave()

static void wave ( )
static

A wave of light from right to left and from left to right changing PWM dimming brightness quickly increasing and decreasing at rates that look like a wave running from one side of the LEDs to the other.

The interactive potentiometer controls the speed of the wave.

Definition at line 2460 of file DC2218A.ino.

◆ write_bytes()

static int8_t write_bytes ( uint8_t  size,
uint8_t  byte1,
uint8_t  byte2,
uint8_t  byte3 
)
static

Function to write I2C bytes which are received from GUI.

Definition at line 305 of file DC2218A.ino.

Variable Documentation

◆ An0

int16_t An0
static

Definition at line 107 of file DC2218A.ino.

◆ An1

int16_t An1
static

Definition at line 107 of file DC2218A.ino.

◆ An2

int16_t An2
static

Definition at line 107 of file DC2218A.ino.

◆ currentread

int currentread
static

Definition at line 103 of file DC2218A.ino.

◆ fade

uint8_t fade
static

Definition at line 115 of file DC2218A.ino.

◆ input

uint8_t input
static

Definition at line 114 of file DC2218A.ino.

◆ inputByte_0

uint8_t inputByte_0
static

Definition at line 108 of file DC2218A.ino.

◆ inputByte_1

uint8_t inputByte_1
static

Definition at line 109 of file DC2218A.ino.

◆ inputByte_2

uint8_t inputByte_2
static

Definition at line 110 of file DC2218A.ino.

◆ inputByte_3

uint8_t inputByte_3
static

Definition at line 111 of file DC2218A.ino.

◆ inputByte_4

uint8_t inputByte_4
static

Definition at line 112 of file DC2218A.ino.

◆ interval

long interval = 250

Definition at line 122 of file DC2218A.ino.

◆ lastread

int lastread
static

Definition at line 102 of file DC2218A.ino.

◆ ledState

uint8_t ledState
static

Definition at line 124 of file DC2218A.ino.

◆ previousTime

long previousTime = 0

Definition at line 123 of file DC2218A.ino.

◆ set

int set = 0
static

Definition at line 116 of file DC2218A.ino.

◆ startsequence

bool startsequence = FALSE

Definition at line 119 of file DC2218A.ino.

◆ startup

uint8_t startup = 0
static

Definition at line 121 of file DC2218A.ino.

◆ updown

uint8_t updown
static

Definition at line 101 of file DC2218A.ino.

◆ values

uint8_t values[4]
static

Definition at line 117 of file DC2218A.ino.