Hi,
I've been contemplating using the AD9850, but then I've decided to go for the AD9851. Despite some issues, I found that it is quite useable and somewhat SPI compatible (more on that later). So, I've bought one of those boards from AliExpress (possible fakery, but the markings on the chip are laser engraved, and the chip looks genuine). I found out that the board itself already had two 10K pull-up resistors in D0 and D1, so I only had to ground D2 in order to enter serial mode. I've connected it to the CP2130 evaluation board as the image shows.

Here is a correspondence between the AD9850 and the CP2130, concerning the connections:
However, I had the idea of connecting the RST pin on the AD9851 to GPIO.7, to do a reset on demand. Although it does work, it proved to be a bit cumbersome for testing. Another idea would be to connect the former to the !SUSPEND pin on the CP2130, but unfortunately, that didn't work.
Anyway, using the connections listed in the table above, it is possible to use the AD9851 as an SPI slave device. FQ only requires a rising edge for the acknowledgement, and the length of the pulse could be infinite. Thus, it can be directly connected to a chip select pin on the CP2130.
Having done that, interacting with the AD9851 is easy. However, converting an arbitrary frequency value to a byte sequence is not. Not only the bytes are flipped (consider a little-endian approach), but so are the bits within each byte. Doing this conversion process by hand will lead to mistakes more often than not, judging by my own experience. The frequency is set by four bytes, and the final byte sets the phase and other parameters (namely, the REFCLK mulltiplier enable, which you will undoubtedly need, because the low pass filter will have no effect otherwise. If you use Windows, you can use the CP2130 Evaluation Tool application. Under Linux, CP2130 Commander comes to the rescue.

Nevertheless, if you happen to have a CP2130 evaluation board, or any other board that uses the CP2130, and if you wish to evaluate the AD9851, you can use the source code attached to compile the program for Linux. That program is very simple to use, and all you have to do is to specify the frequency (in kHz) as an argument.

I've decided to open this thread in the hope that it will be useful to someone. The AD9851 is not simple to use, and there is not a lot of information (namely, there are no schematics) on how to interface with it via SPI. I'm planning to use it with the MCP2210 in the future.
Kind regards, Samuel Lourenço
Edit: Updated the source code. Basically, changed some names and deleted junk code. Some comments were corrected as well
I've been contemplating using the AD9850, but then I've decided to go for the AD9851. Despite some issues, I found that it is quite useable and somewhat SPI compatible (more on that later). So, I've bought one of those boards from AliExpress (possible fakery, but the markings on the chip are laser engraved, and the chip looks genuine). I found out that the board itself already had two 10K pull-up resistors in D0 and D1, so I only had to ground D2 in order to enter serial mode. I've connected it to the CP2130 evaluation board as the image shows.

Here is a correspondence between the AD9850 and the CP2130, concerning the connections:
AD9851 board | CP2130 evaluation board |
5V | VBUS |
GND | GND |
D2 | GND |
D7 | MOSI |
FQ (FQ_UD) | GPIO.0 |
CLK | SCK |
However, I had the idea of connecting the RST pin on the AD9851 to GPIO.7, to do a reset on demand. Although it does work, it proved to be a bit cumbersome for testing. Another idea would be to connect the former to the !SUSPEND pin on the CP2130, but unfortunately, that didn't work.
Anyway, using the connections listed in the table above, it is possible to use the AD9851 as an SPI slave device. FQ only requires a rising edge for the acknowledgement, and the length of the pulse could be infinite. Thus, it can be directly connected to a chip select pin on the CP2130.
Having done that, interacting with the AD9851 is easy. However, converting an arbitrary frequency value to a byte sequence is not. Not only the bytes are flipped (consider a little-endian approach), but so are the bits within each byte. Doing this conversion process by hand will lead to mistakes more often than not, judging by my own experience. The frequency is set by four bytes, and the final byte sets the phase and other parameters (namely, the REFCLK mulltiplier enable, which you will undoubtedly need, because the low pass filter will have no effect otherwise. If you use Windows, you can use the CP2130 Evaluation Tool application. Under Linux, CP2130 Commander comes to the rescue.

Nevertheless, if you happen to have a CP2130 evaluation board, or any other board that uses the CP2130, and if you wish to evaluate the AD9851, you can use the source code attached to compile the program for Linux. That program is very simple to use, and all you have to do is to specify the frequency (in kHz) as an argument.

I've decided to open this thread in the hope that it will be useful to someone. The AD9851 is not simple to use, and there is not a lot of information (namely, there are no schematics) on how to interface with it via SPI. I'm planning to use it with the MCP2210 in the future.
Kind regards, Samuel Lourenço
Edit: Updated the source code. Basically, changed some names and deleted junk code. Some comments were corrected as well
Attachments
-
38.7 KB Views: 4
Last edited: