Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

LTC6950: 1.4GHz Low Phase Noise, Low Jitter PLL with Clock Distribution. More...

Detailed Description

LTC6950: 1.4GHz Low Phase Noise, Low Jitter PLL with Clock Distribution.

 SPI DATA FORMAT (MSB First):

 Write Sequence:
       Byte #1                    Byte #2
 MOSI: A6 A5 A4 A3 A2 A1 A0 W   D7 D6 D5 D4 D3 D2 D1 D0
 MISO: X  X  X  X  X  X  X  X   X  X  X  X  X  X  X  X

 Read Sequence:
       Byte #1                    Byte #2
 MOSI: A6 A5 A4 A3 A2 A1 A0 R   X  X  X  X  X  X  X  X
 MISO: X  X  X  X  X  X  X  X   D7 D6 D5 D4 D3 D2 D1 D0

 W    : SPI Write (0)
 R    : SPI Read  (1)
 Ax   : Address
 Dx   : Data Bits
 X    : Don't care

http://www.linear.com/product/LTC6950

http://www.linear.com/product/LTC6950#demoboards

Copyright 2018(c) Analog Devices, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  • The use of this software may or may not infringe the patent rights of one or more patent holders. This license does not release you from the requirement that you obtain separate licenses from these patent holders to use this software.
  • Use of the software either in source or binary form, must be run on or directly connected to an Analog Devices Inc. component.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Header for LTC6950: 1.4GHz Low Phase Noise, Low Jitter PLL with Clock Distribution

Definition in file LTC6950.h.

Go to the source code of this file.

Functions

uint8_t LTC6950_read (uint8_t cs, int8_t address)
 LTC6950 Read Single Address reads 8 bit Data field to LTC6950. More...
 
