| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions | Variables
LTC6951.cpp File Reference
RF, Silicon Oscillators, PLL Synthesizers, and VCOs » LTC6951: Ultra-Low Jitter 2MHz to 2.7GHz Multi-Output Clock Synthesizer with Integrated VCO

Library for LTC6951: Ultra-Low Jitter 2MHz to 2.7GHz Multi-Output Clock Synthesizer with Integrated VCO. More...

## Detailed Description

Library for LTC6951: Ultra-Low Jitter 2MHz to 2.7GHz Multi-Output Clock Synthesizer with Integrated VCO.

Definition in file LTC6951.cpp.

Go to the source code of this file.

## Functions
uint8_t | LTC6951_read (uint8_t cs, int8_t address)
| LTC6951 Read Single Address reads 8 bit Data field to LTC6951. More...
long | LTC6951_read_field (uint8_t cs, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
| LTC6951 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_LTC6951_SPI_FIELD (uint8_t cs, uint8_t f)
| Gets the LTC6951 SPI field value calls function LTC6951_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 | LTC6951_write (uint8_t cs, uint8_t address, uint8_t Data)
| LTC6951 Write Single Address writes 8 bit Data field to LTC6951. More...
uint8_t | LTC6951_write_field (uint8_t cs, long field_data, uint8_t address, uint8_t MSB_loc, uint8_t numbits)
| LTC6951 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...
uint8_t | get_LTC6951_REGSIZE ()
| returns # of addresses in parts register map (array size) More...
uint8_t | get_LTC6951_SPI_FIELD_NUMBITS (uint8_t f)
| returns the number of bits for a given field name in the SPI map More...
uint8_t | get_LTC6951_SPI_FIELD_RW (uint8_t f)
| returns if the given field name is (0)read/write or (1)read_only field More...
void | set_LTC6951_SPI_FIELD (uint8_t cs, uint8_t f, long field_data)
| Sets the LTC6951 SPI field value calls function LTC6951_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_LTC6951_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)
| Writes values to ALL LTC6951 RW addresses. More...
void | set_LTC6951_REGS_lkup_tbl (uint8_t lkup_tbl_row)
| Writes values to ALL LTC6951 RW addresses from a look-up table. More...
void | set_LTC6951_REGS_freq_jump (uint8_t lkup_tbl_row, uint8_t init_setup)
| This function toggles between two frequencies. More...
void | LTC6951_init ()
| Initializes the SPI MAP arrays The values set in initialization are used for all the LTC6951 SPI/WRITE and read functions (set_LTC6951_SPI_FIELD, get_LTC6951_SPI_FIELD, LTC6951_read, LTC6951_write, etc, etc) More...
int8_t | discover_demo_board_local (char *demo_name)
| Read the ID string from the EEPROM and determine if any demo board is connected. More...

## Variables
uint8_t | LTC6951_reg [LTC6951_NUM_REGADDR]
| number of LTC6951 spi addresses More...
uint8_t | LTC6951_spi_map [(LTC6951_NUM_REGFIELD+1)][4]
| LTC6951 spi map, stores MSB address location, MSB bit location, field length in bits, and R or RW capability. More...
uint8_t | LTC6951_lkup_tbl [10][LTC6951_NUM_REGADDR]
| the following settings assume a 100MHz reference input More...

## Function Documentation

## ◆ 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.

Returns 1 if successful, 0 if not successful

Definition at line 831 of file LTC6951.cpp.

## ◆ get_LTC6951_REGSIZE()

uint8_t get_LTC6951_REGSIZE | ( |  | ) |

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

Returns
  # of addresses in parts register map

Definition at line 242 of file LTC6951.cpp.

## ◆ get_LTC6951_SPI_FIELD()

long get_LTC6951_SPI_FIELD | ( | uint8_t | cs,
|  | uint8_t | f
| ) |  |

Gets the LTC6951 SPI field value calls function LTC6951_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

  cs | Chip Select Pin
  f | SPI field number

Definition at line 164 of file LTC6951.cpp.

## ◆ get_LTC6951_SPI_FIELD_NUMBITS()

uint8_t get_LTC6951_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

  f | SPI field number

Definition at line 252 of file LTC6951.cpp.

## ◆ get_LTC6951_SPI_FIELD_RW()

