While poking around some PCB boards for components I found a SRAM(LH5116) chip with 16K and a supply of 5V, in the same instant I thought:
It would would be fun add a DAC at the SRAM output...
There are already some DDS (
Jesper’s DDS) made for the atmega that manage to generate 200kHz~300kHz sinewaves, but, maybe with an external RAM I could achieve better performance ?
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgshLpxsh1-_-Ra0NT-bJ3RntreuuV5_OoG_ry2y2A5bPYO68koyFSXmUIX1jCjYt41BF8i5wwmYpaBcLV8cNIz80uSIStCERozWyFEq3GNq0MO2FEKvQqWe7YM-z0OC-7qnmyDNQzMVcel/s1600/ram_dds.png) |
The 250kHz "wobbly" sinewave, the FFT is clean enough |
|
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIY5iqsD57VGwWsmCxu4Hs0t_OAIVRC7pGdPpptjn5sjt4Ne-HNYygjkenJZDDYP3l8bB4TQ2XqmrTITzYCtGWqS8l9sd35s2Uc2-G-_epzaphIktLYcBuQ2kCi5MziagT7WBmfeWpJB-7/s1600/DDS_Model1.png) |
Data flow schematic (8 bit for address used of the 11 available) |
|
The basic idea was to load the waveform to the SRAM to save some operations in the uC, since the atmega isn't a very fast processor and the load takes 3 cycles. Currently I did managed to generate a 250kHz sinewave with some resolution. The biggest issue is the lack of a Sample & Hold, which makes the output sensible to RAM logic propagation times and sometimes produces glitches.
I may continue to poke around this, but, hopefully I will received a new DDS generator soon. Nevertheless it was a fun idea to try out.