JQIamo / ADF4350-arduino

Arduino library for interfacing with Analog Devices ADF4350 (and similar) PLL chips.
23 stars 8 forks source link

ADF4350

Communication library to interface with Analog Devices ADF4350 PLL IC. Designed with the ADF4350 evaluation board in mind.

Getting started

In your Arduino sketch, you'll want to include the SPI library in addition to this code:

#include <SPI.h>
#include <ADF4350.h>

#define COM_PIN 32 // sets pin 32 to be the slave-select pin for PLL
ADF4350 PLL(COM_PIN); // declares object PLL of type ADF4350. Will initialize it below.

void setup(){
    SPI.begin();          // for communicating with DDS/PLLs
    SPI.setClockDivider(4);
    SPI.setDataMode(SPI_MODE0);
    delay(500); // give it a sec to warm up

    PLL.initialize(400, 10); // initialize the PLL to output 400 Mhz, using an
                            // onboard reference of 10Mhz

}

Important note

The ADF4350 works with 3.3V logic levels, not 5V. Be careful if you're using an Arduino Uno or similar!

Implemented features

Self-explanatory functions...

Functions you should use after consulting datasheet: