Page 1 of 1

SPI communication with AD9833 DDS

Posted: 18 Feb 2010 18:35
by amfortas
Hi,

I am about to undertake a project using the AD9833 programmable oscillator.

My usual programming language is Pascal. Does the Pascal Compller provide toutines for communicationg over an SPI link ? I can programme in assembler but the learning curve might take time which is under pressure.

I would like to share the 20Mhz PIC18F4520 clock with the AD9833. Can I directly connect to the Pin 14 CLKO pin or do I have to provide a buffer ? I know this has nothing to do with the complier but if anyone has experience of fanning out the PIC clock it might save me some testing.

This is my first message on your forum.

Many thanks,

Re: SPI communication with AD9833 DDS

Posted: 27 Feb 2010 13:18
by tihomir.losic
Hello,

please, follow this link:
http://hades.mech.northwestern.edu/inde ... ith_AD9833
"This chip is perfectly suited for use with the PIC 18F4520, as it uses SPI communication for its setup and control.
A connection diagram for the AD9833 is given to the right. The MCLK pin is tied directly to the oscillator of the PIC,
and the three SPI communication lines are connected to three I/O pins on the PIC (in this case pins A1, A2, and A3)."

For any further assistance, feel free to contact me.

Best regards,

Losic Tihomir

Re: SPI communication with AD9833 DDS

Posted: 22 Mar 2010 16:01
by amfortas
Many thanks Losic,

Yes I have the Northwest article which is very helpful. I think I have satisfied myself as to how to manage FSync to frame the 8-bit bytes into the LSB and MSB 16 bit words but I am not sure how mikroPascal deals with FSync - does it automatically hold FSync low until a complete word has been despatched - 2 register indentifier bits + 14 data.

I was hoping to have tested the AD9833 in my existing prototype loader but I am struggling with re-location of the code to jump the bootloader vector bytes (4).

I am highly delighted with mikroElectronica support and knowledge base for which I thank you.

Regards,

Colin

Re: SPI communication with AD9833 DDS

Posted: 15 Jun 2010 13:14
by misterten
hey tihomir,

I was thinking about using the PWM of an PIC24 for clocking the AD9833. Would it be working at 1 MHz? I am doing my first steps nd I cannot get any good result. Sometimes I am getting a sinusoid waveform but not in desired frequency. Most of times I am getting a weird signal which looks like a sinus with very large steps. I am not sure, if it's just my software doing wrong, because, if I unplug SDA and SCLK and do a reset the strange signal remains. Or is it normal? I would like to take a look at your code, I don't know any forther. Thanks!

Re: SPI communication with AD9833 DDS

Posted: 16 Jun 2010 09:59
by tihomir.losic
Hello,

Currently, I am not able to test whether your code works on real hardware because the device you are using is not in our offer.
Unfortunately, although we would like, we currently can not do custom projects, because we do not have enough resources
for we have to get to respond to each and every customer request.
You can find more information in the Help file for PWM library, on the maximum PWM speed in function of Fosc of the PIC24.

For any further assistance, feel free to contact us.

Best regards,

Losic Tihomir