long LTC6950_read_field (uint8_t cs, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
 LTC6950 Read Single Field For SPI FIELDS located in 1 or multiple address location reads specific address locations identifies and returns specific field in question can handle SPI fields in multiple addresses, if MSB bit is in the lower number address. More...
 
long get_LTC6950_SPI_FIELD (uint8_t cs, uint8_t f)
 Gets the LTC6950 SPI field value calls function LTC6950_read_field, which reads specific address locations identifies and returns specific field in question can handle SPI fields in multiple addresses, if MSB bit is in the lower number address. More...
 
void LTC6950_write (uint8_t cs, uint8_t address, uint8_t Data)
 LTC6950 Write Single Address writes 8 bit Data field to LTC6950. More...
 
uint8_t LTC6950_write_field (uint8_t cs, long field_data, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
 LTC6950 Write Single Field For SPI FIELDS in 1 or multiple address locations reads specific address/field location then writes to specific field can handle SPI fields in multiple addresses, if MSB bit is in the lower number address. More...
 
void set_LTC6950_SPI_FIELD (uint8_t cs, uint8_t f, long field_data)
 Sets the LTC6950 SPI field value calls function LTC6950_read_field, which reads specific address/field location then writes to specific field can handle SPI fields in multiple addresses, if MSB bit is in the lower number address. More...
 
void set_LTC6950_ALLREGS (uint8_t cs, uint8_t reg01, uint8_t reg02, uint8_t reg03, uint8_t reg04, uint8_t reg05, uint8_t reg06, uint8_t reg07, uint8_t reg08, uint8_t reg09, uint8_t reg0A, uint8_t reg0B, uint8_t reg0C, uint8_t reg0D, uint8_t reg0E, uint8_t reg0F, uint8_t reg10, uint8_t reg11, uint8_t reg12, uint8_t reg13, uint8_t reg14, uint8_t reg15)
 Writes values to ALL LTC6950 RW addresses. More...
 
void LTC6950_init ()
 Initializes the SPI MAP arrays The values set in initialization are used for all the LTC6950 SPI/WRITE and read functions (set_LTC6950_SPI_FIELD, get_LTC6950_SPI_FIELD, LTC6950_read, LTC6950_write, etc, etc) More...
 
uint8_t get_LTC6950_REGSIZE ()
 returns # of addresses in parts register map (array size) More...
 
uint8_t get_LTC6950_SPI_FIELD_NUMBITS (uint8_t f)
 returns the number of bits for a given field name in the SPI map More...
 
uint8_t get_LTC6950_SPI_FIELD_RW (uint8_t f)
 returns if the given field name is (0)read/write or (1)read_only field More...
 
unsigned long LTC6950_calc_odiv (unsigned long frf[2])
 calculates the output divider setting based on the frf and on board VCO frequencies of LTC6950 More...
 
void LTC6950_set_frf ()
 FUNCTION: LTC6950_set_frf Calculates the integer (N) and output divider (OD) SPI values using self created 64bit math functions. More...
 
void set_LTC6950_global_fref (unsigned long fref_MHz, unsigned long fref_Hz)
 sets globals LTC6950_Fref_MHz and LTC6950_Fref_Hz More...
 
void set_LTC6950_global_frf (unsigned long frf_MHz, unsigned long frf_Hz)
 sets globals LTC6950_Frf_MHz and LTC6950_Frf_Hz More...
 
void set_LTC6950_global_vcolim (unsigned long fvco_max_MHz, unsigned long fvco_max_Hz, unsigned long fvco_min_MHz, unsigned long fvco_min_Hz)
 sets globals LTC6950_VCO_Max_Freq_MHz, LTC6950_VCO_Max_Freq_Hz, LTC6950_VCO_Min_Freq_MHz and LTC6950_VCO_Min_Freq_Hz More...
 
unsigned long get_LTC6950_global_fref_MHz ()
 returns global LTC6950_Fref_MHz More...
 
unsigned long get_LTC6950_global_fref_Hz ()
 returns global LTC6950_Fref_Hz More...
 
unsigned long get_LTC6950_global_frf_MHz ()
 returns global LTC6950_Frf_MHz More...
 
unsigned long get_LTC6950_global_frf_Hz ()
 returns global LTC6950_Frf_Hz More...
 
unsigned long get_LTC6950_global_VCO_MAX_MHz ()
 returns global LTC6950_VCO_Max_Freq_MHz More...
 
unsigned long get_LTC6950_global_VCO_MIN_MHz ()
 returns global LTC6950_VCO_Min_Freq_MHz More...
 
unsigned long get_LTC6950_global_VCO_MAX_Hz ()
 returns global LTC6950_VCO_Max_Freq_Hz More...
 
unsigned long get_LTC6950_global_VCO_MIN_Hz ()
 returns global LTC6950_VCO_Min_Freq_Hz More...
 
void HZto64 (unsigned long an[], unsigned long MHzPart, unsigned long HzPart)
 create a 64 bit Hz number from 32 bit xxxx MHz number and 32 bit yyy yyy Hz number. More...
 
void init64 (unsigned long an[], unsigned long bigPart, unsigned long littlePart)
 Creates a equivalent 64 bit number from 2 32 bit numbers. More...
 
void shl64 (unsigned long an[])
 Single Bit shift left of equivalent 64 bit number (an[] = an[]<<1) More...
 
void shl64by (unsigned long an[], uint8_t shiftnum)
 Multi Bit shift left of equivalent 64 bit number (an[] = an[]<<shiftnum) More...
 
void shr64 (unsigned long an[])
 Single Bit shift right of equivalent 64 bit number (an[] = an[]<<1) More...
 
void shr64by (unsigned long an[], uint8_t shiftnum)
 Multi Bit shift right of equivalent 64 bit number (an[] = an[]>>shiftnum) More...
 
void add64 (unsigned long an[], unsigned long ann[])
 64 bit Add ann to an (an[] = an[] + ann[]) More...
 
void sub64 (unsigned long an[], unsigned long ann[])
 64 bit Subtract ann from an (an[] = an[] - ann[]) More...
 
boolean eq64 (unsigned long an[], unsigned long ann[])
 64 bit, if an == ann, then true More...
 
boolean lt64 (unsigned long an[], unsigned long ann[])
 64 bit, if an < ann, then true More...
 
void div64 (unsigned long num[], unsigned long den[])
 64 bit Divide, num=num/div More...
 
void mul64 (unsigned long an[], unsigned long ann[])
 64 bit multiply, an=an*ann More...
 
void prt (unsigned long an[])
 Prints HEX representation of 64 bit an. More...
 

Macros

#define LTC6950_CS   QUIKEVAL_CS
 Define the SPI CS pin. More...
 
LTC6950 Registers Fields in Alphabetical Order
#define LTC6950_CMSINV   1
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_CP   2
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_CPCHI   3
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_CPCLO   4
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_CPDN   5
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_CPINV   6
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_CPMID   7
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_CPRST   8
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_CPUP   9
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_CPWIDE   10
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_DEL0   11
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_DEL1   12
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_DEL2   13
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_DEL3   14
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_DEL4   15
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_FILTR   16
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_FILTV   17
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_FLDRV0   18
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_FLDRV1   19
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_FLDRV2   20
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_FLDRV3   21
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_FLDRV4   22
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_IBIAS0   23
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_IBIAS1   24
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_IBIAS2   25
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_IBIAS3   26
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_INV_ST1   27
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_INV_ST2   28
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_LKCT   29
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_LKEN   30
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_LKWIN   31
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_LOCK   32
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_LVCMS   33
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_M0   34
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_M1   35
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_M2   36
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_M3   37
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_M4   38
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_N   39
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_NO_REF   40
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_NO_VCO   41
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PART   42
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PDALL   43
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PD_DIV0   44
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PD_DIV1   45
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PD_DIV2   46
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PD_DIV3   47
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PD_DIV4   48
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PD_OUT0   49
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PD_OUT1   50
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PD_OUT2   51
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PD_OUT3   52
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PD_OUT4   53
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PDPLL   54
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PDREFAC   55
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_PDVCOAC   56
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_R   57
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_RDIVOUT   58
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_RES6950   59
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_RESET_R   60
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_RESET_N   61
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_REV   62
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_SM1   63
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_SM2   64
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_SYNCMD   65
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_SYNC_EN0   66
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_SYNC_EN1   67
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_SYNC_EN2   68
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_SYNC_EN3   69
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_SYNC_EN4   70
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_THI   71
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_TLO   72
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_UNLOCK   73
 for spi_map array, defines location for field specific information used to create the spi map More...
 
#define LTC6950_NUM_REGADDR   23
 Defines number of LTC6950 SPI registers, used in spi_map array. More...
 
#define LTC6950_NUM_REGFIELD   73
 Defines number of LTC6950 SPI fields, used in spi_map array. More...
 
#define ADDRx   0
 used for 2nd dim of 2d spi_map array More...
 
#define DxMSB   1
 used for 2nd dim of 2d spi_map array More...
 
#define NUMBITS   2
 used for 2nd dim of 2d spi_map array More...
 
#define R_ONLY   3
 used for 2nd dim of 2d spi_map array More...
 
#define OneMHz   1000000L
 1MHz in long format, used in 64 bit math More...
 
#define LTC6950_MINFREQ   0
 LTC6950 lower freq limit. More...
 
#define LTC6950_MAXFREQ   1400
 LTC6950 upper freq limit. More...
 
#define LTC6950_MIN_REF_FREQ   2
 LTC6950 lower reference frequency limit. More...
 
#define LTC6950_MAX_REF_FREQ   250
 LTC6950 upper reference frequency limit. More...
 

Function Documentation

◆ add64()

void add64 ( unsigned long  an[],
unsigned long  ann[] 
)

64 bit Add ann to an (an[] = an[] + ann[])

Returns
void
Parameters
an64 bit number, in 1x2 32bit array
ann64 bit number, in 1x2 32bit array

Definition at line 810 of file LTC6945.cpp.

◆ div64()

void div64 ( unsigned long  num[],
unsigned long  den[] 
)

64 bit Divide, num=num/div

Returns
void
Parameters
numnumerator: 64 bit number, in 1x2 32bit array
dendenominator: 64 bit number, in 1x2 32bit array

Definition at line 859 of file LTC6945.cpp.

◆ eq64()

boolean eq64 ( unsigned long  an[],
unsigned long  ann[] 
)

64 bit, if an == ann, then true

Returns
true, if an==ann; false, if an<>ann
Parameters
an64 bit number, in 1x2 32bit array
ann64 bit number, in 1x2 32bit array

Definition at line 838 of file LTC6945.cpp.

◆ get_LTC6950_global_fref_Hz()

unsigned long get_LTC6950_global_fref_Hz ( )

returns global LTC6950_Fref_Hz

Returns
LTC6950_Fref_Hz

Definition at line 646 of file LTC6950.cpp.

◆ get_LTC6950_global_fref_MHz()

unsigned long get_LTC6950_global_fref_MHz ( )

returns global LTC6950_Fref_MHz

Returns
LTC6950_Fref_MHz

Definition at line 641 of file LTC6950.cpp.

◆ get_LTC6950_global_frf_Hz()

unsigned long get_LTC6950_global_frf_Hz ( )

returns global LTC6950_Frf_Hz

Returns
LTC6950_Frf_Hz

Definition at line 656 of file LTC6950.cpp.

◆ get_LTC6950_global_frf_MHz()

unsigned long get_LTC6950_global_frf_MHz ( )

returns global LTC6950_Frf_MHz

Returns
LTC6950_Frf_MHz

Definition at line 651 of file LTC6950.cpp.

◆ get_LTC6950_global_VCO_MAX_Hz()

unsigned long get_LTC6950_global_VCO_MAX_Hz ( )

returns global LTC6950_VCO_Max_Freq_Hz

Returns
LTC6950_VCO_Max_Freq_Hz

Definition at line 671 of file LTC6950.cpp.

◆ get_LTC6950_global_VCO_MAX_MHz()

unsigned long get_LTC6950_global_VCO_MAX_MHz ( )

returns global LTC6950_VCO_Max_Freq_MHz

Returns
LTC6950_VCO_Max_Freq_MHz

Definition at line 661 of file LTC6950.cpp.

◆ get_LTC6950_global_VCO_MIN_Hz()

unsigned long get_LTC6950_global_VCO_MIN_Hz ( )

returns global LTC6950_VCO_Min_Freq_Hz

Returns
LTC6950_VCO_Min_Freq_Hz

Definition at line 676 of file LTC6950.cpp.

◆ get_LTC6950_global_VCO_MIN_MHz()

unsigned long get_LTC6950_global_VCO_MIN_MHz ( )

returns global LTC6950_VCO_Min_Freq_MHz

Returns
LTC6950_VCO_Min_Freq_MHz

Definition at line 666 of file LTC6950.cpp.

◆ get_LTC6950_REGSIZE()

uint8_t get_LTC6950_REGSIZE ( )

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

Returns
# of addresses in parts register map

Definition at line 239 of file LTC6950.cpp.

◆ get_LTC6950_SPI_FIELD()

long get_LTC6950_SPI_FIELD ( uint8_t  cs,
uint8_t  f 
)

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

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

Definition at line 161 of file LTC6950.cpp.

◆ get_LTC6950_SPI_FIELD_NUMBITS()

uint8_t get_LTC6950_SPI_FIELD_NUMBITS ( uint8_t  f)

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

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

Definition at line 249 of file LTC6950.cpp.

◆ get_LTC6950_SPI_FIELD_RW()

uint8_t get_LTC6950_SPI_FIELD_RW ( uint8_t  f)

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

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

Definition at line 259 of file LTC6950.cpp.

◆ HZto64()

void HZto64 ( unsigned long  an[],
unsigned long  MHzPart,
unsigned long  HzPart 
)

create a 64 bit Hz number from 32 bit xxxx MHz number and 32 bit yyy yyy Hz number.

A) if an < 2^32 bits:

  • an(upper 32b) = 0;
  • an(lower 32b) = MHzPart(32b)*1MHz + HzPart (32b)

B) if an > 2^32 bits (4,294,967,296):

  • an(upper 32b) = 1
  • an(lower 32b) = ((MHzPart-4294)*1MHz+HzPart)-967296
    Returns
    void
