Ultima attività 1 month ago

ADF4350 working sample for ESP8266 (NodeMCU)

racerxdl's Avatar Lucas Teske ha revisionato questo gist 7 years ago. Vai alla revisione

1 file changed, 37 insertions

ADF4350-test.ino(file creato)

@@ -0,0 +1,37 @@
1 + #include <SPI.h>
2 + #include <ADF4350.h>
3 +
4 + #define COM_PIN D0
5 + ADF4350 PLL(COM_PIN);
6 +
7 + void setup(){
8 + SPI.begin();
9 + SPI.setClockDivider(SPI_CLOCK_DIV4);
10 + SPI.setDataMode(SPI_MODE0);
11 + delay(1000);
12 +
13 +
14 + PLL.initialize(220, 10);
15 + delay(200);
16 + PLL.setAuxPower(0);
17 + PLL.setRfPower(0);
18 + delay(100);
19 + PLL.auxEnable(true);
20 + delay(100);
21 + }
22 +
23 + void loop() {
24 + // for (int i = 0; i < 4; i++) {
25 + // delay(1000);
26 + // PLL.setAuxPower(i);
27 + // PLL.setRfPower(i);
28 + // }
29 + delay(1000);
30 + PLL.setFreq(220);
31 + PLL.setAuxPower(0);
32 + PLL.setRfPower(0);
33 + delay(1000);
34 + PLL.setFreq(230);
35 + PLL.setAuxPower(0);
36 + PLL.setRfPower(0);
37 + }
Più nuovi Più vecchi