76 #define LTC6950_CS QUIKEVAL_CS 81 #define LTC6950_CMSINV 1 83 #define LTC6950_CPCHI 3
84 #define LTC6950_CPCLO 4
85 #define LTC6950_CPDN 5
86 #define LTC6950_CPINV 6
87 #define LTC6950_CPMID 7
88 #define LTC6950_CPRST 8
89 #define LTC6950_CPUP 9
90 #define LTC6950_CPWIDE 10
91 #define LTC6950_DEL0 11
92 #define LTC6950_DEL1 12
93 #define LTC6950_DEL2 13
94 #define LTC6950_DEL3 14
95 #define LTC6950_DEL4 15
96 #define LTC6950_FILTR 16
97 #define LTC6950_FILTV 17
98 #define LTC6950_FLDRV0 18
99 #define LTC6950_FLDRV1 19
100 #define LTC6950_FLDRV2 20
101 #define LTC6950_FLDRV3 21
102 #define LTC6950_FLDRV4 22
103 #define LTC6950_IBIAS0 23
104 #define LTC6950_IBIAS1 24
105 #define LTC6950_IBIAS2 25
106 #define LTC6950_IBIAS3 26
107 #define LTC6950_INV_ST1 27
108 #define LTC6950_INV_ST2 28
109 #define LTC6950_LKCT 29
110 #define LTC6950_LKEN 30
111 #define LTC6950_LKWIN 31
112 #define LTC6950_LOCK 32
113 #define LTC6950_LVCMS 33
114 #define LTC6950_M0 34
115 #define LTC6950_M1 35
116 #define LTC6950_M2 36
117 #define LTC6950_M3 37
118 #define LTC6950_M4 38
120 #define LTC6950_NO_REF 40
121 #define LTC6950_NO_VCO 41
122 #define LTC6950_PART 42
123 #define LTC6950_PDALL 43
124 #define LTC6950_PD_DIV0 44
125 #define LTC6950_PD_DIV1 45
126 #define LTC6950_PD_DIV2 46
127 #define LTC6950_PD_DIV3 47
128 #define LTC6950_PD_DIV4 48
129 #define LTC6950_PD_OUT0 49
130 #define LTC6950_PD_OUT1 50
131 #define LTC6950_PD_OUT2 51
132 #define LTC6950_PD_OUT3 52
133 #define LTC6950_PD_OUT4 53
134 #define LTC6950_PDPLL 54
135 #define LTC6950_PDREFAC 55
136 #define LTC6950_PDVCOAC 56
138 #define LTC6950_RDIVOUT 58
139 #define LTC6950_RES6950 59
140 #define LTC6950_RESET_R 60
141 #define LTC6950_RESET_N 61
142 #define LTC6950_REV 62
143 #define LTC6950_SM1 63
144 #define LTC6950_SM2 64
145 #define LTC6950_SYNCMD 65
146 #define LTC6950_SYNC_EN0 66
147 #define LTC6950_SYNC_EN1 67
148 #define LTC6950_SYNC_EN2 68
149 #define LTC6950_SYNC_EN3 69
150 #define LTC6950_SYNC_EN4 70
151 #define LTC6950_THI 71
152 #define LTC6950_TLO 72
153 #define LTC6950_UNLOCK 73
156 #define LTC6950_NUM_REGADDR 23 157 #define LTC6950_NUM_REGFIELD 73
164 #define OneMHz 1000000L 166 #define LTC6950_MINFREQ 0 167 #define LTC6950_MAXFREQ 1400
169 #define LTC6950_MIN_REF_FREQ 2 170 #define LTC6950_MAX_REF_FREQ 250
371 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);
433 void HZto64(
unsigned long an[],
434 unsigned long MHzPart,
444 void init64(
unsigned long an[],
445 unsigned long bigPart,
446 unsigned long littlePart
452 void shl64(
unsigned long an[]
458 void shl64by(
unsigned long an[],
465 void shr64(
unsigned long an[]
471 void shr64by(
unsigned long an[],
478 void add64(
unsigned long an[],
485 void sub64(
unsigned long an[],
492 boolean eq64(
unsigned long an[],
499 boolean lt64(
unsigned long an[],
506 void div64(
unsigned long num[],
514 void mul64(
unsigned long an[],
521 void prt(
unsigned long an[]
void div64(unsigned long num[], unsigned long den[])
64 bit Divide, num=num/div
void add64(unsigned long an[], unsigned long ann[])
64 bit Add ann to an (an[] = an[] + ann[])
uint8_t get_LTC6950_REGSIZE()
returns # of addresses in parts register map (array size)
void sub64(unsigned long an[], unsigned long ann[])
64 bit Subtract ann from an (an[] = an[] - ann[])
unsigned long get_LTC6950_global_fref_MHz()
returns global LTC6950_Fref_MHz
unsigned long get_LTC6950_global_frf_Hz()
returns global LTC6950_Frf_Hz
void LTC6950_set_frf()
FUNCTION: LTC6950_set_frf Calculates the integer (N) and output divider (OD) SPI values using self cr...
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 add...
void mul64(unsigned long an[], unsigned long ann[])
64 bit multiply, an=an*ann
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.
void init64(unsigned long an[], unsigned long bigPart, unsigned long littlePart)
Creates a equivalent 64 bit number from 2 32 bit numbers.
void set_LTC6950_global_fref(unsigned long fref_MHz, unsigned long fref_Hz)
sets globals LTC6950_Fref_MHz and LTC6950_Fref_Hz
unsigned long get_LTC6950_global_frf_MHz()
returns global LTC6950_Frf_MHz
unsigned long get_LTC6950_global_VCO_MAX_MHz()
returns global LTC6950_VCO_Max_Freq_MHz
void set_LTC6950_global_frf(unsigned long frf_MHz, unsigned long frf_Hz)
sets globals LTC6950_Frf_MHz and LTC6950_Frf_Hz
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
unsigned long get_LTC6950_global_VCO_MIN_MHz()
returns global LTC6950_VCO_Min_Freq_MHz
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_...
unsigned long get_LTC6950_global_fref_Hz()
returns global LTC6950_Fref_Hz
void shr64by(unsigned long an[], uint8_t shiftnum)
Multi Bit shift right of equivalent 64 bit number (an[] = an[]>>shiftnum)
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/f...
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 loca...
unsigned long get_LTC6950_global_VCO_MIN_Hz()
returns global LTC6950_VCO_Min_Freq_Hz
uint8_t LTC6950_read(uint8_t cs, int8_t address)
LTC6950 Read Single Address reads 8 bit Data field to LTC6950.
boolean lt64(unsigned long an[], unsigned long ann[])
64 bit, if an < ann, then true
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 ...
uint8_t get_LTC6950_SPI_FIELD_NUMBITS(uint8_t f)
returns the number of bits for a given field name in the SPI map
void shl64by(unsigned long an[], uint8_t shiftnum)
Multi Bit shift left of equivalent 64 bit number (an[] = an[]<<shiftnum)
boolean eq64(unsigned long an[], unsigned long ann[])
64 bit, if an == ann, then true
void LTC6950_init()
Initializes the SPI MAP arrays The values set in initialization are used for all the LTC6950 SPI/WRIT...
void shl64(unsigned long an[])
Single Bit shift left of equivalent 64 bit number (an[] = an[]<<1)
unsigned long get_LTC6950_global_VCO_MAX_Hz()
returns global LTC6950_VCO_Max_Freq_Hz
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.
void LTC6950_write(uint8_t cs, uint8_t address, uint8_t Data)
LTC6950 Write Single Address writes 8 bit Data field to LTC6950.
void prt(unsigned long an[])
Prints HEX representation of 64 bit an.
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/fiel...
void shr64(unsigned long an[])
Single Bit shift right of equivalent 64 bit number (an[] = an[]<<1)