Parameters
an64 bit number, 1x2 32 bit array
MHzPartinteger in MHZ
HzPartinteger in Hz

Definition at line 729 of file LTC6945.cpp.

◆ init64()

void init64 ( unsigned long  an[],
unsigned long  bigPart,
unsigned long  littlePart 
)

Creates a equivalent 64 bit number from 2 32 bit numbers.

  • an[0]=bigPart upper 32 bits
  • an[1]=littlePart lower 32 bits
    Returns
    void
Parameters
an64 bit number, 1x2 32 bit array
bigPartupper 32 bits
littlePartlower 32 bits

Definition at line 712 of file LTC6945.cpp.

◆ lt64()

boolean lt64 ( unsigned long  an[],
unsigned long  ann[] 
)

64 bit, if an < ann, then true

Returns
true, if an<ann; false, if an=>ann
Parameters
an64 bit number, in 1x2 32bit array
ann64 bit number, in 1x2 32bit array

Definition at line 848 of file LTC6945.cpp.

◆ LTC6950_calc_odiv()

unsigned long LTC6950_calc_odiv ( unsigned long  frf[2])

calculates the output divider setting based on the frf and on board VCO frequencies of LTC6950

Returns
odiv = 1-6 divider setting for valid frequency, or 999 for invalid odiv
Parameters
frfoutput frequency

