robtillaart / ad9833 Goto Github PK
View Code? Open in Web Editor NEWArduino library for AD9833 function generator.
License: MIT License
Arduino library for AD9833 function generator.
License: MIT License
Might overwrite non default parameters.
Usage in array of devices
ESP32-S3 does not do VSPI.
ESP32 dependency should be minimized
(remove HSPI/VSPI references, see MCP_DAC #24)
Hi Rob,
Thanks for all the great libraries for Arduino!
I tried the AD9833 (breakout boeard) and it works great.
I also changed the crystal oscillator from 25Mhz to 1Mhz (really easy with a heatgun on the breakout board).
That also works great!
I used the Low level API functions and perfect results.
I think there is a misstake in the documentation:
it says: void writeFrequencyRegister(uint8_t channel, uint32_t freq) channel = 0 or 1, freq = 0 .. 134217728
But I think 134217728 is only half of the possibilities. The datasheet says 2^28, so 268435456.
I'm using the AD9833 for audio, so I cannot hear if it is correct.
But when I changed to the 1Mhz crystal and applied the fMCLK/2^28 ร FREQREG function, my tuner said 440 spot on at writeFrequencyRegister(0, 118112)
Greetings,
Bas
Not sure If this is "By design" in the chip,
Or if I have a cheap Chinese counterfeit chip,
Or this is something possible improve in this library
But I get some high frequency signal on the output when I change the frequency when I call the AD.setFrequency() function
The transients last longer if I use the SW SPI , but is still present if using the HW SPI
Using a Arduino Nano Every
Using HW SPI (AD9833 AD(9);)
using square wave (AD.setWave(AD9833_SQUARE1))
This happen only when I change the frequency
But is actually really painful if you plan to sweep frequency !
void set_freq (float f_khz){
static float old_khz;
digitalWrite(8,HIGH );
if(f_khz != old_khz ){
AD.setFrequency(f_khz*1000.0, 0);
old_khz=f_khz;
}
digitalWrite(8, LOW);
}
The CH1 (yellow) is the AD9833 output
The CH2 (blue) is the pin8 (use to trig the scope on my set_freq() function
Looks quite similar at first sight
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.