| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

LTC6953.cpp
Go to the documentation of this file.
1 /*!
2 LTC6953: Ultra-Low Jitter, JESD204B Clock Distributor with Eleven Programmable Outputs
3
4 @verbatim
5
6 The LTC®6953 is a high performance, ultralow jitter,
7 JESD204B clock distribution IC. The LTC6953’s eleven
8 outputs can be configured as up to five JESD204B subclass
9 1 device clock/SYSREF pairs plus one general
10 purpose output or simply eleven general purpose clock
11 outputs for non-JESD204B applications. Each output has
12 its own individually programmable frequency divider and
13 output driver. All outputs can also be synchronized and
14 set to precise phase alignment using individual coarse half
15 cycle digital delays and fine analog time delays.
16
17 For applications requiring more than eleven total outputs,
18 multiple LTC6953s can be connected together with
19 LTC6952s and LTC6955s using the EZSync or ParallelSync
20 synchronization protocols.
21
22 @endverbatim
23
24
25 http://www.linear.com/product/LTC6953
26
27 http://www.linear.com/product/LTC6953#demoboards
28
29
30 Copyright 2018(c) Analog Devices, Inc.
31
32 All rights reserved.
33
34 Redistribution and use in source and binary forms, with or without
35 modification, are permitted provided that the following conditions are met:
36 - Redistributions of source code must retain the above copyright
37 notice, this list of conditions and the following disclaimer.
38 - Redistributions in binary form must reproduce the above copyright
39 notice, this list of conditions and the following disclaimer in
40 the documentation and/or other materials provided with the
41 distribution.
42 - Neither the name of Analog Devices, Inc. nor the names of its
43 contributors may be used to endorse or promote products derived
44 from this software without specific prior written permission.
45 - The use of this software may or may not infringe the patent rights
46 of one or more patent holders. This license does not release you
47 from the requirement that you obtain separate licenses from these
48 patent holders to use this software.
49 - Use of the software either in source or binary form, must be run
50 on or directly connected to an Analog Devices Inc. component.
51
52 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
53 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
54 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
55 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
56 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
57 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
58 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
59 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
60 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
61 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
62 */
63
64 //! @ingroup RF_Timing
65 //! @{
66 //! @defgroup LTC6953 LTC6953: Ultra-Low Jitter, JESD204B Clock Distributor with Eleven Programmable Outputs
67 //! @}
68
69 /*! @file
70 @ingroup LTC6953
71 Library for LTC6953: Ultra-Low Jitter, JESD204B Clock Distributor with Eleven Programmable Outputs
72 */
73
74 #include <stdint.h>
75 #include <Arduino.h>
76 #include "Linduino.h"
77 #include "UserInterface.h"
78 #include "LT_SPI.h"
79 #include "LTC6953.h"
80 #include "QuikEval_EEPROM.h"
81 #include <SPI.h>
82
83 uint8_t LTC6953_reg[LTC6953_NUM_REGADDR]; //!< number of LTC6953 spi addresses
84 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
85
86 uint8_t LTC6953_lkup_tbl[2][LTC6953_NUM_REGADDR] = //!< created with the LTC6952Wizard tool
87 {
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}, //!< xxxx
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}, //!< xxxx
90 }; //!< LTC6953 Configuration look-up table
91
92
93 /* -------------------------------------------------------------------------
94 FUNCTION: LTC6953_read
95 - reads 8 bit Data field to LTC6953.
96 - has to shift data by one bit to account for RW bit
97 -------------------------------------------------------------------------- */
98 uint8_t LTC6953_read(uint8_t cs, int8_t address)
99 {
100 int8_t address_shift;
101 LT_union_int16_2bytes rx;
102
103 address_shift =(address << 1) | 0x01; // shift to left to account for R/W bit, set bit high for read
104 spi_transfer_word(cs, address_shift<<8 , &rx.LT_uint16);
105
106 LTC6953_reg[address]=rx.LT_byte[0];
107 return(rx.LT_byte[0]);
108 }
109
110
111 /* -------------------------------------------------------------------------
112 FUNCTION: LTC6953_read_field
113 For SPI FIELDS located in 1 or multiple address location
114 - reads specific address locations
115 - identifies and returns specific field in question
116 - can handle SPI fields in multiple addresses, if MSB bit is in the lower number address
117 --------------------------------------------------------------------------- */
118 long LTC6953_read_field(uint8_t cs, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
119 {
120 int bit_shift, i, num_reg;
121 long field_val, maskbits, pow2;
122
123 num_reg=0;
124 field_val=0;
125 // determines how many register are used
126 do
127 {
128 bit_shift = (MSB_loc+1)- (numbits-num_reg*8); // determines bit_shift for last register location
129 field_val=LTC6953_read(cs, (address+num_reg))+(field_val<<8); // reads current address locations, shifts previous address location 8 bits
130 num_reg++;
131 }
132 while ((bit_shift<0) && (num_reg<4));
133
134 // creates a bit mask for complete word,
135 maskbits = 1;
136 pow2=1;
137 for (i=1, maskbits=1; i<numbits; i++)
138 {
139 pow2=pow2*2;
140 maskbits = maskbits+pow2;
141 }
142
143 field_val=(field_val >>bit_shift) &maskbits;
144 return field_val;
145 }
146
147 /* -------------------------------------------------------------------------
148 FUNCTION: get_LTC6953_SPI_FIELD
149 For SPI FIELDS
150 - reads specific address locations
151 - identifies and returns specific field in question
152 - can handle SPI fields in multiple addresses, if MSB bit is in the lower number address
153 --------------------------------------------------------------------------- */
154 long get_LTC6953_SPI_FIELD(uint8_t cs, uint8_t f)
155 {
156 uint8_t addrx;
157 uint8_t dxmsb;
158 uint8_t numbits;
159
160 addrx = (LTC6953_spi_map[f] & 0xff00) >> 8;
161 dxmsb = (LTC6953_spi_map[f] & 0x0070) >> 4;
162 numbits = (LTC6953_spi_map[f] & 0x000f) + 1;
163 return LTC6953_read_field(cs, addrx, dxmsb, numbits);
164
165 #if INCLUDE_REGMAP
166 return LTC6953_read_field(cs, LTC6953_spi_map[f][ADDRx], LTC6953_spi_map[f][DxMSB], LTC6953_spi_map[f][NUMBITS]);
167 #endif
168 }
169
170 /* -------------------------------------------------------------------------
171 FUNCTION: LTC6953_write
172 - writes 8 bit Data field to LTC6953.
173 - has to shift data by one bit to account for RW bit
174 --------------------------------------------------------------------------- */
175 void LTC6953_write(uint8_t cs, uint8_t address, uint8_t Data)
176 {
177 LT_union_int16_2bytes rx;
178
179 address=address << 1; // shift to left to account for R/W bit
180 spi_transfer_word(cs, (address<<8) | Data, &rx.LT_uint16);
181 }
182
183
184 /* -------------------------------------------------------------------------
185 FUNCTION: LTC6953_write_field
186 For SPI FIELDS
187 - reads specific address location
188 - identifies and returns specific field in question
189 - can handle SPI fields in multiple addresses, if MSB bit is in the lower number address
190 ---------------------------------------------------------------------------- */
191 uint8_t LTC6953_write_field(uint8_t cs, long field_data, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
192 {
193 long current_content, desired_content, reg_val;
194 int LSB_loc, i, j, num_reg, bit_shift;
195 long temp_arr[32];
196
197 for (i=0; i<32 ; i++) temp_arr[i]=0; // init temp_arr
198
199 // read data in current address location and put in a bit array
200 num_reg=0;
201 current_content=0;
202 do
203 {
204 bit_shift=(MSB_loc+1)-(numbits-num_reg*8);
205 current_content=LTC6953_read(cs, (address+num_reg)) + (current_content<<8);
206
207 num_reg++;
208 }
209 while ((bit_shift<0) && (num_reg<4));
210 for (i=0; i<(8*num_reg); i++)
211 {
212 temp_arr[i]=(current_content>>i) & 1;
213 }
214
215 // exchange current bits with desired bits
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++)
218 {
219 temp_arr[i] = (field_data>>j) &1;
220 } // end of for loop
221
222 // reconstruct bits into an integer
223 desired_content = 0;
224 for (i=0; i<(8*num_reg); i++)
225 {
226 desired_content = desired_content | (temp_arr[i]<<i);
227 } // end of for loop
228
229 // write new field value to part
230 for (i=0; i<num_reg; i++)
231 {
232 reg_val = (desired_content >> 8*(num_reg-1-i)) & 0xff;
233 LTC6953_write(cs, (address+i), reg_val);
234 } // end of for loop
235 } // end of LTC6953_write_field
236
237
238 /* -------------------------------------------------------------------------
239 FUNCTION: get_LTC6953_REGSIZE
240 - returns # of addresses in parts register map (array size)
241 ---------------------------------------------------------------------------- */
242 uint8_t get_LTC6953_REGSIZE()
243 {
244 return sizeof(LTC6953_reg);
245 }
246
247
248 /* -------------------------------------------------------------------------
249 FUNCTION: get_LTC6953_SPI_FIELD_NUMBITS
250 - returns the number of bits for a given field name in the SPI map
251 ---------------------------------------------------------------------------- */
252 uint8_t get_LTC6953_SPI_FIELD_NUMBITS(uint8_t f)
253 {
254 uint8_t numbits;
255
256 numbits = (LTC6953_spi_map[f] & 0x000f) + 1;
257 return numbits;
258 }
259
260
261 /* -------------------------------------------------------------------------
262 FUNCTION: get_LTC6953_SPI_FIELD_RW
263 - returns if the given field name is (0)read/write or (1)read_only field
264 ---------------------------------------------------------------------------- */
265 uint8_t get_LTC6953_SPI_FIELD_RW(uint8_t f)
266 {
267 uint8_t rw_stat;
268
269 rw_stat = (LTC6953_spi_map[f] & 0x0080) >> 7;
270 return rw_stat;
271 }
272
273
274 /* -------------------------------------------------------------------------
275 FUNCTION: set_LTC6953_SPI_FIELD
276 For SPI FIELDS
277 - reads specific address location
278 - identifies and returns specific field in question
279 - can handle SPI fields in multiple addresses, if MSB bit is in the lower number address
280 ---------------------------------------------------------------------------- */
281 void set_LTC6953_SPI_FIELD(uint8_t cs, uint8_t f, long field_data)
282 {
283 uint8_t addrx;
284 uint8_t dxmsb;
285 uint8_t numbits;
286
287 addrx = (LTC6953_spi_map[f] & 0xff00) >> 8;
288 dxmsb = (LTC6953_spi_map[f] & 0x0070) >> 4;
289 numbits = (LTC6953_spi_map[f] & 0x000f) + 1;
290 LTC6953_write_field(cs, field_data, addrx, dxmsb, numbits);
291
292 #if INCLUDE_REGMAP
293 LTC6953_write_field(cs, field_data, LTC6953_spi_map[f][ADDRx], LTC6953_spi_map[f][DxMSB], LTC6953_spi_map[f][NUMBITS]);
294 #endif
295 }
296
297 /* -------------------------------------------------------------------------
298 FUNCTION: set_LTC6953_REGS_lkup_tbl
299 - writes LTC6953 registers from a look up table
300 - uses the Multi-byte write option for more efficient data transfer
301 - Either SPI Syncs or recommends the use to SYNC pin based on RAO value
302 --------------------------------------------------------------------------- */
303 void set_LTC6953_REGS_lkup_tbl(uint8_t lkup_tbl_row)
304 {
305 uint8_t val_temp, i;
306 uint8_t val_reg2, val_reg3, val_regA;
307 uint8_t *rx;
308
309 //! ************** SPI REGISTER WRITE SECTION ************
310 output_low(QUIKEVAL_CS); //! 1) CS low, enable SPI
311 val_temp = 1<<1; //! 2) addr 1, shift 1 bit to account for RW bit (W=0)
312 *rx = SPI.transfer(val_temp); //! 3) send ADDR1 byte
313 for (i=1; i<LTC6953_NUM_REGADDR; i++)
314 {
315 val_temp=LTC6953_lkup_tbl[lkup_tbl_row][i];
316 *rx = SPI.transfer(val_temp); //! 4) send REG byte
317 }
318 output_high(QUIKEVAL_CS); //! 5) CS high, disable SPI
319
320
321 //! **************** OUTPUT SYNC SECTION ******************
322 //! toggle SSRQ to SYNC outputs
323 set_LTC6953_SPI_FIELD(LTC6953_CS, LTC6953_SSRQ, 1L);
324 delay(1); // min 1ms delay for SSRQ HIGH pulse
325 set_LTC6953_SPI_FIELD(LTC6953_CS, LTC6953_SSRQ, 0L);
326 delay(1); // min 1ms delay for SSRQ LOW pulse
327
328 //! FOR JESD204B subclass 1: SET SRQMD=1, then toggle SSRQ to start SYSREF
329 set_LTC6953_SPI_FIELD(LTC6953_CS, LTC6953_SRQMD, 1L);
330 set_LTC6953_SPI_FIELD(LTC6953_CS, LTC6953_SSRQ, 1L);
331 delay(1); // min 1ms delay for SSRQ HIGH pulse
332 set_LTC6953_SPI_FIELD(LTC6953_CS, LTC6953_SSRQ, 0L);
333 delay(1); // min 1ms delay for SSRQ LOW pulse
334
335 //! FOR JESD204B subclass 1: SET SRQMD=0, reduce power
336 set_LTC6953_SPI_FIELD(LTC6953_CS, LTC6953_SRQMD, 0L);
337
338 //! OPTIONAL FOR JESD204B subclass 1: power down SYSREF outputs when complete(PDx=2), reduces power.
339 //! keep SYSREF dividers running to maintain synchronization.
340
341 //! **************** INFO SECTION ******************
342 //! INFO ONLY: Print Register Map written to part
343
344
345 } // end of set_LTC6953_REGS_lkup_tbl
346
347
348 /* -------------------------------------------------------------------------
349 FUNCTION: LTC6953_init
350 - initializes the SPI MAP
351 - for ease of programming there is spreadsheet that automates this some.
352 ----------------------------------------------------------------------------*/
353 void LTC6953_init()
354 {
355 // look up table
356
357
358 // spi map
359 LTC6953_spi_map[LTC6953_ADEL0]=3925;
360 LTC6953_spi_map[LTC6953_ADEL1]=4949;
361 LTC6953_spi_map[LTC6953_ADEL2]=5973;
362 LTC6953_spi_map[LTC6953_ADEL3]=6997;
363 LTC6953_spi_map[LTC6953_ADEL4]=8021;
364 LTC6953_spi_map[LTC6953_ADEL5]=9045;
365 LTC6953_spi_map[LTC6953_ADEL6]=10069;
366 LTC6953_spi_map[LTC6953_ADEL7]=11093;
367 LTC6953_spi_map[LTC6953_ADEL8]=12117;
368 LTC6953_spi_map[LTC6953_ADEL9]=13141;
369 LTC6953_spi_map[LTC6953_ADEL10]=14165;
370 LTC6953_spi_map[LTC6953_DDEL0]=3387;
371 LTC6953_spi_map[LTC6953_DDEL1]=4411;
372 LTC6953_spi_map[LTC6953_DDEL2]=5435;
373 LTC6953_spi_map[LTC6953_DDEL3]=6459;
374 LTC6953_spi_map[LTC6953_DDEL4]=7483;
375 LTC6953_spi_map[LTC6953_DDEL5]=8507;
376 LTC6953_spi_map[LTC6953_DDEL6]=9531;
377 LTC6953_spi_map[LTC6953_DDEL7]=10555;
378 LTC6953_spi_map[LTC6953_DDEL8]=11579;
379 LTC6953_spi_map[LTC6953_DDEL9]=12603;
380 LTC6953_spi_map[LTC6953_DDEL10]=13627;
381 LTC6953_spi_map[LTC6953_EZMD]=2880;
382 LTC6953_spi_map[LTC6953_FILTV]=528;
383 LTC6953_spi_map[LTC6953_INVSTAT]=368;
384 LTC6953_spi_map[LTC6953_MD0]=3106;
385 LTC6953_spi_map[LTC6953_MD1]=4130;
386 LTC6953_spi_map[LTC6953_MD2]=5154;
387 LTC6953_spi_map[LTC6953_MD3]=6178;
388 LTC6953_spi_map[LTC6953_MD4]=7202;
389 LTC6953_spi_map[LTC6953_MD5]=8226;
390 LTC6953_spi_map[LTC6953_MD6]=9250;
391 LTC6953_spi_map[LTC6953_MD7]=10274;
392 LTC6953_spi_map[LTC6953_MD8]=11298;
393 LTC6953_spi_map[LTC6953_MD9]=12322;
394 LTC6953_spi_map[LTC6953_MD10]=13346;
395 LTC6953_spi_map[LTC6953_MODE0]=3425;
396 LTC6953_spi_map[LTC6953_MODE1]=4449;
397 LTC6953_spi_map[LTC6953_MODE2]=5473;
398 LTC6953_spi_map[LTC6953_MODE3]=6497;
399 LTC6953_spi_map[LTC6953_MODE4]=7521;
400 LTC6953_spi_map[LTC6953_MODE5]=8545;
401 LTC6953_spi_map[LTC6953_MODE6]=9569;
402 LTC6953_spi_map[LTC6953_MODE7]=10593;
403 LTC6953_spi_map[LTC6953_MODE8]=11617;
404 LTC6953_spi_map[LTC6953_MODE9]=12641;
405 LTC6953_spi_map[LTC6953_MODE10]=13665;
406 LTC6953_spi_map[LTC6953_MP0]=3188;
407 LTC6953_spi_map[LTC6953_MP1]=4212;
408 LTC6953_spi_map[LTC6953_MP2]=5236;
409 LTC6953_spi_map[LTC6953_MP3]=6260;
410 LTC6953_spi_map[LTC6953_MP4]=7284;
411 LTC6953_spi_map[LTC6953_MP5]=8308;
412 LTC6953_spi_map[LTC6953_MP6]=9332;
413 LTC6953_spi_map[LTC6953_MP7]=10356;
414 LTC6953_spi_map[LTC6953_MP8]=11380;
415 LTC6953_spi_map[LTC6953_MP9]=12404;
416 LTC6953_spi_map[LTC6953_MP10]=13428;
417 LTC6953_spi_map[LTC6953_OINV0]=3392;
418 LTC6953_spi_map[LTC6953_OINV1]=4416;
419 LTC6953_spi_map[LTC6953_OINV2]=5440;
420 LTC6953_spi_map[LTC6953_OINV3]=6464;
421 LTC6953_spi_map[LTC6953_OINV4]=7488;
422 LTC6953_spi_map[LTC6953_OINV5]=8512;
423 LTC6953_spi_map[LTC6953_OINV6]=9536;
424 LTC6953_spi_map[LTC6953_OINV7]=10560;
425 LTC6953_spi_map[LTC6953_OINV8]=11584;
426 LTC6953_spi_map[LTC6953_OINV9]=12608;
427 LTC6953_spi_map[LTC6953_OINV10]=13632;
428 LTC6953_spi_map[LTC6953_PART]=14515;
429 LTC6953_spi_map[LTC6953_PDALL]=624;
430 LTC6953_spi_map[LTC6953_PDVCOPK]=592;
431 LTC6953_spi_map[LTC6953_PD10]=1361;
432 LTC6953_spi_map[LTC6953_PD9]=1329;
433 LTC6953_spi_map[LTC6953_PD8]=1297;
434 LTC6953_spi_map[LTC6953_PD7]=1137;
435 LTC6953_spi_map[LTC6953_PD6]=1105;
436 LTC6953_spi_map[LTC6953_PD5]=1073;
437 LTC6953_spi_map[LTC6953_PD4]=1041;
438 LTC6953_spi_map[LTC6953_PD3]=881;
439 LTC6953_spi_map[LTC6953_PD2]=849;
440 LTC6953_spi_map[LTC6953_PD1]=817;
441 LTC6953_spi_map[LTC6953_PD0]=785;
442 LTC6953_spi_map[LTC6953_POR]=512;
443 LTC6953_spi_map[LTC6953_REV]=14579;
444 LTC6953_spi_map[LTC6953_SYSCT]=2849;
445 LTC6953_spi_map[LTC6953_SRQMD]=2864;
446 LTC6953_spi_map[LTC6953_SSRQ]=2816;
447 LTC6953_spi_map[LTC6953_SRQEN0]=3440;
448 LTC6953_spi_map[LTC6953_SRQEN1]=4464;
449 LTC6953_spi_map[LTC6953_SRQEN2]=5488;
450 LTC6953_spi_map[LTC6953_SRQEN3]=6512;
451 LTC6953_spi_map[LTC6953_SRQEN4]=7536;
452 LTC6953_spi_map[LTC6953_SRQEN5]=8560;
453 LTC6953_spi_map[LTC6953_SRQEN6]=9584;
454 LTC6953_spi_map[LTC6953_SRQEN7]=10608;
455 LTC6953_spi_map[LTC6953_SRQEN8]=11632;
456 LTC6953_spi_map[LTC6953_SRQEN9]=12656;
457 LTC6953_spi_map[LTC6953_SRQEN10]=13680;
458 LTC6953_spi_map[LTC6953_TEMPO]=1392;
459 LTC6953_spi_map[LTC6953_nVCOOK]=176;
460 LTC6953_spi_map[LTC6953_VCOOK]=160;
461 LTC6953_spi_map[LTC6953_x]=358;
462
463
464 } // end of LTC6953_init
465
466
467
468 // Read the ID string from the EEPROM and determine if the correct board is connected.
469 // Returns 1 if successful, 0 if not successful
470 int8_t discover_demo_board_local(char *demo_name)
471 {
472 int8_t connected;
473 connected = 1;
474 // read the ID from the serial EEPROM on the board
475 // reuse the buffer declared in UserInterface
476 if (read_quikeval_id_string(&ui_buffer[0]) == 0) connected = 0;
477
478 return(connected);
479 }
480
481
482
LTC6953_PD2
#define LTC6953_PD2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:159
LTC6953_ADEL5
#define LTC6953_ADEL5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:84
LTC6953_SRQEN2
#define LTC6953_SRQEN2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:169
LTC6953_ADEL8
#define LTC6953_ADEL8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:87
LTC6953_DDEL4
#define LTC6953_DDEL4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:94
LTC6953_SRQMD
#define LTC6953_SRQMD
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:165
LTC6953_OINV9
#define LTC6953_OINV9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:146
LTC6953_OINV10
#define LTC6953_OINV10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:147
LTC6953_DDEL0
#define LTC6953_DDEL0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:90
LTC6953_PD3
#define LTC6953_PD3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:158
LTC6953_FILTV
#define LTC6953_FILTV
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:102
LTC6953_SSRQ
#define LTC6953_SSRQ
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:166
LTC6953_PD1
#define LTC6953_PD1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:160
LTC6953_SRQEN4
#define LTC6953_SRQEN4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:171
LTC6953_MP4
#define LTC6953_MP4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:130
LTC6953_ADEL9
#define LTC6953_ADEL9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:88
LTC6953.h
LTC6953: Ultra-Low Jitter, JESD204B Clock Distributor with Eleven Programmable Outputs.
LTC6953_MD8
#define LTC6953_MD8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:112
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
Definition: LTC6953.cpp:265
LTC6953_DDEL2
#define LTC6953_DDEL2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:92
LTC6953_SRQEN5
#define LTC6953_SRQEN5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:172
output_high
#define output_high(pin)
Set "pin" high.
Definition: Linduino.h:75
LTC6953_MD5
#define LTC6953_MD5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:109
LTC6953_POR
#define LTC6953_POR
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:162
LTC6953_MODE3
#define LTC6953_MODE3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:118
LTC6953_SRQEN7
#define LTC6953_SRQEN7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:174
Linduino.h
Header File for Linduino Libraries and Demo Code.
LTC6953_reg
uint8_t LTC6953_reg[LTC6953_NUM_REGADDR]
number of LTC6953 spi addresses
Definition: LTC6953.cpp:83
LTC6953_PD8
#define LTC6953_PD8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:153
LTC6953_MD3
#define LTC6953_MD3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:107
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: LTC6953.cpp:84
LTC6953_DDEL3
#define LTC6953_DDEL3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:93
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/fiel...
Definition: LTC6953.cpp:281
LTC6953_OINV0
#define LTC6953_OINV0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:137
LTC6953_DDEL9
#define LTC6953_DDEL9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:99
connected
static int32_t connected
Definition: CN-0413.ino:69
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 loca...
Definition: LTC6953.cpp:154
LTC6953_PDVCOPK
#define LTC6953_PDVCOPK
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:150
LTC6953_ADEL6
#define LTC6953_ADEL6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:85
LTC6953_MD9
#define LTC6953_MD9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:113
LTC6953_TEMPO
#define LTC6953_TEMPO
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:178
LTC6953_DDEL8
#define LTC6953_DDEL8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:98
LTC6953_nVCOOK
#define LTC6953_nVCOOK
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:179
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.
Definition: LTC6953.cpp:175
LTC6953_EZMD
#define LTC6953_EZMD
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:101
LTC6953_MD7
#define LTC6953_MD7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:111
LTC6953_ADEL3
#define LTC6953_ADEL3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:82
LTC6953_MD2
#define LTC6953_MD2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:106
LTC6953_DDEL10
#define LTC6953_DDEL10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:100
NUMBITS
#define NUMBITS
Definition: LTC6115.h:69
LTC6953_MD10
#define LTC6953_MD10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:114
LTC6953_ADEL0
#define LTC6953_ADEL0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:79
address
static uint8_t address
Definition: DC2091A.ino:83
LTC6953_OINV2
#define LTC6953_OINV2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:139
LTC6953_OINV7
#define LTC6953_OINV7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:144
LTC6953_SRQEN9
#define LTC6953_SRQEN9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:176
LTC6953_MD6
#define LTC6953_MD6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:110
LTC6953_PDALL
#define LTC6953_PDALL
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:149
LTC6953_DDEL6
#define LTC6953_DDEL6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:96
LTC6953_SRQEN6
#define LTC6953_SRQEN6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:173
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.
Definition: LTC6953.cpp:303
LT_union_int16_2bytes::LT_uint16
uint16_t LT_uint16
16-bit unsigned integer to be converted to two bytes
Definition: Linduino.h:102
LTC6953_MP10
#define LTC6953_MP10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:136
LTC6953_MP6
#define LTC6953_MP6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:132
output_low
#define output_low(pin)
Set "pin" low.
Definition: Linduino.h:72
QuikEval_EEPROM.h
QuikEval EEPROM Library.
LTC6953_OINV5
#define LTC6953_OINV5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:142
spi_transfer_word
void spi_transfer_word(uint8_t cs_pin, uint16_t tx, uint16_t *rx)
Reads and sends a word.
Definition: LT_SPI.cpp:98
LTC6953_ADEL4
#define LTC6953_ADEL4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:83
LTC6953_OINV3
#define LTC6953_OINV3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:140
LTC6953_NUM_REGADDR
#define LTC6953_NUM_REGADDR
Defines number of LTC6953 SPI registers, used in spi_map array.
Definition: LTC6953.h:183
LTC6953_MODE4
#define LTC6953_MODE4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:119
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/f...
Definition: LTC6953.cpp:191
LTC6953_MODE7
#define LTC6953_MODE7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:122
LTC6953_PD5
#define LTC6953_PD5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:156
LTC6953_SRQEN0
#define LTC6953_SRQEN0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:167
LTC6953_x
#define LTC6953_x
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:181
LTC6953_NUM_REGFIELD
#define LTC6953_NUM_REGFIELD
Defines number of LTC6953 SPI fields, used in spi_map array.
Definition: LTC6953.h:184
LTC6953_OINV1
#define LTC6953_OINV1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:138
LT_SPI.h
LT_SPI: Routines to communicate with ATmega328P&#39;s hardware SPI port.
LTC6953_MD0
#define LTC6953_MD0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:104
LTC6953_PD0
#define LTC6953_PD0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:161
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
Definition: LTC6953.cpp:252
LTC6953_OINV8
#define LTC6953_OINV8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:145
LTC6953_MP1
#define LTC6953_MP1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:127
ADDRx
#define ADDRx
used for 2nd dim of 2d spi_map array
Definition: LTC6945.h:116
LTC6953_init
void LTC6953_init()
Initializes the SPI MAP arrays The values set in initialization are used for all the LTC6953 SPI/WRIT...
Definition: LTC6953.cpp:353
LTC6953_MP2
#define LTC6953_MP2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:128
LTC6953_MP3
#define LTC6953_MP3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:129
LTC6953_DDEL7
#define LTC6953_DDEL7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:97
LTC6953_lkup_tbl
uint8_t LTC6953_lkup_tbl[2][LTC6953_NUM_REGADDR]
created with the LTC6952Wizard tool
Definition: LTC6953.cpp:86
LTC6953_INVSTAT
#define LTC6953_INVSTAT
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:103
LTC6953_PD4
#define LTC6953_PD4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:157
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 add...
Definition: LTC6953.cpp:118
LTC6953_PD6
#define LTC6953_PD6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:155
demo_name
char demo_name[]
Demo Board Name stored in QuikEval EEPROM.
Definition: DC1880A.ino:97
LTC6953_MD1
#define LTC6953_MD1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:105
UserInterface.h
LTC6953_SRQEN8
#define LTC6953_SRQEN8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:175
LTC6953_ADEL10
#define LTC6953_ADEL10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:89
LTC6953_ADEL1
#define LTC6953_ADEL1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:80
LTC6953_MP5
#define LTC6953_MP5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:131
LTC6953_MODE6
#define LTC6953_MODE6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:121
LT_union_int16_2bytes
This union splits one int16_t (16-bit signed integer) or uint16_t (16-bit unsigned integer) into two ...
Definition: Linduino.h:99
LTC6953_MP7
#define LTC6953_MP7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:133
LTC6953_MODE8
#define LTC6953_MODE8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:123
LTC6953_MD4
#define LTC6953_MD4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:108
LTC6953_SRQEN3
#define LTC6953_SRQEN3
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:170
LTC6953_MP0
#define LTC6953_MP0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:126
LTC6953_PD10
#define LTC6953_PD10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:151
LTC6953_VCOOK
#define LTC6953_VCOOK
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:180
LTC6953_PD7
#define LTC6953_PD7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:154
LTC6953_MP8
#define LTC6953_MP8
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:134
LTC6953_REV
#define LTC6953_REV
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:163
LTC6953_PART
#define LTC6953_PART
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:148
i
static int i
Definition: DC2430A.ino:184
LTC6953_MODE1
#define LTC6953_MODE1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:116
LTC6953_SRQEN10
#define LTC6953_SRQEN10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:177
LTC6953_MODE10
#define LTC6953_MODE10
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:125
LTC6953_CS
#define LTC6953_CS
Define the SPI CS pin.
Definition: LTC6953.h:76
get_LTC6953_REGSIZE
uint8_t get_LTC6953_REGSIZE()
returns # of addresses in parts register map (array size)
Definition: LTC6953.cpp:242
LTC6953_ADEL7
#define LTC6953_ADEL7
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:86
LTC6953_OINV4
#define LTC6953_OINV4
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:141
LT_union_int16_2bytes::LT_byte
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
LTC6953_MODE9
#define LTC6953_MODE9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:124
QUIKEVAL_CS
#define QUIKEVAL_CS
QuikEval CS pin (SPI chip select on QuikEval connector pin 6) connects to Arduino SS pin...
Definition: Linduino.h:57
LTC6953_MODE0
#define LTC6953_MODE0
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:115
LTC6953_OINV6
#define LTC6953_OINV6
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:143
LTC6953_SRQEN1
#define LTC6953_SRQEN1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:168
LTC6953_MP9
#define LTC6953_MP9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:135
read_quikeval_id_string
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...
Definition: QuikEval_EEPROM.cpp:77
ui_buffer
char ui_buffer[UI_BUFFER_SIZE]
Definition: UserInterface.cpp:46
LTC6953_ADEL2
#define LTC6953_ADEL2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:81
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.
Definition: LTC6953.cpp:470
LTC6953_DDEL5
#define LTC6953_DDEL5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:95
LTC6953_DDEL1
#define LTC6953_DDEL1
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:91
LTC6953_MODE2
#define LTC6953_MODE2
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:117
LTC6953_MODE5
#define LTC6953_MODE5
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:120
LTC6953_read
uint8_t LTC6953_read(uint8_t cs, int8_t address)
LTC6953 Read Single Address reads 8 bit Data field to LTC6953.
Definition: LTC6953.cpp:98
LTC6953_SYSCT
#define LTC6953_SYSCT
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:164
LTC6953_PD9
#define LTC6953_PD9
for spi_map array, defines location for field specific information used to create the spi map ...
Definition: LTC6953.h:152
DxMSB
#define DxMSB
used for 2nd dim of 2d spi_map array
Definition: LTC6945.h:117