Definition at line 687 of file LTC6950.cpp.

◆ LTC6950_init()

void LTC6950_init ( )

Initializes the SPI MAP arrays The values set in initialization are used for all the LTC6950 SPI/WRITE and read functions (set_LTC6950_SPI_FIELD, get_LTC6950_SPI_FIELD, LTC6950_read, LTC6950_write, etc, etc)

Returns
void

Definition at line 319 of file LTC6950.cpp.

◆ LTC6950_read()

uint8_t LTC6950_read ( uint8_t  cs,
int8_t  address 
)

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

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

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

Definition at line 105 of file LTC6950.cpp.

◆ LTC6950_read_field()

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

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

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

Definition at line 125 of file LTC6950.cpp.

◆ LTC6950_set_frf()

void LTC6950_set_frf ( )

FUNCTION: LTC6950_set_frf Calculates the integer (N) and output divider (OD) SPI values using self created 64bit math functions.

For Out0 only. Use menu 3 to set dividers to achieve desired frequencies on other outputs.

Datasheet equations

  • fvco = fpfd*(N + F)
  • frf = fvco/O
  • fpfd = fref/R

    can be modified to the following equations

    • N = (int) (fvco/fpfd) = (int) frf*O*R/fref

    where

    • N = ndiv, O= M0div in the code below

    Linduino One (Arduino Uno) is limited to 32 bit floats/double/long. 32 bit math functions will create rounding errors with the above equations, tha can result in frequency errors. Therefore, the following code uses self created 64bit functions for 64bit integer math.

    • frf (33 bits) LTC6950 max frf/fvco = 1.4GHZ, which is 23 bit number (2^31 = 2.147G)
    • fref (23 bits) LTC6950 min fref = 2MHz, which is a 20 bit number (2^20 = 1.05M)
    • O (6 bits)
    • R (10 bits)

    step 1: create 64 bit frf and fref numbers

    step 2: calculate O (output divider)

    step 3: get current R-divider setting

    step 4: calculate frf*O*R

    • max bit count/resolution: 31b+6b+10b= 47b

    step 5: calculate N(11b), using value from step 1

    • N = (int) frf*O*R/fref
    • max bit count/resolution: 47b-20b = 27b

    step 6: find N for closest frequency - accounts for rounding with integer math

    • 64b-47b=17b (using 16b instead of 17b)
