ADF4153 using Arduino Due
hello,
before im new here @ arduino. worked pic , other mcu-s, not totally without knowledge.
but have never used spi, , have problem now. have make pll using adf4153, , given data analyzer works. pll wont move @ all. hoping else tried pll , can provide help.
here code
i not using loop, trying set fixed frequency.
before im new here @ arduino. worked pic , other mcu-s, not totally without knowledge.
but have never used spi, , have problem now. have make pll using adf4153, , given data analyzer works. pll wont move @ all. hoping else tried pll , can provide help.
here code
code: [select]
#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 not using loop, trying set fixed frequency.
hi,
welcome forum.
can post link specs/data pll ic please.
thanks.. tom...
welcome forum.
can post link specs/data pll ic please.
thanks.. tom...
Arduino Forum > Using Arduino > Project Guidance > ADF4153 using Arduino Due
arduino
Comments
Post a Comment