Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

Library for LTC6953: Ultra-Low Jitter, JESD204B Clock Distributor with Eleven Programmable Outputs. More...

Detailed Description

Library for LTC6953: Ultra-Low Jitter, JESD204B Clock Distributor with Eleven Programmable Outputs.

Definition in file LTC6953.cpp.

Go to the source code of this file.

Functions

uint8_t LTC6953_read (uint8_t cs, int8_t address)
 LTC6953 Read Single Address reads 8 bit Data field to LTC6953. More...
 
long LTC6953_read_field (uint8_t cs, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
 LTC6953 Read Single Field For SPI FIELDS located in 1 or multiple address location reads specific address locations identifies and returns specific field in question can handle SPI fields in multiple addresses, if MSB bit is in the lower number address. More...
 
long get_LTC6953_SPI_FIELD (uint8_t cs, uint8_t f)
 Gets the LTC6953 SPI field value calls function LTC6953_read_field, which reads specific address locations identifies and returns specific field in question can handle SPI fields in multiple addresses, if MSB bit is in the lower number address. More...
 
void LTC6953_write (uint8_t cs, uint8_t address, uint8_t Data)
 LTC6953 Write Single Address writes 8 bit Data field to LTC6953. More...
 
uint8_t LTC6953_write_field (uint8_t cs, long field_data, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
 LTC6953 Write Single Field For SPI FIELDS in 1 or multiple address locations reads specific address/field location then writes to specific field can handle SPI fields in multiple addresses, if MSB bit is in the lower number address. More...
 
uint8_t get_LTC6953_REGSIZE ()
 returns # of addresses in parts register map (array size) More...
 
uint8_t get_LTC6953_SPI_FIELD_NUMBITS (uint8_t f)
 returns the number of bits for a given field name in the SPI map More...
 
uint8_t get_LTC6953_SPI_FIELD_RW (uint8_t f)
 returns if the given field name is (0)read/write or (1)read_only field More...
 
void set_LTC6953_SPI_FIELD (uint8_t cs, uint8_t f, long field_data)
 Sets the LTC6953 SPI field value calls function LTC6953_read_field, which reads specific address/field location then writes to specific field can handle SPI fields in multiple addresses, if MSB bit is in the lower number address. More...
 
void set_LTC6953_REGS_lkup_tbl (uint8_t lkup_tbl_row)
 Writes values to ALL LTC6953 RW addresses from a look-up table. More...
 
void LTC6953_init ()
 Initializes the SPI MAP arrays The values set in initialization are used for all the LTC6953 SPI/WRITE and read functions (set_LTC6953_SPI_FIELD, get_LTC6953_SPI_FIELD, LTC6953_read, LTC6953_write, etc, etc) More...
 
int8_t discover_demo_board_local (char *demo_name)
 Read the ID string from the EEPROM and determine if any demo board is connected. More...
 

Variables

uint8_t LTC6953_reg [LTC6953_NUM_REGADDR]
 number of LTC6953 spi addresses More...
 
uint16_t LTC6953_spi_map [(LTC6953_NUM_REGFIELD+1)]
 LTC6953 spi map, AAAA AAAA RMMM NNNN; A= ADDR LOC, R=R or RW, M = MSB bit location, N = field length. More...
 
uint8_t LTC6953_lkup_tbl [2][LTC6953_NUM_REGADDR]
 created with the LTC6952Wizard tool More...
 

Function Documentation

◆ discover_demo_board_local()

int8_t discover_demo_board_local ( char *  demo_name)

Read the ID string from the EEPROM and determine if any demo board is connected.

Returns 1 if successful, 0 if not successful

Definition at line 470 of file LTC6953.cpp.

◆ get_LTC6953_REGSIZE()

uint8_t get_LTC6953_REGSIZE ( )

returns # of addresses in parts register map (array size)

Returns
# of addresses in parts register map

Definition at line 242 of file LTC6953.cpp.

◆ get_LTC6953_SPI_FIELD()

long get_LTC6953_SPI_FIELD ( uint8_t  cs,
uint8_t  f 
)

Gets the LTC6953 SPI field value calls function LTC6953_read_field, which reads specific address locations identifies and returns specific field in question can handle SPI fields in multiple addresses, if MSB bit is in the lower number address.

Returns
data that was read from field
Parameters
csChip Select Pin
fSPI field number

Definition at line 154 of file LTC6953.cpp.

◆ get_LTC6953_SPI_FIELD_NUMBITS()

uint8_t get_LTC6953_SPI_FIELD_NUMBITS ( uint8_t  f)

returns the number of bits for a given field name in the SPI map

Returns
the number of bits for a given field name in the SPI map
Parameters
fSPI field number

Definition at line 252 of file LTC6953.cpp.

◆ get_LTC6953_SPI_FIELD_RW()

uint8_t get_LTC6953_SPI_FIELD_RW ( uint8_t  f)

returns if the given field name is (0)read/write or (1)read_only field

Returns
if the given field is a (0)read/write or (1)read_only field
Parameters
fSPI field number

Definition at line 265 of file LTC6953.cpp.

◆ LTC6953_init()

void LTC6953_init ( )

Initializes the SPI MAP arrays The values set in initialization are used for all the LTC6953 SPI/WRITE and read functions (set_LTC6953_SPI_FIELD, get_LTC6953_SPI_FIELD, LTC6953_read, LTC6953_write, etc, etc)

Returns
void

Definition at line 353 of file LTC6953.cpp.

◆ LTC6953_read()

uint8_t LTC6953_read ( uint8_t  cs,
int8_t  address 
)

LTC6953 Read Single Address reads 8 bit Data field to LTC6953.

has to shift data by one bit to account for RW bit

Returns
data that was read from address
Parameters
csChip Select Pin
addressRegister address for the LTC6953.

Definition at line 98 of file LTC6953.cpp.

◆ LTC6953_read_field()

long LTC6953_read_field ( uint8_t  cs,
uint8_t  address,
uint8_t  MSB_loc,
uint8_t  numbits 
)

LTC6953 Read Single Field For SPI FIELDS located in 1 or multiple address location reads specific address locations identifies and returns specific field in question can handle SPI fields in multiple addresses, if MSB bit is in the lower number address.

Returns
data that was read from field
Parameters
csChip Select Pin
addressRegister address for the LTC6953.
MSB_locMSB bit location of field
numbitslength of field (i.e. number of bits in field)

Definition at line 118 of file LTC6953.cpp.

◆ LTC6953_write()

void LTC6953_write ( uint8_t  cs,
uint8_t  address,
uint8_t  Data 
)

LTC6953 Write Single Address writes 8 bit Data field to LTC6953.

has to shift data by one bit to account for RW bit

Returns
void
Parameters
csChip Select Pin
addressRegister address for the LTC6953.
Data8-bit data to be written to register

Definition at line 175 of file LTC6953.cpp.

◆ LTC6953_write_field()

uint8_t LTC6953_write_field ( uint8_t  cs,
long  field_data,
uint8_t  address,
uint8_t  MSB_loc,
uint8_t  numbits 
)

LTC6953 Write Single Field For SPI FIELDS in 1 or multiple address locations reads specific address/field location then writes to specific field can handle SPI fields in multiple addresses, if MSB bit is in the lower number address.

Returns
void
Parameters
csChip Select Pin
field_dataValue field value to be set to
addressRegister address for the LTC6953.
MSB_locMSB bit location of field
numbitslength of field (i.e. number of bits in field)

Definition at line 191 of file LTC6953.cpp.

◆ set_LTC6953_REGS_lkup_tbl()

void set_LTC6953_REGS_lkup_tbl ( uint8_t  lkup_tbl_row)

Writes values to ALL LTC6953 RW addresses from a look-up table.

  • uses the Multi-byte write option for more efficient data transfer
  • Either SPI Syncs or recommends the use to SYNC pin based on RAO value
    Returns
    void
Parameters
lkup_tbl_rowAny number 0-2, lookup table has 2 options

Definition at line 303 of file LTC6953.cpp.

◆ set_LTC6953_SPI_FIELD()

void set_LTC6953_SPI_FIELD ( uint8_t  cs,
uint8_t  f,
long  field_data 
)

Sets the LTC6953 SPI field value calls function LTC6953_read_field, which reads specific address/field location then writes to specific field can handle SPI fields in multiple addresses, if MSB bit is in the lower number address.

Returns
void
Parameters
csChip Select Pin
fSPI field number
field_dataValue field value to be set to

Definition at line 281 of file LTC6953.cpp.

Variable Documentation

◆ LTC6953_lkup_tbl

uint8_t LTC6953_lkup_tbl[2][LTC6953_NUM_REGADDR]
Initial value:
=
{
{0x25, 0x04, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x8c, 0xe0, 0x1b, 0x00, 0x40, 0x80, 0x24, 0x00, 0x8c, 0xe0, 0x1b, 0x00, 0x40, 0x80, 0x24, 0x00, 0x8c, 0xe0, 0x00, 0x00, 0x89, 0x80, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0xe0, 0x23, 0x00, 0x00, 0x80, 0x24, 0x00, 0x8c, 0xe0, 0x23, 0x00, 0x00, 0x80, 0x24, 0x00, 0x13},
{0x25, 0x04, 0x00, 0xf0, 0xf0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13},
}

created with the LTC6952Wizard tool

LTC6953 Configuration look-up table

Definition at line 86 of file LTC6953.cpp.

◆ LTC6953_reg

uint8_t LTC6953_reg[LTC6953_NUM_REGADDR]

number of LTC6953 spi addresses

Definition at line 83 of file LTC6953.cpp.

◆ LTC6953_spi_map

uint16_t LTC6953_spi_map[(LTC6953_NUM_REGFIELD+1)]

LTC6953 spi map, AAAA AAAA RMMM NNNN; A= ADDR LOC, R=R or RW, M = MSB bit location, N = field length.

Definition at line 84 of file LTC6953.cpp.