I'm trying to control the AD9959 evaluation board through the SPI protocol. In order to perform this objective, I have programmed a PIC32 microcontroller that acts as a master, it sends the commands to the slave that is the AD9959 DDS.
I think that the microcontroller is properly programmed and the commands sent by the SPI bus are correct. I have attached a capture of my oscilloscope where can be observed the time evolution of the signals.
- The purple signal is the master reset. The pulse width is about 1 ms.
- The yellow signal is the SCLK (SPI clock). The frequency is about 100 kHz.
- The blue signal is the sending data.
- The green signal is the IO_UPDATE. The pulse width is about 1 ms and is sending after a register writing.
On the other hand, in order to program the frequency of the output signal of the channel 0 of the DDS I have sent the following data:
1. Send an Instruction Byte Description. Channel Select Register (CSR). Address 0x00. The command sent is 0x00 indicating that the following instruction will be the value of this register and that is a writting operation.
2. Send the value of the register CSR. 8 bits width. The command sent is 0x12 enabling the channel 0 and enabling the 3-wire mode SPI.
3. Send an IO_UPDATE command.
4. Send an Instruction Byte Description. Function Register 2 (FR2). Address 0x02. The command sent is 0x02 indicating that the following instruction will be the value of this register and that is a writting operation.
5. Send the value of the register FR2. 16 bits width. The command sent is 0x2000 enabling the option all channels autoclear phase accumulator.
6. Send an IO_UPDATE command.
7. Send an Instruction Byte Description. Channel Frequency Tuning Word 0 (CTW0). Address 0x04. The command sent is 0x04 indicating that the following instruction will the value of this register and that is a writting operation.
8. Send the value of the register CTWO. 32 bits width. The command sent is 0x10101010 (for example) programming a frequency.
Unfortunately, the DDS doesn't do nothing. The CR2 LED is constantly red and I don't know if the board is receiving the data correctly. Can somebody say me if the steps that I have done are correct? Maybe have I to do more configurations?
I'm going to finish showing my pins connection.
As can be observed in the figure, I have used the following pins:
SDIO_0 = Pin where the data is writting.
CSB_U = Slave Select.
My question is: What is the difference between the pins _U (top of the image) and the other pins with the same name but without _U (bottom of the image)?. I have connected my output signals of the PIC32 at the pins _U of the AD9959 but I don't know if this is correct. Someone can explain me where I have to connect my signals?
The other thing that I have done is to set the jumper W7 to manual, and I have removed the jumpers W1, W2, W3 and W10 in order to perform the serial communication.
Any help or guide for me are appreciated. I don't know what I can done in order to perform the communication.
Sorry for my english and thank you for your attention.