ADF4153 using Arduino Due

Hello,

Before all im new here at arduino. But i worked with PIC and other MCU-s, so not totally without any knowledge.

But i have never used SPI, and i have a problem now. I have to make a PLL using ADF4153, and given the data from analyzer i would say it works. But my PLL wont move at all. I was hoping someone else tried with this PLL and can provide some help.

Here is the code

#include<SPI.h>
#include<LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
SPISettings settingsA(2000000, MSBFIRST, SPI_MODE1);
const int slaveAPin = 6;
unsigned long Rtristart=0x000003;
unsigned long Rtri=0x3C7;
unsigned long Rdva=0x13C2;
unsigned long Rjedan=0x144191;
unsigned long Rnula;
unsigned long integer;

void setup() {
  SPI.begin();
  lcd.begin(16,2);
  lcd.print("Pisem init");
   pinMode (slaveAPin, OUTPUT);
   delay(100);
   
  SPI.beginTransaction(settingsA);
   digitalWrite(slaveAPin, LOW);
   SPI.transfer(Rtristart>>16);
   SPI.transfer(Rtristart>>8);
   SPI.transfer(Rtristart);
   delay(100);
    digitalWrite(slaveAPin, HIGH);
    SPI.endTransaction();

 SPI.beginTransaction(settingsA);
   digitalWrite(slaveAPin, LOW);
   SPI.transfer(Rtri>>16);
   SPI.transfer(Rtri>>8);
   SPI.transfer(Rtri);
   delay(100);
    digitalWrite(slaveAPin, HIGH);
    SPI.endTransaction();

     SPI.beginTransaction(settingsA);
   digitalWrite(slaveAPin, LOW);
   SPI.transfer(Rdva>>16);
   SPI.transfer(Rdva>>8);
   SPI.transfer(Rdva);
   delay(100);
    digitalWrite(slaveAPin, HIGH);
    SPI.endTransaction();

     SPI.beginTransaction(settingsA);
   digitalWrite(slaveAPin, LOW);
   SPI.transfer(Rjedan>>16);
   SPI.transfer(Rjedan>>8);
   SPI.transfer(Rjedan);
   delay(100);
    digitalWrite(slaveAPin, HIGH);
    SPI.endTransaction();

    delay(1500);

    //integer=2500/20;
    lcd.clear();
    lcd.print("frek 2500M");

    Rnula=0x1F4000;//integer*16384;

     SPI.beginTransaction(settingsA);
   digitalWrite(slaveAPin, LOW);
   SPI.transfer(Rnula>>16);
   SPI.transfer(Rnula>>8);
   SPI.transfer(Rnula);
   delay(100);
    digitalWrite(slaveAPin, HIGH);
    SPI.endTransaction();
    

}

void loop() {

 
  
}

I am not using loop, just trying to set it to a fixed frequency.

Hi,

Welcome to the forum.

Can you post a link to specs/data for the PLL IC please.

Thanks.. Tom... :)

I'd try SPI_MODE0, too, the mode description is very vague :-(

I'd also move most of the code into loop, and insert longer delays, so that the PLL frequency varies continuously.

Hello. Also I have a problem to solve with a card that mounts a adf4153. Someone has made some progress? Thank you