Issues between the Mikroe USB SPI click (MCP2210) and the AD9851

Thread Starter

bloguetronica

Joined Apr 27, 2007
1,541
Hi,

This issue came up following this thread: https://forum.allaboutcircuits.com/threads/experimenting-with-the-ad9851.189574/. Basically, I've decided to interact with the AD9851 board bought from AliExpress, but now using the Mikroe USB SPI click board. First, I found that I had to send the SPI command twice to set the frequency. Oddly enough, the SPI transfer works every other time, and that is consistent.

I was supplying 5V to the AD9851 board when this was happening. It was never an issue when I've interfaced it with the CP2130, but since the AD9851 requires at least 3.5V at the digital input pins to acknowledge a logic high level, then I thought it could be something related to this. The Mikroe board only outputs 3V signals.

Following that, I've decided to power the AD9851 board with 3.3V from the Mikroe board. Thus, any logic high signals would surely be acknowledged (or so I thought). However, when setting the frequency, the frequency of the output signal switches to some random value. I've measured 3V at the supply coming from the Mikroe board. Albeit a tad low, it doesn't result from the fact that the regulator from that board is loaded.

I'm yet to post the code I'm having issues with (probably, the issue is electrical, and doesn't stem from the code). This is very strange. I haven't measured what the chip select pin I'm using (GP0) is actually doing. Does anyone have any experience with the AD9851? Should I try to buy another AD9851 board, or a chip from a reputable distributor? This is not the only problem I'm having, and it happens the same when the data rate is set to the lowest possible value.

Kind regards, Samuel Lourenço
 

Thread Starter

bloguetronica

Joined Apr 27, 2007
1,541
Here is the source code of the command I'm using to set the frequency. Instead of repeating the transfer twice, I can also cancel the previous transfer (which should be done by now) before doing the current transfer. I don't know why, without these workarounds, the command has to be issued twice.
 

Attachments

Thread Starter

bloguetronica

Joined Apr 27, 2007
1,541
I've changed the 0 Ohm resistor on the USB SPI Click board, from 3.3 V to 5 V, in the hope that this would be an electrical problem. However, nothing changed. I'll have to see what is going on.
 

Thread Starter

bloguetronica

Joined Apr 27, 2007
1,541
I think I found out what's going on. Indeed, the Mikroe USB SPI Click board (aka MCP2210) is having some issues. It only sends the SPI data on every other try. So, either we perform two transfers, or we cancel the transfer before sending one. It is strange, because there is no transfer pending to be canceled. Makes no sense.

Anyway, I've taken a few acquisitions with Analog Discovery after modifying the programs to work at the same data rate. Also, on the MCP2210 side, I see that, initially, CS0 is down. Then it gets high some time before a transfer. Also, there is some inter-byte delay, although I have none set.

Attached are the source code of the programs to use for each SPI interface, along with the acquisitions that were taken.
 

Attachments

Thread Starter

bloguetronica

Joined Apr 27, 2007
1,541
I found out that it is best to just cancel the previous transfer. Seemingly, I've been using this concept before, but I didn't recall it. Still, the first transfer will always fail, as it already happened with the CP2130. The AD9851 will probably require a serial-to-parallel interface, instead of being controlled directly by the CP2130 or by the MCP2210.
 

Attachments

Top