Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board
LTC6952.cpp
Go to the documentation of this file.
1 /*!
2  LTC6952: Ultralow Jitter, 4.5GHz PLL with 11 Outputs and JESD204B Support
3 
4 @verbatim
5 
6 The LTC®6952 is a high performance, ultralow jitter,
7 JESD204B clock generation and distribution IC. It includes
8 a Phase Locked Loop (PLL) core, consisting of a reference
9 divider, phase-frequency detector (PFD) with a phase-lock
10 indicator, ultralow noise charge pump and integer feedback
11 divider. The LTC6952’s eleven outputs can be configured
12 as up to five JESD204B subclass 1 device clock/SYSREF
13 pairs plus one general purpose output, or simply eleven
14 general purpose clock outputs for non-JESD204B applications.
15 Each output has its own individually programmable
16 frequency divider and output driver. All outputs can also
17 be synchronized and set to precise phase alignment using
18 individual coarse half-cycle digital delays and fine analog
19 time delays.
20 For applications requiring more than eleven total outputs,
21 multiple LTC6952s can be connected together using the
22 EZSync or ParallelSync synchronization protocols.
23 
24 @endverbatim
25 
26 
27 http://www.linear.com/product/LTC6952
28 
29 http://www.linear.com/product/LTC6952#demoboards
30 
31 
32 Copyright 2018(c) Analog Devices, Inc.
33 
34 All rights reserved.
35 
36 Redistribution and use in source and binary forms, with or without
37 modification, are permitted provided that the following conditions are met:
38  - Redistributions of source code must retain the above copyright
39  notice, this list of conditions and the following disclaimer.
40  - Redistributions in binary form must reproduce the above copyright
41  notice, this list of conditions and the following disclaimer in
42  the documentation and/or other materials provided with the
43  distribution.
44  - Neither the name of Analog Devices, Inc. nor the names of its
45  contributors may be used to endorse or promote products derived
46  from this software without specific prior written permission.
47  - The use of this software may or may not infringe the patent rights
48  of one or more patent holders. This license does not release you
49  from the requirement that you obtain separate licenses from these
50  patent holders to use this software.
51  - Use of the software either in source or binary form, must be run
52  on or directly connected to an Analog Devices Inc. component.
53 
54 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
55 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
56 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
57 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
58 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
59 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
60 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
61 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
62 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
63 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64 */
65 
66 //! @ingroup RF_Timing
67 //! @{
68 //! @defgroup LTC6952 LTC6952: Ultralow Jitter, 4.5GHz PLL with 11 Outputs and JESD204B Support
69 //! @}
70 
71 /*! @file
72  @ingroup LTC6952
73  Library for LTC6952: Ultralow Jitter, 4.5GHz PLL with 11 Outputs and JESD204B Support
74 */
75 
76 #include <stdint.h>
77 #include <Arduino.h>
78 #include "Linduino.h"
79 #include "UserInterface.h"
80 #include "LT_SPI.h"
81 #include "LTC6952.h"
82 #include "QuikEval_EEPROM.h"
83 #include <SPI.h>
84 
85 uint8_t LTC6952_reg[LTC6952_NUM_REGADDR]; //!< number of LTC6952 spi addresses
86 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
87 
88 uint8_t LTC6952_lkup_tbl[2][LTC6952_NUM_REGADDR] = //!< created with the LTC6952Wizard tool
89 {
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}, //!< xxxx
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}, //!< xxxx
92 }; //!< LTC6952 Configuration look-up table
93 
94 
95 /* -------------------------------------------------------------------------
96  FUNCTION: LTC6952_read
97  - reads 8 bit Data field to LTC6952.
98  - has to shift data by one bit to account for RW bit
99  -------------------------------------------------------------------------- */
100 uint8_t LTC6952_read(uint8_t cs, int8_t address)
101 {
102  int8_t address_shift;
104 
105  address_shift =(address << 1) | 0x01; // shift to left to account for R/W bit, set bit high for read
106  spi_transfer_word(cs, address_shift<<8 , &rx.LT_uint16);
107 
108  LTC6952_reg[address]=rx.LT_byte[0];
109  return(rx.LT_byte[0]);
110 }
111 
112 
113 /* -------------------------------------------------------------------------
114  FUNCTION: LTC6952_read_field
115  For SPI FIELDS located in 1 or multiple address location
116  - reads specific address locations
117  - identifies and returns specific field in question
118  - can handle SPI fields in multiple addresses, if MSB bit is in the lower number address
119 --------------------------------------------------------------------------- */
120 long LTC6952_read_field(uint8_t cs, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
121 {
122  int bit_shift, i, num_reg;
123  long field_val, maskbits, pow2;
124 
125  num_reg=0;
126  field_val=0;
127 // determines how many register are used
128  do
129  {
130  bit_shift = (MSB_loc+1)- (numbits-num_reg*8); // determines bit_shift for last register location
131  field_val=LTC6952_read(cs, (address+num_reg))+(field_val<<8); // reads current address locations, shifts previous address location 8 bits
132  num_reg++;
133  }
134  while ((bit_shift<0) && (num_reg<4));
135 
136 // creates a bit mask for complete word,
137  maskbits = 1;
138  pow2=1;
139  for (i=1, maskbits=1; i<numbits; i++)
140  {
141  pow2=pow2*2;
142  maskbits = maskbits+pow2;
143  }
144 
145  field_val=(field_val >>bit_shift) &maskbits;
146  return field_val;
147 }
148 
149 /* -------------------------------------------------------------------------
150  FUNCTION: get_LTC6952_SPI_FIELD
151  For SPI FIELDS
152  - reads specific address locations
153  - identifies and returns specific field in question
154  - can handle SPI fields in multiple addresses, if MSB bit is in the lower number address
155 --------------------------------------------------------------------------- */
156 long get_LTC6952_SPI_FIELD(uint8_t cs, uint8_t f)
157 {
158  uint8_t addrx;
159  uint8_t dxmsb;
160  uint8_t numbits;
161 
162  addrx = (LTC6952_spi_map[f] & 0xff00) >> 8;
163  dxmsb = (LTC6952_spi_map[f] & 0x0070) >> 4;
164  numbits = (LTC6952_spi_map[f] & 0x000f) + 1;
165  return LTC6952_read_field(cs, addrx, dxmsb, numbits);
166 
167 #if INCLUDE_REGMAP
169 #endif
170 }
171 
172 /* -------------------------------------------------------------------------
173  FUNCTION: LTC6952_write
174  - writes 8 bit Data field to LTC6952.
175  - has to shift data by one bit to account for RW bit
176 --------------------------------------------------------------------------- */
177 void LTC6952_write(uint8_t cs, uint8_t address, uint8_t Data)
178 {
180 
181  address=address << 1; // shift to left to account for R/W bit
182  spi_transfer_word(cs, (address<<8) | Data, &rx.LT_uint16);
183 }
184 
185 
186 /* -------------------------------------------------------------------------
187  FUNCTION: LTC6952_write_field
188  For SPI FIELDS
189  - reads specific address location
190  - identifies and returns specific field in question
191  - can handle SPI fields in multiple addresses, if MSB bit is in the lower number address
192 ---------------------------------------------------------------------------- */
193 uint8_t LTC6952_write_field(uint8_t cs, long field_data, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
194 {
195  long current_content, desired_content, reg_val;
196  int LSB_loc, i, j, num_reg, bit_shift;
197  long temp_arr[32];
198 
199  for (i=0; i<32 ; i++) temp_arr[i]=0; // init temp_arr
200 
201 // read data in current address location and put in a bit array
202  num_reg=0;
203  current_content=0;
204  do
205  {
206  bit_shift=(MSB_loc+1)-(numbits-num_reg*8);
207  current_content=LTC6952_read(cs, (address+num_reg)) + (current_content<<8);
208 
209  num_reg++;
210  }
211  while ((bit_shift<0) && (num_reg<4));
212  for (i=0; i<(8*num_reg); i++)
213  {
214  temp_arr[i]=(current_content>>i) & 1;
215  }
216 
217 // exchange current bits with desired bits
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++)
220  {
221  temp_arr[i] = (field_data>>j) &1;
222  } // end of for loop
223 
224 // reconstruct bits into an integer
225  desired_content = 0;
226  for (i=0; i<(8*num_reg); i++)
227  {
228  desired_content = desired_content | (temp_arr[i]<<i);
229  } // end of for loop
230 
231 // write new field value to part
232  for (i=0; i<num_reg; i++)
233  {
234  reg_val = (desired_content >> 8*(num_reg-1-i)) & 0xff;
235  LTC6952_write(cs, (address+i), reg_val);
236  } // end of for loop
237 } // end of LTC6952_write_field
238 
239 
240 /* -------------------------------------------------------------------------
241  FUNCTION: get_LTC6952_REGSIZE
242  - returns # of addresses in parts register map (array size)
243 ---------------------------------------------------------------------------- */
245 {
246  return sizeof(LTC6952_reg);
247 }
248 
249 
250 /* -------------------------------------------------------------------------
251  FUNCTION: get_LTC6952_SPI_FIELD_NUMBITS
252  - returns the number of bits for a given field name in the SPI map
253 ---------------------------------------------------------------------------- */
255 {
256  uint8_t numbits;
257 
258  numbits = (LTC6952_spi_map[f] & 0x000f) + 1;
259  return numbits;
260 }
261 
262 
263 /* -------------------------------------------------------------------------
264  FUNCTION: get_LTC6952_SPI_FIELD_RW
265  - returns if the given field name is (0)read/write or (1)read_only field
266 ---------------------------------------------------------------------------- */
267 uint8_t get_LTC6952_SPI_FIELD_RW(uint8_t f)
268 {
269  uint8_t rw_stat;
270 
271  rw_stat = (LTC6952_spi_map[f] & 0x0080) >> 7;
272  return rw_stat;
273 }
274 
275 
276 /* -------------------------------------------------------------------------
277  FUNCTION: set_LTC6952_SPI_FIELD
278  For SPI FIELDS
279  - reads specific address location
280  - identifies and returns specific field in question
281  - can handle SPI fields in multiple addresses, if MSB bit is in the lower number address
282 ---------------------------------------------------------------------------- */
283 void set_LTC6952_SPI_FIELD(uint8_t cs, uint8_t f, long field_data)
284 {
285  uint8_t addrx;
286  uint8_t dxmsb;
287  uint8_t numbits;
288 
289  addrx = (LTC6952_spi_map[f] & 0xff00) >> 8;
290  dxmsb = (LTC6952_spi_map[f] & 0x0070) >> 4;
291  numbits = (LTC6952_spi_map[f] & 0x000f) + 1;
292  LTC6952_write_field(cs, field_data, addrx, dxmsb, numbits);
293 
294 #if INCLUDE_REGMAP
296 #endif
297 }
298 
299 /* -------------------------------------------------------------------------
300  FUNCTION: set_LTC6952_REGS_lkup_tbl
301  - writes LTC6952 registers from a look up table
302  - uses the Multi-byte write option for more efficient data transfer
303  - Either SPI Syncs or recommends the use to SYNC pin based on RAO value
304 --------------------------------------------------------------------------- */
305 void set_LTC6952_REGS_lkup_tbl(uint8_t lkup_tbl_row)
306 {
307  uint8_t val_temp, i;
308  uint8_t val_reg2, val_reg3, val_regA;
309  uint8_t *rx;
310 
311 //! ************** SPI REGISTER WRITE SECTION ************
312  output_low(QUIKEVAL_CS); //! 1) CS low, enable SPI
313  val_temp = 1<<1; //! 2) addr 1, shift 1 bit to account for RW bit (W=0)
314  *rx = SPI.transfer(val_temp); //! 3) send ADDR1 byte
315  for (i=1; i<LTC6952_NUM_REGADDR; i++)
316  {
317  val_temp=LTC6952_lkup_tbl[lkup_tbl_row][i];
318  *rx = SPI.transfer(val_temp); //! 4) send REG byte
319  }
320  output_high(QUIKEVAL_CS); //! 5) CS high, disable SPI
321 
322 
323 //! **************** OUTPUT SYNC SECTION ******************
324 //! toggle SSRQ to SYNC outputs
326  delay(1); // min 1ms delay for SSRQ HIGH pulse
328  delay(1); // min 1ms delay for SSRQ LOW pulse
329 
330 //! FOR JESD204B subclass 1: SET SRQMD=1, then toggle SSRQ to start SYSREF
333  delay(1); // min 1ms delay for SSRQ HIGH pulse
335  delay(1); // min 1ms delay for SSRQ LOW pulse
336 
337 //! FOR JESD204B subclass 1: SET SRQMD=0, reduce power
339 
340 //! OPTIONAL FOR JESD204B subclass 1: power down SYSREF outputs when complete(PDx=2), reduces power.
341 //! keep SYSREF dividers running to maintain synchronization.
342 
343 //! **************** INFO SECTION ******************
344 //! INFO ONLY: Print Register Map written to part
345 
346 
347 } // end of set_LTC6952_REGS_lkup_tbl
348 
349 
350 /* -------------------------------------------------------------------------
351  FUNCTION: LTC6952_init
352  - initializes the SPI MAP
353  - for ease of programming there is spreadsheet that automates this some.
354 ----------------------------------------------------------------------------*/
356 {
357 // look up table
358 
359 
360 // spi map
486 
487 } // end of LTC6952_init
488 
489 
490 
491 // Read the ID string from the EEPROM and determine if the correct board is connected.
492 // Returns 1 if successful, 0 if not successful
494 {
495  int8_t connected;
496  connected = 1;
497  // read the ID from the serial EEPROM on the board
498  // reuse the buffer declared in UserInterface
499  if (read_quikeval_id_string(&ui_buffer[0]) == 0) connected = 0;
500 
501  return(connected);
502 }
503 
504 
505 
#define LTC6952_MD1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:119
#define LTC6952_MD3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:121
#define LTC6952_SSRQ
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:188
#define LTC6952_PD7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:172
#define LTC6952_BST
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:91
#define LTC6952_MP3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:143
#define LTC6952_PD10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:169
#define LTC6952_DDEL2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:101
#define LTC6952_SRQEN1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:190
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.
Definition: LTC6952.cpp:86
#define LTC6952_OINV2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:154
#define LTC6952_PD2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:177
#define LTC6952_ADEL9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:89
#define LTC6952_OINV4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:156
#define LTC6952_OINV9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:161
uint8_t LTC6952_lkup_tbl[2][LTC6952_NUM_REGADDR]
created with the LTC6952Wizard tool
Definition: LTC6952.cpp:88
#define LTC6952_MODE6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:135
#define LTC6952_CPRST
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:96
#define LTC6952_FILTR
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:111
#define output_high(pin)
Set "pin" high.
Definition: Linduino.h:75
#define LTC6952_PDPLL
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:166
#define LTC6952_ADEL2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:82
#define LTC6952_DDEL0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:99
uint8_t get_LTC6952_REGSIZE()
returns # of addresses in parts register map (array size)
Definition: LTC6952.cpp:244
#define LTC6952_MODE10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:139
#define LTC6952_SRQEN5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:194
#define LTC6952_FILTV
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:112
void set_LTC6952_REGS_lkup_tbl(uint8_t lkup_tbl_row)
Writes values to ALL LTC6952 RW addresses from a look-up table.
Definition: LTC6952.cpp:305
void LTC6952_write(uint8_t cs, uint8_t address, uint8_t Data)
LTC6952 Write Single Address writes 8 bit Data field to LTC6952.
Definition: LTC6952.cpp:177
#define LTC6952_UNLOCK
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:201
#define LTC6952_RD
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:182
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 ...
Definition: LTC6952.h:113
#define LTC6952_MP4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:144
#define LTC6952_POR
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:180
#define LTC6952_CPINV
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:94
#define LTC6952_MD10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:128
#define LTC6952_SRQEN8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:197
#define LTC6952_OINV7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:159
uint8_t get_LTC6952_SPI_FIELD_NUMBITS(uint8_t f)
returns the number of bits for a given field name in the SPI map
Definition: LTC6952.cpp:254
#define LTC6952_PD4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:175
#define LTC6952_ADEL6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:86
int8_t discover_demo_board_local(char *demo_name)
Read the ID string from the EEPROM and determine if any demo board is connected.
Definition: LTC6952.cpp:493
#define LTC6952_OINV6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:158
#define LTC6952_MD6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:124
#define LTC6952_PD3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:176
static int32_t connected
Definition: CN-0413.ino:69
#define LTC6952_DDEL4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:103
#define LTC6952_MP9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:149
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...
Definition: LTC6952.cpp:120
#define LTC6952_LOCK
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:117
#define LTC6952_SRQEN4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:193
#define LTC6952_ADEL1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:81
#define LTC6952_DDEL7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:106
#define LTC6952_ADEL3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:83
#define LTC6952_MP6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:146
#define LTC6952_PD1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:178
#define LTC6952_x
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:204
#define LTC6952_LKWIN
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:115
#define LTC6952_PD5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:174
#define NUMBITS
Definition: LTC6115.h:69
#define LTC6952_PD6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:173
static uint8_t address
Definition: DC2091A.ino:83
uint8_t LTC6952_read(uint8_t cs, int8_t address)
LTC6952 Read Single Address reads 8 bit Data field to LTC6952.
Definition: LTC6952.cpp:100
#define LTC6952_ADEL8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:88
#define LTC6952_CPUP
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:97
#define LTC6952_MP1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:141
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...
Definition: LTC6952.cpp:193
void LTC6952_init()
Initializes the SPI MAP arrays The values set in initialization are used for all the LTC6952 SPI/WRIT...
Definition: LTC6952.cpp:355
#define LTC6952_SRQEN0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:189
#define LTC6952_ND
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:151
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 ...
Definition: LTC6952.h:142
#define LTC6952_ADEL7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:87
#define LTC6952_PD9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:170
#define LTC6952_MODE3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:132
#define LTC6952_MP0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:140
#define LTC6952_MD7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:125
#define LTC6952_LKCT
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:114
#define LTC6952_MD4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:122
#define LTC6952_CPWIDE
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:98
#define LTC6952_SRQMD
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:187
uint16_t LT_uint16
16-bit unsigned integer to be converted to two bytes
Definition: Linduino.h:102
#define LTC6952_DDEL6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:105
#define output_low(pin)
Set "pin" low.
Definition: Linduino.h:72
#define LTC6952_MD0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:118
#define LTC6952_MD5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:123
#define LTC6952_SYSCT
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:186
QuikEval EEPROM Library.
void spi_transfer_word(uint8_t cs_pin, uint16_t tx, uint16_t *rx)
Reads and sends a word.
Definition: LT_SPI.cpp:98
#define LTC6952_nLOCK
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:116
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
Definition: LTC6952.cpp:267
#define LTC6952_MODE4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:133
#define LTC6952_OINV8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:160
#define LTC6952_MODE8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:137
#define LTC6952_DDEL8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:107
#define LTC6952_MODE0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:129
#define LTC6952_REFOK
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:184
#define LTC6952_PDVCOPK
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:168
#define LTC6952_ADEL0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:80
#define LTC6952_ADEL10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:90
#define LTC6952_ADEL4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:84
#define LTC6952_CP
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:92
#define LTC6952_DDEL10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:109
#define LTC6952_SRQEN3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:192
#define LTC6952_SRQEN7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:196
LT_SPI: Routines to communicate with ATmega328P&#39;s hardware SPI port.
#define LTC6952_DDEL9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:108
#define LTC6952_MODE7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:136
#define LTC6952_SRQEN10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:199
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...
Definition: LTC6952.cpp:156
#define LTC6952_VCOOK
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:203
#define LTC6952_PART
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:164
#define LTC6952_CS
Define the SPI CS pin.
Definition: LTC6952.h:76
#define ADDRx
used for 2nd dim of 2d spi_map array
Definition: LTC6945.h:116
#define LTC6952_OINV3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:155
#define LTC6952_MD2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:120
char demo_name[]
Demo Board Name stored in QuikEval EEPROM.
Definition: DC1880A.ino:97
#define LTC6952_OINV1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:153
#define LTC6952_MP5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:145
#define LTC6952_MP8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:148
This union splits one int16_t (16-bit signed integer) or uint16_t (16-bit unsigned integer) into two ...
Definition: Linduino.h:99
#define LTC6952_NUM_REGFIELD
Defines number of LTC6952 SPI fields, used in spi_map array.
Definition: LTC6952.h:207
#define LTC6952_PD8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:171
#define LTC6952_MODE1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:130
#define LTC6952_ADEL5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:85
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...
Definition: LTC6952.cpp:283
#define LTC6952_SRQEN2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:191
#define LTC6952_DDEL5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:104
#define LTC6952_MODE5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:134
#define LTC6952_OINV10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:162
#define LTC6952_nVCOOK
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:202
#define LTC6952_EZMD
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:110
uint8_t LTC6952_reg[LTC6952_NUM_REGADDR]
number of LTC6952 spi addresses
Definition: LTC6952.cpp:85
#define LTC6952_TEMPO
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:200
static int i
Definition: DC2430A.ino:184
#define LTC6952_PDALL
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:165
#define LTC6952_MD8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:126
#define LTC6952_nREFOK
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:183
#define LTC6952_RAO
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:181
#define LTC6952_MODE9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:138
#define LTC6952_SRQEN6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:195
uint8_t LT_byte[2]
2 bytes (unsigned 8-bit integers) to be converted to a 16-bit signed or unsigned integer ...
Definition: Linduino.h:103
#define LTC6952_REV
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:185
#define LTC6952_SRQEN9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:198
#define QUIKEVAL_CS
QuikEval CS pin (SPI chip select on QuikEval connector pin 6) connects to Arduino SS pin...
Definition: Linduino.h:57
#define LTC6952_MP10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:150
#define LTC6952_CPDN
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:93
#define LTC6952_CPMID
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:95
#define LTC6952_PARSYNC
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:163
#define LTC6952_PD0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:179
#define LTC6952_MODE2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:131
#define LTC6952_MD9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:127
#define LTC6952_PDREFPK
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:167
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 ...
Definition: LTC6952.h:102
#define LTC6952_OINV5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:157
#define LTC6952_OINV0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:152
#define LTC6952_NUM_REGADDR
Defines number of LTC6952 SPI registers, used in spi_map array.
Definition: LTC6952.h:206
#define LTC6952_DDEL1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:100
#define LTC6952_MP7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6952.h:147
#define DxMSB
used for 2nd dim of 2d spi_map array
Definition: LTC6945.h:117