Skip to content

Arduino library for the Analog Devices ADF4351 wideband synthesizer

License

Notifications You must be signed in to change notification settings

msiner/Siner_ADF4351

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Siner_ADF4351

Introduction

This is an Arduino library for the Analog Devices ADF4351 wideband synthesizer. There are other implementations available, but I had a few reasons for implementing it myself.

  1. Learn how to develop an Arduino library
  2. Familiarize myself with the ADF4351
  3. See if I can implement the register calculations using only integer arithmetic
  4. See if I can implement simple (e.g. OOK) modulation
  5. Have fun

Wiring

The microcontroller writes ADF4351 registers using a one-way serial protocol. This library accomodates two different wirings of the serial pins. Each wiring corresponds to a different constructor for the Siner_ADF4351 class.

Wiring 1: Arduino SPI

Arduino Pin ADF4351 Pin
SCK CLK
MOSI DAT
Any digital pin LE
Any digital pin or 3V3 CE

This wiring uses the Arduino built-in SPI to communicate with the chip. In the "simple" example, this wiring is assumed with digital pin 2 connected to CE and digital pin 3 connected to LE. The constructor for this wiring is Siner_ADF4351(int pinLoad, SPIClass& spi). The user is responsible for ensuring CE is set high before programming the synth. The CE pin could also be wired directly to 3V3 to keep the chip enabled.

Wiring 2: bit banging serial with LE

Arduino Pin ADF4351 Pin
Any digital pin CLK
Any digital pin DAT
Any digital pin LE
Any digital pin or 3V3 CE

This wiring does not use the Arduino built-in SPI to communicate with the chip. Instead it uses two digital pins to create a serial one-way connection using bit banging. The constructor for this wiring is Siner_ADF4351(int pinLoad, int pinClock, int pinData). The user is responsible for ensuring CE is set high before programming the synth. The CE pin could also be wired directly to 3V3 to keep the chip enabled.

Examples

simple

The "simple" example programs the chip to a single frequency in setup() and then does nothing in loop().

serial_sig_gen

This example implements runtime control of the synthesizer frequency, power, and output enable via serial text commands (shown below).

HELP: print this help message
STAT: print synth status
REGS: print synth register values
ENAB (0|1): set the synth enable pin high
FREQ freqHz: set the frequency
OUTP (0|1): set the output enable
POWE dbPower: set the output power
INTN (0|1): set integer-N mode
RDOU (0|1): set reference double
RDIV (0|1): set reference divide
MATH: print the intermediate results

About

Arduino library for the Analog Devices ADF4351 wideband synthesizer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published