Re: Question ....


Brian Flynn GM8BJF
 

Hi  Gordon,
 I have been using an ADF4351 t generate 27 MHz for an octagon. I am programming it with a Arduino Pro-Mini. I copy the the "sketch" below if that is useful. Also I recently bought another ADF4351 board on Ebay from this seller.
https://www.ebay.co.uk/itm/35MHz-4-4GHz-PLL-RF-Signal-Frequency-Synthesizer-ADF4351-Development-Board-HighQ/253611628632?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2648
It seemed to be the cheapest one around. It arrived promptly and I put it through its paces testing it with the AD evaluation software and a Cypress board. The only thing I did to it was to add a bit PS decoupling to improve the PN to what it should be.
The adf4351 was used to generate 54 MHz from a 10 MHz reference which I then divide by two. It allows the 27 MHz to be "tuned" around.

The code programmes the ADF4351 and then puts the Arduino to sleep to reduce the chance of noise of the SPI bus.

73
Brian GM8BJF
/*
******************************************************
* Sketch for controlling an AD ADF4351 synthesiser
* over its SPI bus.
*                                                          
* This module uses the Arduino SPI library (comes bundled with 
* the Arduino IDE) to enable communication between an
* Arduino program and an SPI  enabled peripheral chip.    
*                                                          
* The routine reads in the hex vales from the sketch and sends
* them to the chip. The hex programming values can be generated
* in the AD programme "Int-N PLL Software" which can be
* downloaded here http://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/EVAL-ADF4113.html#eb-overview
*                                                           
* The SPI library uses pin 13 of the Arduino Uno for clock. 
* Serial data is sent out on pin 11.                                                          
* This routine uses pin 10 as the chip select for the    
* SPI device to be programmed.                                                               
******************************************************
*/
#include <SPI.h>                            //  Links prewritten SPI library into the code
#include <avr/sleep.h>
#define interruptPin 2
void setup()
{
  pinMode(10, OUTPUT);                //  Set SPI pins to be outputs
  pinMode(11, OUTPUT);
  pinMode(13, OUTPUT);
  digitalWrite(10, HIGH);
  digitalWrite(11, HIGH);
  digitalWrite(13, HIGH);

//  Serial.begin(115200);
//  pinMode(LED_BUILTIN,OUTPUT);
//  pinMode(interruptPin,INPUT_PULLUP);
//  digitalWrite(LED_BUILTIN,HIGH);
 
  SPI.begin();                            //  Initialize SPI parameters
  SPI.setBitOrder(MSBFIRST);              //  MSB to be sent first
  SPI.setDataMode(SPI_MODE0);             //  Set for SPI Mode 0
  SPI.setClockDivider(SPI_CLOCK_DIV128);   //  Set clock divider (optional)

                                         

  digitalWrite(10,LOW);         //  Drop chip-select to 0
  SPI.transfer(0x00);          //  Do SPI transfer of R5
  SPI.transfer(0x58);
  SPI.transfer(0x00);
  SPI.transfer(0x05);
  digitalWrite(10,HIGH);       //  Raise chip-select to 1
  digitalWrite(10,LOW);         
  SPI.transfer(0x00);               //  Do SPI transfer of R4
  SPI.transfer(0xEA);
  SPI.transfer(0x00);
  SPI.transfer(0x3C);
  digitalWrite(10,HIGH);       //  Raise chip-select to 1
  digitalWrite(10,LOW);         
  SPI.transfer(0x00);               //  Do SPI transfer of R3
  SPI.transfer(0x00);
  SPI.transfer(0x04);
  SPI.transfer(0xB3);
  digitalWrite(10,HIGH);       //  Raise chip-select to 1
  digitalWrite(10,LOW);         
  SPI.transfer(0x1A);               //  Do SPI transfer of R2
  SPI.transfer(0x00);
  SPI.transfer(0x58);
  SPI.transfer(0x42);
  digitalWrite(10,HIGH);       //  Raise chip-select to 1
  digitalWrite(10,LOW);         
  SPI.transfer(0x00);               //  Do SPI transfer of R1
  SPI.transfer(0x01);
  SPI.transfer(0x80);
  SPI.transfer(0x29);
  digitalWrite(10,HIGH);       //  Raise chip-select to 1
  digitalWrite(10,LOW);         
  SPI.transfer(0x00);               //  Do SPI transfer of R0
  SPI.transfer(0X56);
  SPI.transfer(0x00);
  SPI.transfer(0x20);
  digitalWrite(10,HIGH);       //  Raise chip-select to 1
 
  delay(1000);                 //  Delay loop 1 seconds (pick your time frame)
                              //  Data will be read and sent once every 1 seconds based on this                                          //  See Arduino site or Wikipedia for more info on these settings
}
void loop()
{
 // delay(5000);
 // Going_To_Sleep();
}

_______________________________________________________________

Join UKMicrowaves@groups.io to automatically receive all group messages.