uint8_t get_LTC6951_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

  f | SPI field number

Definition at line 262 of file LTC6951.cpp.

## ◆ LTC6951_init()

void LTC6951_init | ( |  | ) |

Initializes the SPI MAP arrays The values set in initialization are used for all the LTC6951 SPI/WRITE and read functions (set_LTC6951_SPI_FIELD, get_LTC6951_SPI_FIELD, LTC6951_read, LTC6951_write, etc, etc)

Returns
  void

Definition at line 535 of file LTC6951.cpp.

## ◆ LTC6951_read()

uint8_t LTC6951_read | ( | uint8_t | cs,
|  | int8_t | address
| ) |  |

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

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

Returns
  data that was read from address

Parameters

  cs | Chip Select Pin
  address | Register address for the LTC6951.

Definition at line 108 of file LTC6951.cpp.

## ◆ LTC6951_read_field()

long LTC6951_read_field | ( | uint8_t | cs,
|  | uint8_t | address,
|  | uint8_t | MSB_loc,
|  | uint8_t | numbits
| ) |  |

LTC6951 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

  cs | Chip Select Pin
  address | Register address for the LTC6951.
  MSB_loc | MSB bit location of field
  numbits | length of field (i.e. number of bits in field)

Definition at line 128 of file LTC6951.cpp.

## ◆ LTC6951_write()

void LTC6951_write | ( | uint8_t | cs,
|  | uint8_t | address,
|  | uint8_t | Data
| ) |  |

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

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

Returns
  void

Parameters

  cs | Chip Select Pin
  address | Register address for the LTC6951.
  Data | 8-bit data to be written to register

Definition at line 175 of file LTC6951.cpp.

## ◆ LTC6951_write_field()

uint8_t LTC6951_write_field | ( | uint8_t | cs,
|  | long | field_data,
|  | uint8_t | address,
|  | uint8_t | MSB_loc,
|  | uint8_t | numbits
| ) |  |

LTC6951 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

  cs | Chip Select Pin
  field_data | Value field value to be set to
  address | Register address for the LTC6951.
  MSB_loc | MSB bit location of field
  numbits | length of field (i.e. number of bits in field)

Definition at line 191 of file LTC6951.cpp.

## ◆ set_LTC6951_ALLREGS()

void set_LTC6951_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
| ) |  |

Writes values to ALL LTC6951 RW addresses.

Returns
  void

Parameters

  cs | Chip Select Pin
  reg01 | LTC6951 register 1
  reg02 | LTC6951 register 2
  reg03 | LTC6951 register 3
  reg04 | LTC6951 register 4
  reg05 | LTC6951 register 5
  reg06 | LTC6951 register 6
  reg07 | LTC6951 register 7
  reg08 | LTC6951 register 8
  reg09 | LTC6951 register 9
  reg0A | LTC6951 register 10
  reg0B | LTC6951 register 11
  reg0C | LTC6951 register 12
  reg0D | LTC6951 register 13
  reg0E | LTC6951 register 14
  reg0F | LTC6951 register 15
  reg10 | LTC6951 register 16
  reg11 | LTC6951 register 17
  reg12 | LTC6951 register 18

Definition at line 285 of file LTC6951.cpp.

## ◆ set_LTC6951_REGS_freq_jump()

void set_LTC6951_REGS_freq_jump | ( | uint8_t | lkup_tbl_row,
|  | uint8_t | init_setup
| ) |  |

This function toggles between two frequencies.

- if measuring calibration or settling times set SPI clock to max SPI rate (8MHz)
- writes LTC6951 registers from a local look up table
- uses the Multi-byte write option for more efficient data transfer
- Calibrates VCO based on RAO and Autocal bit vales
- DOES NOT SYNC OUTPUTS
- RECOMMENDATION: If measuring settling times with E5052, NOT MUTING OUTPUT DURING CAL can provide more meaningful results
  Returns
    void

Parameters

  lkup_tbl_row | Can be 0 or 1
  init_setup | 0 = not first setup, 1= first setup

Definition at line 430 of file LTC6951.cpp.

## ◆ set_LTC6951_REGS_lkup_tbl()

void set_LTC6951_REGS_lkup_tbl | ( | uint8_t | lkup_tbl_row | ) |