Returns
void

Definition at line 766 of file LTC6950.cpp.

◆ LTC6950_write()

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

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

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

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

Definition at line 172 of file LTC6950.cpp.

◆ LTC6950_write_field()

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

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

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

Definition at line 188 of file LTC6950.cpp.

◆ mul64()

void mul64 ( unsigned long  an[],
unsigned long  ann[] 
)

64 bit multiply, an=an*ann

Returns
void
Parameters
an64 bit number, in 1x2 32bit array
ann64 bit number, in 1x2 32bit array

Definition at line 906 of file LTC6945.cpp.

◆ prt()

void prt ( unsigned long  an[])

Prints HEX representation of 64 bit an.

Returns
void
Parameters
an64 bit number, in 1x2 32bit array

Definition at line 698 of file LTC6945.cpp.

◆ set_LTC6950_ALLREGS()

void set_LTC6950_ALLREGS ( uint8_t  cs,
uint8_t  reg01,
uint8_t  reg02,
uint8_t  reg03,
uint8_t  reg04,
uint8_t  reg05,
uint8_t  reg06,
uint8_t  reg07,
uint8_t  reg08,
uint8_t  reg09,
uint8_t  reg0A,
uint8_t  reg0B,
uint8_t  reg0C,
uint8_t  reg0D,
uint8_t  reg0E,
uint8_t  reg0F,
uint8_t  reg10,
uint8_t  reg11,
uint8_t  reg12,
uint8_t  reg13,
uint8_t  reg14,
uint8_t  reg15 
)

Writes values to ALL LTC6950 RW addresses.

Returns
void
Parameters
csChip Select Pin
reg01LTC6950 register 1
reg02LTC6950 register 2
reg03LTC6950 register 3
reg04LTC6950 register 4
reg05LTC6950 register 5
reg06LTC6950 register 6
reg07LTC6950 register 7
reg08LTC6950 register 8
reg09LTC6950 register 9
reg0ALTC6950 register 10
reg0BLTC6950 register 11
reg0CLTC6950 register 12
reg0DLTC6950 register 13
reg0ELTC6950 register 14
reg0FLTC6950 register 15
reg10LTC6950 register 16
reg11LTC6950 register 17
reg12LTC6950 register 18
reg13LTC6950 register 19
reg14LTC6950 register 20
reg15LTC6950 register 21

Definition at line 282 of file LTC6950.cpp.

◆ set_LTC6950_global_fref()

void set_LTC6950_global_fref ( unsigned long  fref_MHz,
unsigned long  fref_Hz 
)

sets globals LTC6950_Fref_MHz and LTC6950_Fref_Hz

Returns
void

Definition at line 619 of file LTC6950.cpp.

◆ set_LTC6950_global_frf()

void set_LTC6950_global_frf ( unsigned long  frf_MHz,
unsigned long  frf_Hz 
)

sets globals LTC6950_Frf_MHz and LTC6950_Frf_Hz

Returns
void

Definition at line 625 of file LTC6950.cpp.

◆ set_LTC6950_global_vcolim()

void set_LTC6950_global_vcolim ( unsigned long  fvco_max_MHz,
unsigned long  fvco_max_Hz,
unsigned long  fvco_min_MHz,
unsigned long  fvco_min_Hz 
)

sets globals LTC6950_VCO_Max_Freq_MHz, LTC6950_VCO_Max_Freq_Hz, LTC6950_VCO_Min_Freq_MHz and LTC6950_VCO_Min_Freq_Hz

Returns
void

Definition at line 631 of file LTC6950.cpp.

◆ set_LTC6950_SPI_FIELD()

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

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

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

Definition at line 272 of file LTC6950.cpp.

◆ shl64()

void shl64 ( unsigned long  an[])

Single Bit shift left of equivalent 64 bit number (an[] = an[]<<1)

Returns
void
Parameters
anan[] = an[]<<1

Definition at line 748 of file LTC6945.cpp.

◆ shl64by()

void shl64by ( unsigned long  an[],
uint8_t  shiftnum 
)

Multi Bit shift left of equivalent 64 bit number (an[] = an[]<<shiftnum)

Returns
void
Parameters
anan[] = an[]<<shiftnum
shiftnumnumber of bits to shift left

Definition at line 774 of file LTC6945.cpp.

◆ shr64()

void shr64 ( unsigned long  an[])

Single Bit shift right of equivalent 64 bit number (an[] = an[]<<1)

Returns
void
Parameters
anan[] = an[]>>shiftnum

Definition at line 761 of file LTC6945.cpp.

◆ shr64by()

void shr64by ( unsigned long  an[],
uint8_t  shiftnum 
)

Multi Bit shift right of equivalent 64 bit number (an[] = an[]>>shiftnum)

Returns
void
Parameters
anan[] = an[]>>shiftnum
shiftnumnumber of bits to shift right

Definition at line 792 of file LTC6945.cpp.

◆ sub64()

void sub64 ( unsigned long  an[],
unsigned long  ann[] 
)

64 bit Subtract ann from an (an[] = an[] - ann[])

Returns
void
Parameters
an64 bit number, in 1x2 32bit array
ann64 bit number, in 1x2 32bit array

Definition at line 823 of file LTC6945.cpp.

Macro Definition Documentation

◆ ADDRx

#define ADDRx   0

used for 2nd dim of 2d spi_map array

Definition at line 159 of file LTC6950.h.

◆ DxMSB

#define DxMSB   1

used for 2nd dim of 2d spi_map array

Definition at line 160 of file LTC6950.h.

◆ LTC6950_CMSINV

#define LTC6950_CMSINV   1

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 81 of file LTC6950.h.

◆ LTC6950_CP

#define LTC6950_CP   2

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 82 of file LTC6950.h.

◆ LTC6950_CPCHI

#define LTC6950_CPCHI   3

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 83 of file LTC6950.h.

◆ LTC6950_CPCLO

#define LTC6950_CPCLO   4

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 84 of file LTC6950.h.

◆ LTC6950_CPDN

#define LTC6950_CPDN   5

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 85 of file LTC6950.h.

◆ LTC6950_CPINV

#define LTC6950_CPINV   6

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 86 of file LTC6950.h.

◆ LTC6950_CPMID

#define LTC6950_CPMID   7

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 87 of file LTC6950.h.

◆ LTC6950_CPRST

#define LTC6950_CPRST   8

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 88 of file LTC6950.h.

◆ LTC6950_CPUP

#define LTC6950_CPUP   9

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 89 of file LTC6950.h.

◆ LTC6950_CPWIDE

#define LTC6950_CPWIDE   10

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 90 of file LTC6950.h.

◆ LTC6950_CS

#define LTC6950_CS   QUIKEVAL_CS

Define the SPI CS pin.

Definition at line 76 of file LTC6950.h.

◆ LTC6950_DEL0

