90 {0x15, 0xaa, 0x08, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x28, 0x13, 0x06, 0x9c, 0xe0, 0x00, 0x00, 0x38, 0x81, 0x40, 0x00, 0x9c, 0xe0, 0x00, 0x00, 0x38, 0x81, 0x40, 0x00, 0x9c, 0xe0, 0x00, 0x00, 0xf8, 0x81, 0x40, 0x00, 0x99, 0x80, 0x00, 0x00, 0x9c, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x9c, 0xe0, 0x00, 0x00, 0x00, 0x81, 0x40, 0x00, 0x12},
91 {0x15, 0xaa, 0x08, 0xf0, 0xf0, 0x30, 0x0c, 0x01, 0x00, 0x28, 0x13, 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, 0x12},
102 int8_t address_shift;
105 address_shift =(address << 1) | 0x01;
122 int bit_shift,
i, num_reg;
123 long field_val, maskbits, pow2;
130 bit_shift = (MSB_loc+1)- (numbits-num_reg*8);
131 field_val=
LTC6952_read(cs, (address+num_reg))+(field_val<<8);
134 while ((bit_shift<0) && (num_reg<4));
139 for (i=1, maskbits=1; i<numbits; i++)
142 maskbits = maskbits+pow2;
145 field_val=(field_val >>bit_shift) &maskbits;
181 address=address << 1;
195 long current_content, desired_content, reg_val;
196 int LSB_loc,
i, j, num_reg, bit_shift;
199 for (i=0; i<32 ; i++) temp_arr[i]=0;
206 bit_shift=(MSB_loc+1)-(numbits-num_reg*8);
207 current_content=
LTC6952_read(cs, (address+num_reg)) + (current_content<<8);
211 while ((bit_shift<0) && (num_reg<4));
212 for (i=0; i<(8*num_reg); i++)
214 temp_arr[
i]=(current_content>>
i) & 1;
218 LSB_loc = 8*(num_reg-1)+MSB_loc-numbits+1;
219 for (i=LSB_loc, j=0; i<=(MSB_loc+(num_reg-1)*8); i++, j++)
221 temp_arr[
i] = (field_data>>j) &1;
226 for (i=0; i<(8*num_reg); i++)
228 desired_content = desired_content | (temp_arr[
i]<<
i);
232 for (i=0; i<num_reg; i++)
234 reg_val = (desired_content >> 8*(num_reg-1-
i)) & 0xff;
308 uint8_t val_reg2, val_reg3, val_regA;
314 *rx = SPI.transfer(val_temp);
318 *rx = SPI.transfer(val_temp);
#define LTC6952_MD1
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MD3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_SSRQ
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PD7
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_BST
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MP3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PD10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_DDEL2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_SRQEN1
for spi_map array, defines location for field specific information used to create the spi map ...
uint16_t LTC6952_spi_map[(LTC6952_NUM_REGFIELD+1)]
LTC6952 spi map, AAAA AAAA RMMM NNNN; A= ADDR LOC, R=R or RW, M = MSB bit location, N = field length.
#define LTC6952_OINV2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PD2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_ADEL9
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_OINV4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_OINV9
for spi_map array, defines location for field specific information used to create the spi map ...
uint8_t LTC6952_lkup_tbl[2][LTC6952_NUM_REGADDR]
created with the LTC6952Wizard tool
#define LTC6952_MODE6
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_CPRST
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_FILTR
for spi_map array, defines location for field specific information used to create the spi map ...
#define output_high(pin)
Set "pin" high.
#define LTC6952_PDPLL
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_ADEL2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_DDEL0
for spi_map array, defines location for field specific information used to create the spi map ...
uint8_t get_LTC6952_REGSIZE()
returns # of addresses in parts register map (array size)
#define LTC6952_MODE10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_SRQEN5
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_FILTV
for spi_map array, defines location for field specific information used to create the spi map ...
void set_LTC6952_REGS_lkup_tbl(uint8_t lkup_tbl_row)
Writes values to ALL LTC6952 RW addresses from a look-up table.
void LTC6952_write(uint8_t cs, uint8_t address, uint8_t Data)
LTC6952 Write Single Address writes 8 bit Data field to LTC6952.
#define LTC6952_UNLOCK
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_RD
for spi_map array, defines location for field specific information used to create the spi map ...
Header File for Linduino Libraries and Demo Code.
#define LTC6952_INVSTAT
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MP4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_POR
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_CPINV
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MD10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_SRQEN8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_OINV7
for spi_map array, defines location for field specific information used to create the spi map ...
uint8_t get_LTC6952_SPI_FIELD_NUMBITS(uint8_t f)
returns the number of bits for a given field name in the SPI map
#define LTC6952_PD4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_ADEL6
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 LTC6952_OINV6
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MD6
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PD3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_DDEL4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MP9
for spi_map array, defines location for field specific information used to create the spi map ...
long LTC6952_read_field(uint8_t cs, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
LTC6952 Read Single Field For SPI FIELDS located in 1 or multiple address location reads specific add...
#define LTC6952_LOCK
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_SRQEN4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_ADEL1
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_DDEL7
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_ADEL3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MP6
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PD1
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_x
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_LKWIN
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PD5
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PD6
for spi_map array, defines location for field specific information used to create the spi map ...
uint8_t LTC6952_read(uint8_t cs, int8_t address)
LTC6952 Read Single Address reads 8 bit Data field to LTC6952.
#define LTC6952_ADEL8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_CPUP
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MP1
for spi_map array, defines location for field specific information used to create the spi map ...
uint8_t LTC6952_write_field(uint8_t cs, long field_data, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
LTC6952 Write Single Field For SPI FIELDS in 1 or multiple address locations reads specific address/f...
void LTC6952_init()
Initializes the SPI MAP arrays The values set in initialization are used for all the LTC6952 SPI/WRIT...
#define LTC6952_SRQEN0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_ND
for spi_map array, defines location for field specific information used to create the spi map ...
LTC6952: Ultralow Jitter, 4.5GHz PLL with 11 Outputs and JESD204B Support.
#define LTC6952_MP2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_ADEL7
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PD9
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MODE3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MP0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MD7
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_LKCT
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MD4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_CPWIDE
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_SRQMD
for spi_map array, defines location for field specific information used to create the spi map ...
uint16_t LT_uint16
16-bit unsigned integer to be converted to two bytes
#define LTC6952_DDEL6
for spi_map array, defines location for field specific information used to create the spi map ...
#define output_low(pin)
Set "pin" low.
#define LTC6952_MD0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MD5
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_SYSCT
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 LTC6952_nLOCK
for spi_map array, defines location for field specific information used to create the spi map ...
uint8_t get_LTC6952_SPI_FIELD_RW(uint8_t f)
returns if the given field name is (0)read/write or (1)read_only field
#define LTC6952_MODE4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_OINV8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MODE8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_DDEL8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MODE0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_REFOK
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PDVCOPK
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_ADEL0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_ADEL10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_ADEL4
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_CP
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_DDEL10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_SRQEN3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_SRQEN7
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 LTC6952_DDEL9
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MODE7
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_SRQEN10
for spi_map array, defines location for field specific information used to create the spi map ...
long get_LTC6952_SPI_FIELD(uint8_t cs, uint8_t f)
Gets the LTC6952 SPI field value calls function LTC6952_read_field, which reads specific address loca...
#define LTC6952_VCOOK
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PART
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_CS
Define the SPI CS pin.
#define ADDRx
used for 2nd dim of 2d spi_map array
#define LTC6952_OINV3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MD2
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 LTC6952_OINV1
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MP5
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MP8
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 LTC6952_NUM_REGFIELD
Defines number of LTC6952 SPI fields, used in spi_map array.
#define LTC6952_PD8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MODE1
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_ADEL5
for spi_map array, defines location for field specific information used to create the spi map ...
void set_LTC6952_SPI_FIELD(uint8_t cs, uint8_t f, long field_data)
Sets the LTC6952 SPI field value calls function LTC6952_read_field, which reads specific address/fiel...
#define LTC6952_SRQEN2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_DDEL5
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MODE5
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_OINV10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_nVCOOK
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_EZMD
for spi_map array, defines location for field specific information used to create the spi map ...
uint8_t LTC6952_reg[LTC6952_NUM_REGADDR]
number of LTC6952 spi addresses
#define LTC6952_TEMPO
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PDALL
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MD8
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_nREFOK
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_RAO
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MODE9
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_SRQEN6
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 LTC6952_REV
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_SRQEN9
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 LTC6952_MP10
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_CPDN
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_CPMID
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PARSYNC
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PD0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MODE2
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MD9
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_PDREFPK
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 LTC6952_DDEL3
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_OINV5
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_OINV0
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_NUM_REGADDR
Defines number of LTC6952 SPI registers, used in spi_map array.
#define LTC6952_DDEL1
for spi_map array, defines location for field specific information used to create the spi map ...
#define LTC6952_MP7
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