HFU HF Underground

Technical Topics => The RF Workbench => Topic started by: JimIO on December 05, 2019, 0009 UTC

Title: AD9833_SPI
Post by: JimIO on December 05, 2019, 0009 UTC
I've been looking at directly programming the AD9833 chip by SPI without
using a microcontroller. Still a work in progress. Here are some links you
may find interesting.


https://www.analog.com/media/en/technical-documentation/data-sheets/AD9833.pdf

https://www.analog.com/media/en/technical-documentation/application-notes/AN-1070.pdf

https://www.analog.com/en/design-center/design-tools-and-calculators.html

https://www.analog.com/designtools/en/simdds/?part=AD9833&fin=25M&mult=1&ftw=1

https://www.nongnu.org/avrdude/

https://www.nongnu.org/avrdude/user-manual/

Title: Re: AD9833_SPI
Post by: JimIO on December 05, 2019, 0054 UTC
I have a USBASP USBISP adapter with 10 Pin Cable:

https://www.ebay.com/itm/262130708242

I figuered out how to talk to it with:

avrdude -c usbasp -P usb -v -t -F -p t4

Next step is get out the soldering iron and wire up the AD9833 module:

https://www.ebay.com/itm/142719447732

~


Title: Re: AD9833_SPI
Post by: Stretchyman on December 05, 2019, 0603 UTC
Why NOT use a micro?

I use an attiny45, and have 'single frequency' SW or a 'tunable' version.

However I cant disclose the code as it's used in my products using the same AD9833 PCBs from CH.

Simplest implementation around!

Shame it doesnt put out a decent 5V squarewave but rather a rather puny 100mV sine and need some serious filtering and amplification BTW.

Str.
Title: Re: AD9833_SPI
Post by: JimIO on December 06, 2019, 0456 UTC
One reason to not use a microcontroller is that I don't like the arduino IDE.
If what I'm trying to do now does not work I may try using the USBASP as a controller. It has an ATmeg8 chip on it. Also I found this tonight:

https://blog.podkalicki.com/how-to-compile-and-burn-the-code-to-avr-chip-on-linuxmacosxwindows/

I like command line stuff!

~
Title: Re: AD9833_SPI
Post by: Stretchyman on December 06, 2019, 0754 UTC
I don't like SW at all!

I got someone to write it for me.

I'm sticking to hardware!

Str.
Title: Re: AD9833_SPI
Post by: ChrisSmolinski on December 06, 2019, 1251 UTC
Several years ago I played around with the CY22150:  https://hfunderground.com/blog/?p=215
Title: Re: AD9833_SPI
Post by: OgreVorbis on December 08, 2019, 2232 UTC
One reason to not use a microcontroller is that I don't like the arduino IDE.
If what I'm trying to do now does not work I may try using the USBASP as a controller. It has an ATmeg8 chip on it. Also I found this tonight:

https://blog.podkalicki.com/how-to-compile-and-burn-the-code-to-avr-chip-on-linuxmacosxwindows/

I like command line stuff!

~

I think you have to use a micro, whether you get a board that comes with one pre-programmed or not.
If you like command line, what I would recommend is writing some serial control code that translates between the serial and SPI. This way you can develop your own "command line" that works exactly how you want. If you buy something, it is unlikely to meet your exact needs. You can then use a serial to USB and a terminal such as Realterm.
It's not that hard to do. You can just read strings from the port and then do a bunch of IFs or a switch. First split the string by space. Send the first part through the switch statement, and then use the rest for your parameters.

I don't like Arduino much either. I use MikroC Pro for PIC. I use PIC chips for all my stuff, but they make software for Atmel as well.
Title: Re: AD9833_SPI
Post by: OgreVorbis on December 08, 2019, 2238 UTC
...see my last post.

BTW, why did you choose the AD9833? I've never really heard of it. Is it any better than the AD9850 modules?
Title: Re: AD9833_SPI
Post by: redhat on December 08, 2019, 2314 UTC
I hate programming as well, but have warmed up to the Arduino IDE.  I like it much more than the PIC stuff we had in college a decade ago.  The AVR's seem to be more robust as well.  I've had a number of PIC devices randomly fail over the years, yet only one of the AVR's...who knows.

As far as the AD9833, I suspect cost was a determining factor, not performance.

+-RH
Title: Re: AD9833_SPI
Post by: Stretchyman on December 09, 2019, 0904 UTC
9833 is available very cheap from CH on a PCB with a clock etc, just check eBay.

Sure only goes upto 12.5MHz, less in reality.

However with the implementation I use with an attiny45 the whole circuit to generate any frequency on 2 stacked PCBs 1/2" sq.

The 9850 will go way higher and also has opposing squarewave o/ps most useful for push pull class E as they will switch drivers directly.

I guess a good 'modern' solution for upto 30MHz would be the 9834 again available from CH.

Str.
Title: Re: AD9833_SPI
Post by: JimIO on December 10, 2019, 0355 UTC
"9833 is available very cheap from CH on a PCB with a clock etc, just check eBay."

Every electronics hobbyist should know about ebay.    8)

~