#define LTC6950_DEL0   11

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 91 of file LTC6950.h.

◆ LTC6950_DEL1

#define LTC6950_DEL1   12

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 92 of file LTC6950.h.

◆ LTC6950_DEL2

#define LTC6950_DEL2   13

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 93 of file LTC6950.h.

◆ LTC6950_DEL3

#define LTC6950_DEL3   14

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 94 of file LTC6950.h.

◆ LTC6950_DEL4

#define LTC6950_DEL4   15

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 95 of file LTC6950.h.

◆ LTC6950_FILTR

#define LTC6950_FILTR   16

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 96 of file LTC6950.h.

◆ LTC6950_FILTV

#define LTC6950_FILTV   17

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 97 of file LTC6950.h.

◆ LTC6950_FLDRV0

#define LTC6950_FLDRV0   18

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 98 of file LTC6950.h.

◆ LTC6950_FLDRV1

#define LTC6950_FLDRV1   19

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 99 of file LTC6950.h.

◆ LTC6950_FLDRV2

#define LTC6950_FLDRV2   20

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 100 of file LTC6950.h.

◆ LTC6950_FLDRV3

#define LTC6950_FLDRV3   21

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 101 of file LTC6950.h.

◆ LTC6950_FLDRV4

#define LTC6950_FLDRV4   22

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 102 of file LTC6950.h.

◆ LTC6950_IBIAS0

#define LTC6950_IBIAS0   23

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 103 of file LTC6950.h.

◆ LTC6950_IBIAS1

#define LTC6950_IBIAS1   24

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 104 of file LTC6950.h.

◆ LTC6950_IBIAS2

#define LTC6950_IBIAS2   25

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 105 of file LTC6950.h.

◆ LTC6950_IBIAS3

#define LTC6950_IBIAS3   26

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 106 of file LTC6950.h.

◆ LTC6950_INV_ST1

#define LTC6950_INV_ST1   27

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 107 of file LTC6950.h.

◆ LTC6950_INV_ST2

#define LTC6950_INV_ST2   28

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 108 of file LTC6950.h.

◆ LTC6950_LKCT

#define LTC6950_LKCT   29

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 109 of file LTC6950.h.

◆ LTC6950_LKEN

#define LTC6950_LKEN   30

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 110 of file LTC6950.h.

◆ LTC6950_LKWIN

#define LTC6950_LKWIN   31

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 111 of file LTC6950.h.

◆ LTC6950_LOCK

#define LTC6950_LOCK   32

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 112 of file LTC6950.h.

◆ LTC6950_LVCMS

#define LTC6950_LVCMS   33

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 113 of file LTC6950.h.

◆ LTC6950_M0

#define LTC6950_M0   34

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 114 of file LTC6950.h.

◆ LTC6950_M1

#define LTC6950_M1   35

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 115 of file LTC6950.h.

◆ LTC6950_M2

#define LTC6950_M2   36

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 116 of file LTC6950.h.

◆ LTC6950_M3

#define LTC6950_M3   37

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 117 of file LTC6950.h.

◆ LTC6950_M4

#define LTC6950_M4   38

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 118 of file LTC6950.h.

◆ LTC6950_MAX_REF_FREQ

#define LTC6950_MAX_REF_FREQ   250

LTC6950 upper reference frequency limit.

Definition at line 170 of file LTC6950.h.

◆ LTC6950_MAXFREQ

#define LTC6950_MAXFREQ   1400

LTC6950 upper freq limit.

Definition at line 167 of file LTC6950.h.

◆ LTC6950_MIN_REF_FREQ

#define LTC6950_MIN_REF_FREQ   2

LTC6950 lower reference frequency limit.

Definition at line 169 of file LTC6950.h.

◆ LTC6950_MINFREQ

#define LTC6950_MINFREQ   0

LTC6950 lower freq limit.

Definition at line 166 of file LTC6950.h.

◆ LTC6950_N

#define LTC6950_N   39

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 119 of file LTC6950.h.

◆ LTC6950_NO_REF

#define LTC6950_NO_REF   40

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 120 of file LTC6950.h.

◆ LTC6950_NO_VCO

#define LTC6950_NO_VCO   41

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 121 of file LTC6950.h.

◆ LTC6950_NUM_REGADDR

#define LTC6950_NUM_REGADDR   23

Defines number of LTC6950 SPI registers, used in spi_map array.

Definition at line 156 of file LTC6950.h.

◆ LTC6950_NUM_REGFIELD

