88 {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},
89 {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},
100 int8_t address_shift;
103 address_shift =(address << 1) | 0x01;
120 int bit_shift,
i, num_reg;
121 long field_val, maskbits, pow2;
128 bit_shift = (MSB_loc+1)- (numbits-num_reg*8);
129 field_val=
LTC6953_read(cs, (address+num_reg))+(field_val<<8);
132 while ((bit_shift<0) && (num_reg<4));
137 for (i=1, maskbits=1; i<numbits; i++)
140 maskbits = maskbits+pow2;
143 field_val=(field_val >>bit_shift) &maskbits;
179 address=address << 1;
193 long current_content, desired_content, reg_val;
194 int LSB_loc,
i, j, num_reg, bit_shift;
197 for (i=0; i<32 ; i++) temp_arr[i]=0;
204 bit_shift=(MSB_loc+1)-(numbits-num_reg*8);
205 current_content=
LTC6953_read(cs, (address+num_reg)) + (current_content<<8);
209 while ((bit_shift<0) && (num_reg<4));
210 for (i=0; i<(8*num_reg); i++)
212 temp_arr[
i]=(current_content>>
i) & 1;
216 LSB_loc = 8*(num_reg-1)+MSB_loc-numbits+1;
217 for (i=LSB_loc, j=0; i<=(MSB_loc+(num_reg-1)*8); i++, j++)
219 temp_arr[
i] = (field_data>>j) &1;
224 for (i=0; i<(8*num_reg); i++)
226 desired_content = desired_content | (temp_arr[
i]<<
i);
230 for (i=0; i<num_reg; i++)
232 reg_val = (desired_content >> 8*(num_reg-1-
i)) & 0xff;
306 uint8_t val_reg2, val_reg3, val_regA;
312 *rx = SPI.transfer(val_temp);
316 *rx = SPI.transfer(val_temp);
#define LTC6953_PD2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_ADEL5
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SRQEN2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_ADEL8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_DDEL4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SRQMD
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_OINV9
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_OINV10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_DDEL0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_PD3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_FILTV
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SSRQ
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_PD1
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SRQEN4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MP4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_ADEL9
for spi_map array, defines location for field specific information used to create the spi map ...
LTC6953: Ultra-Low Jitter, JESD204B Clock Distributor with Eleven Programmable Outputs.
#define LTC6953_MD8
for spi_map array, defines location for field specific information used to create the spi map ...
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
#define LTC6953_DDEL2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SRQEN5
for spi_map array, defines location for field specific information used to create the spi map ...
#define output_high(pin)
Set "pin" high.
#define LTC6953_MD5
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_POR
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MODE3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SRQEN7
for spi_map array, defines location for field specific information used to create the spi map ...
Header File for Linduino Libraries and Demo Code.
uint8_t LTC6953_reg[LTC6953_NUM_REGADDR]
number of LTC6953 spi addresses
#define LTC6953_PD8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MD3
for spi_map array, defines location for field specific information used to create the 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.
#define LTC6953_DDEL3
for spi_map array, defines location for field specific information used to create the spi map ...
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/fiel...
#define LTC6953_OINV0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_DDEL9
for spi_map array, defines location for field specific information used to create the spi map ...
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 loca...
#define LTC6953_PDVCOPK
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_ADEL6
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MD9
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_TEMPO
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_DDEL8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_nVCOOK
for spi_map array, defines location for field specific information used to create the spi map ...
void LTC6953_write(uint8_t cs, uint8_t address, uint8_t Data)
LTC6953 Write Single Address writes 8 bit Data field to LTC6953.
#define LTC6953_EZMD
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MD7
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_ADEL3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MD2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_DDEL10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MD10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_ADEL0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_OINV2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_OINV7
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SRQEN9
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MD6
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_PDALL
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_DDEL6
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SRQEN6
for spi_map array, defines location for field specific information used to create the spi map ...
void set_LTC6953_REGS_lkup_tbl(uint8_t lkup_tbl_row)
Writes values to ALL LTC6953 RW addresses from a look-up table.
uint16_t LT_uint16
16-bit unsigned integer to be converted to two bytes
#define LTC6953_MP10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MP6
for spi_map array, defines location for field specific information used to create the spi map ...
#define output_low(pin)
Set "pin" low.
#define LTC6953_OINV5
for spi_map array, defines location for field specific information used to create the spi map ...
void spi_transfer_word(uint8_t cs_pin, uint16_t tx, uint16_t *rx)
Reads and sends a word.
#define LTC6953_ADEL4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_OINV3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_NUM_REGADDR
Defines number of LTC6953 SPI registers, used in spi_map array.
#define LTC6953_MODE4
for spi_map array, defines location for field specific information used to create the spi map ...
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/f...
#define LTC6953_MODE7
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_PD5
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SRQEN0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_x
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_NUM_REGFIELD
Defines number of LTC6953 SPI fields, used in spi_map array.
#define LTC6953_OINV1
for spi_map array, defines location for field specific information used to create the spi map ...
LT_SPI: Routines to communicate with ATmega328P's hardware SPI port.
#define LTC6953_MD0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_PD0
for spi_map array, defines location for field specific information used to create the spi map ...
uint8_t get_LTC6953_SPI_FIELD_NUMBITS(uint8_t f)
returns the number of bits for a given field name in the SPI map
#define LTC6953_OINV8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MP1
for spi_map array, defines location for field specific information used to create the spi map ...
#define ADDRx
used for 2nd dim of 2d spi_map array
void LTC6953_init()
Initializes the SPI MAP arrays The values set in initialization are used for all the LTC6953 SPI/WRIT...
#define LTC6953_MP2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MP3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_DDEL7
for spi_map array, defines location for field specific information used to create the spi map ...
uint8_t LTC6953_lkup_tbl[2][LTC6953_NUM_REGADDR]
created with the LTC6952Wizard tool
#define LTC6953_INVSTAT
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_PD4
for spi_map array, defines location for field specific information used to create the spi map ...
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 add...
#define LTC6953_PD6
for spi_map array, defines location for field specific information used to create the spi map ...
char demo_name[]
Demo Board Name stored in QuikEval EEPROM.
#define LTC6953_MD1
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SRQEN8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_ADEL10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_ADEL1
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MP5
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MODE6
for spi_map array, defines location for field specific information used to create the spi map ...
This union splits one int16_t (16-bit signed integer) or uint16_t (16-bit unsigned integer) into two ...
#define LTC6953_MP7
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MODE8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MD4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SRQEN3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MP0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_PD10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_VCOOK
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_PD7
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MP8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_REV
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_PART
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MODE1
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SRQEN10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MODE10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_CS
Define the SPI CS pin.
uint8_t get_LTC6953_REGSIZE()
returns # of addresses in parts register map (array size)
#define LTC6953_ADEL7
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_OINV4
for spi_map array, defines location for field specific information used to create the spi map ...
uint8_t LT_byte[2]
2 bytes (unsigned 8-bit integers) to be converted to a 16-bit signed or unsigned integer ...
#define LTC6953_MODE9
for spi_map array, defines location for field specific information used to create the spi map ...
#define QUIKEVAL_CS
QuikEval CS pin (SPI chip select on QuikEval connector pin 6) connects to Arduino SS pin...
#define LTC6953_MODE0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_OINV6
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_SRQEN1
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MP9
for spi_map array, defines location for field specific information used to create the spi map ...
uint8_t read_quikeval_id_string(char *buffer)
Read the id string from the EEPROM, then parse the product name, demo board name, and demo board opti...
char ui_buffer[UI_BUFFER_SIZE]
#define LTC6953_ADEL2
for spi_map array, defines location for field specific information used to create the spi map ...
int8_t discover_demo_board_local(char *demo_name)
Read the ID string from the EEPROM and determine if any demo board is connected.
#define LTC6953_DDEL5
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_DDEL1
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MODE2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_MODE5
for spi_map array, defines location for field specific information used to create the spi map ...
uint8_t LTC6953_read(uint8_t cs, int8_t address)
LTC6953 Read Single Address reads 8 bit Data field to LTC6953.
#define LTC6953_SYSCT
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6953_PD9
for spi_map array, defines location for field specific information used to create the spi map ...
#define DxMSB
used for 2nd dim of 2d spi_map array