Fast SPI-based serial interface to AD9850 clock generator. Has same interface as (bit-banging based) AD9850 library, but more than x100 faster in frequency update speed. Can sweep 1KHz to 30MHz in 1KHz step in a few seconds.
AD9850SPI.h
- Committer:
- tyamadajp
- Date:
- 2020-01-09
- Revision:
- 0:4aaced3b219c
- Child:
- 4:c60c1caa2593
File content as of revision 0:4aaced3b219c:
/** * Fast AD9850 serial interface over SPI */ #include <mbed.h> class AD9850SPI { public: AD9850SPI(SPI &spi, PinName fq_ud, PinName reset); ~AD9850SPI(); void reset_spi(); void reset(); void setFrequency(int freq, int powerdown=0, int phase=0); private: SPI &_spi; DigitalOut _fq_ud; DigitalOut _reset; };