#define LTC6950_NUM_REGFIELD   73

Defines number of LTC6950 SPI fields, used in spi_map array.

Definition at line 157 of file LTC6950.h.

◆ LTC6950_PART

#define LTC6950_PART   42

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 122 of file LTC6950.h.

◆ LTC6950_PD_DIV0

#define LTC6950_PD_DIV0   44

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 124 of file LTC6950.h.

◆ LTC6950_PD_DIV1

#define LTC6950_PD_DIV1   45

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 125 of file LTC6950.h.

◆ LTC6950_PD_DIV2

#define LTC6950_PD_DIV2   46

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 126 of file LTC6950.h.

◆ LTC6950_PD_DIV3

#define LTC6950_PD_DIV3   47

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 127 of file LTC6950.h.

◆ LTC6950_PD_DIV4

#define LTC6950_PD_DIV4   48

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 128 of file LTC6950.h.

◆ LTC6950_PD_OUT0

#define LTC6950_PD_OUT0   49

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 129 of file LTC6950.h.

◆ LTC6950_PD_OUT1

#define LTC6950_PD_OUT1   50

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 130 of file LTC6950.h.

◆ LTC6950_PD_OUT2

#define LTC6950_PD_OUT2   51

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 131 of file LTC6950.h.

◆ LTC6950_PD_OUT3

#define LTC6950_PD_OUT3   52

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 132 of file LTC6950.h.

◆ LTC6950_PD_OUT4

#define LTC6950_PD_OUT4   53

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 133 of file LTC6950.h.

◆ LTC6950_PDALL

#define LTC6950_PDALL   43

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 123 of file LTC6950.h.

◆ LTC6950_PDPLL

#define LTC6950_PDPLL   54

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 134 of file LTC6950.h.

◆ LTC6950_PDREFAC

#define LTC6950_PDREFAC   55

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 135 of file LTC6950.h.

◆ LTC6950_PDVCOAC

#define LTC6950_PDVCOAC   56

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 136 of file LTC6950.h.

◆ LTC6950_R

#define LTC6950_R   57

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 137 of file LTC6950.h.

◆ LTC6950_RDIVOUT

#define LTC6950_RDIVOUT   58

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 138 of file LTC6950.h.

◆ LTC6950_RES6950

#define LTC6950_RES6950   59

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 139 of file LTC6950.h.

◆ LTC6950_RESET_N

#define LTC6950_RESET_N   61

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 141 of file LTC6950.h.

◆ LTC6950_RESET_R

#define LTC6950_RESET_R   60

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 140 of file LTC6950.h.

◆ LTC6950_REV

#define LTC6950_REV   62

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 142 of file LTC6950.h.

◆ LTC6950_SM1

#define LTC6950_SM1   63

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 143 of file LTC6950.h.

◆ LTC6950_SM2

#define LTC6950_SM2   64

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 144 of file LTC6950.h.

◆ LTC6950_SYNC_EN0

#define LTC6950_SYNC_EN0   66

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 146 of file LTC6950.h.

◆ LTC6950_SYNC_EN1

#define LTC6950_SYNC_EN1   67

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 147 of file LTC6950.h.

◆ LTC6950_SYNC_EN2

#define LTC6950_SYNC_EN2   68

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 148 of file LTC6950.h.

◆ LTC6950_SYNC_EN3

#define LTC6950_SYNC_EN3   69

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 149 of file LTC6950.h.

◆ LTC6950_SYNC_EN4

#define LTC6950_SYNC_EN4   70

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 150 of file LTC6950.h.

◆ LTC6950_SYNCMD

#define LTC6950_SYNCMD   65

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 145 of file LTC6950.h.

◆ LTC6950_THI

#define LTC6950_THI   71

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 151 of file LTC6950.h.

◆ LTC6950_TLO

#define LTC6950_TLO   72

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 152 of file LTC6950.h.

◆ LTC6950_UNLOCK

#define LTC6950_UNLOCK   73

for spi_map array, defines location for field specific information used to create the spi map

Definition at line 153 of file LTC6950.h.

◆ NUMBITS

#define NUMBITS   2

used for 2nd dim of 2d spi_map array

Definition at line 161 of file LTC6950.h.

◆ OneMHz

#define OneMHz   1000000L

1MHz in long format, used in 64 bit math

Definition at line 164 of file LTC6950.h.

◆ R_ONLY

#define R_ONLY   3

used for 2nd dim of 2d spi_map array

Definition at line 162 of file LTC6950.h.