Control of a AD9851 DDS or Midnight Design DDS60 from serial terminal
Fork of Serial_HelloWorld_Mbed by
main.cpp File Reference
Serial controlled AD9851 demo Mainly intended for DDS60 board but should be adaptable by changing XTAL Note uses a software serial protocol resembling SPI(0) AD9851 is LSB first and is believed to still accept clocks when LOAD is high Initial start up is odd due to need to leave parallel mode, and to prevent loading junk if the device is already in serial mode the first "LOAD" must come after a valid serial word. More...
Go to the source code of this file.
Functions | |
void | ssend (unsigned char count, unsigned int prog) |
LSB-first serial send. | |
unsigned int | CalcFreq (unsigned int freq, unsigned int ref) |
calculate divisor value calculates the sum frequency*(1<<32)/xtal fails if frequency>xtal or if frequency > maxint |
Detailed Description
Serial controlled AD9851 demo Mainly intended for DDS60 board but should be adaptable by changing XTAL Note uses a software serial protocol resembling SPI(0) AD9851 is LSB first and is believed to still accept clocks when LOAD is high Initial start up is odd due to need to leave parallel mode, and to prevent loading junk if the device is already in serial mode the first "LOAD" must come after a valid serial word.
In this case first 8 then 40 zeros are sent on program start
Note using a high-idling select line and a high-idling clock but according to datasheet both are rising-edge triggered
Definition in file main.cpp.
Function Documentation
unsigned int CalcFreq | ( | unsigned int | freq, |
unsigned int | ref | ||
) |
Generated on Thu Jul 14 2022 03:20:51 by 1.7.2