Writes values to ALL LTC6951 RW addresses from a look-up table.

- uses the Multi-byte write option for more efficient data transfer
- Calibrates VCO based on RAO and Autocal bit vales
- Either SPI Syncs or recommends the use to SYNC pin based on RAO, SN and SR values
  Returns
    void

Parameters

  lkup_tbl_row | Any number 0-9, lookup table has 10 options

Definition at line 322 of file LTC6951.cpp.

## ◆ set_LTC6951_SPI_FIELD()

void set_LTC6951_SPI_FIELD | ( | uint8_t | cs,
|  | uint8_t | f,
|  | long | field_data
| ) |  |

Sets the LTC6951 SPI field value calls function LTC6951_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

  cs | Chip Select Pin
  f | SPI field number
  field_data | Value field value to be set to

Definition at line 275 of file LTC6951.cpp.

## Variable Documentation

## ◆ LTC6951_lkup_tbl

uint8_t LTC6951_lkup_tbl[10][LTC6951_NUM_REGADDR]

Initial value:
=
{
{0x05, 0xba, 0x00, 0x78, 0xb3, 0x04, 0x30, 0x07, 0x00, 0x92, 0x00, 0x92, 0x00, 0x92, 0x00, 0x92, 0x00, 0x92, 0x00, 0x11},
{0x05, 0xba, 0x00, 0x74, 0xa3, 0x04, 0x06, 0x07, 0x00, 0x12, 0x00, 0x92, 0x06, 0x92, 0x06, 0x92, 0x06, 0x92, 0x06, 0x11},
{0x05, 0xba, 0x00, 0x74, 0xa3, 0x04, 0x06, 0x07, 0x00, 0x12, 0x00, 0x92, 0x06, 0x92, 0x06, 0x92, 0x06, 0x92, 0x06, 0x11},
{0x05, 0xba, 0x00, 0x74, 0xa3, 0x04, 0x06, 0x07, 0x00, 0x12, 0xc0, 0x92, 0x06, 0x92, 0x06, 0x92, 0x06, 0x92, 0x06, 0x11},
{0x05, 0xba, 0x00, 0x78, 0xb3, 0x04, 0x32, 0x07, 0x00, 0x90, 0x00, 0x90, 0x00, 0x90, 0x00, 0x90, 0x00, 0x92, 0x00, 0x11},
{0x05, 0xba, 0x00, 0x74, 0x83, 0x04, 0x19, 0x07, 0x00, 0x10, 0x00, 0x90, 0x07, 0x90, 0x07, 0x90, 0x07, 0x92, 0x07, 0x11},
{0x05, 0xba, 0x00, 0x74, 0xa3, 0x04, 0x06, 0x07, 0x00, 0x12, 0x00, 0x90, 0x06, 0x90, 0x06, 0x90, 0x06, 0x92, 0x06, 0x11},
{0x05, 0xba, 0x00, 0x74, 0x83, 0x04, 0x19, 0x07, 0x00, 0x10, 0xc0, 0x90, 0x07, 0x90, 0x07, 0x90, 0x07, 0x92, 0x07, 0x11},
{0x00, 0xba, 0x00, 0x74, 0x93, 0x04, 0x14, 0x07, 0x00, 0x20, 0xc0, 0xd3, 0x05, 0x30, 0x00, 0xdb, 0x09, 0x95, 0x05, 0x00},
{0x00, 0xba, 0x00, 0x74, 0x93, 0x04, 0x14, 0x07, 0x00, 0x20, 0xc0, 0xd3, 0x05, 0x30, 0x00, 0xdb, 0x09, 0x9b, 0x09, 0x00}
}

the following settings assume a 100MHz reference input

LTC6951 Configuration look-up table

Definition at line 88 of file LTC6951.cpp.

## ◆ LTC6951_reg

uint8_t LTC6951_reg[LTC6951_NUM_REGADDR]

number of LTC6951 spi addresses

Definition at line 85 of file LTC6951.cpp.

## ◆ LTC6951_spi_map

uint8_t LTC6951_spi_map[(LTC6951_NUM_REGFIELD+1)][4]

LTC6951 spi map, stores MSB address location, MSB bit location, field length in bits, and R or RW capability.

Definition at line 86 of file LTC6951.cpp.