Hello.
I wrote a program Flowcode 6 for the AD9833 DDS generator. I use Arduino Nano.
I helped you with this topic. AD9833 is controlled via the SPI bus.
But I have a problem with the SPI bus. SPI is not working.
I enclose a program Flowcode 6. The values of the bits for example 400Hz. Here is an example
Here is datasheet AD9833
Im asking for help. What am I doing wrong? How to properly configure the SPI?
AD9833 and SPI ->> not woeking
Moderator: Benj
AD9833 and SPI ->> not woeking
- Attachments
-
- AD9833 and Arduino Nano.jpg (139.61 KiB) Viewed 6624 times
-
- AD9833_test_.fcfx
- (8.3 KiB) Downloaded 382 times
Last edited by rradojko on Sat Jun 03, 2017 9:30 pm, edited 1 time in total.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: AD9833 and SPI ->> not woeking
Hi,
I've just tested this on a Uno (I don't currently have a Nano) and the SPI works fine.
Perhaps there is an issue with your Seale logic analyzer setup?
Based on a quick look at the AD9833 datasheet I would suggest you try changing the Clock Polarity to "Idle HIgh" and Clock Phase to "Trailing Edge"
Hope that helps
Leigh
I've just tested this on a Uno (I don't currently have a Nano) and the SPI works fine.
Perhaps there is an issue with your Seale logic analyzer setup?
Based on a quick look at the AD9833 datasheet I would suggest you try changing the Clock Polarity to "Idle HIgh" and Clock Phase to "Trailing Edge"
Hope that helps
Leigh
Re: AD9833 and SPI ->> not woeking
LeighM thanks for the reply.
I will try to set up and your proposal (Clock Polarity to "Idle HIgh" and Clock Phase to "Trailing Edge").
I have another question.
How do you test SPI bus?
You can paste the PrintScreen logic analyzer.?
That to me would be helpful.
And one more question.
The figure below.
What is set in the SPI bus (Sample Point )?
I will try to set up and your proposal (Clock Polarity to "Idle HIgh" and Clock Phase to "Trailing Edge").
I have another question.
How do you test SPI bus?
You can paste the PrintScreen logic analyzer.?
That to me would be helpful.
And one more question.
The figure below.
What is set in the SPI bus (Sample Point )?
- Attachments
-
- spi_settings_flowcode.jpg (89.94 KiB) Viewed 6580 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: AD9833 and SPI ->> not woeking
I used your program, but put the send bytes in a loop with a delay, so that I could see a repetitive output on an oscilloscope.How do you test SPI bus?
I could see the clock and (MOSI) data pulses without any problem.
Sorry, I've now given the hardware back to a colleague I borrowed it fromYou can paste the PrintScreen logic analyzer.?

That determines at what point a sample is taken in the (MISO) data pulse to determine if it is high or low.What is set in the SPI bus (Sample Point )?