Hello, I'm trying to communicate with an AD5755-1 using the EVAL board. I've hooked up my SPI connections to the appropriate pins, but I can't replicate the activity when I use the EVAL board software. I'm using an arduino with
SPI.beginTransaction( SPISettings( 500000, MSBFIRST, SPI_MODE3 ) );
Here is my current input/output streams.
StartingChip: 00 CS_PIN:25Software ResetSending: {1C, 85, 55};Received: {E0, 80, 0};DCDC register writeSending: {1C, 60, 7};Received: {0, 80, 0};Main Control Register Write (16mA)Sending: {1C, 22, 0};Received: {0, 80, 0};read main control register (0200 expected)Sending: {99, 0, 0};Received: {0, 0, 0};Main Control Register Write (8mA)Sending: {1C, 22, 40};Received: {0, 80, 0};read main control register (0000 expected)Sending: {99, 0, 0};Received: {0, 0, 0};read main control register (0000 expected)Sending: {99, 0, 0};Received: {0, 0, 0};gain registerRead Gain RegisterSending: {88, 0, 0};Received: {0, 0, 0};NOP CMDSending: {1C, E0, 0};Received: {0, 80, 0};
Please advise on how to address this communication issue. I've tried a bunch of different things, but I just can't replicate the EVAL software results. Is there a problem in my setup protocols?
Hi Benjamin,
I'm comparing your waveforms from my previous tests. I noticed you are clocking out data on the falling edge from your Arduino. AD5755-1 also clock-in on the falling edge. This might cause…
Ian,
This did the trick! Using an Arduino with SPI_MODE2 (below) gives me proper behavior. I can now start building my firmware. Thank you!
-Benjamin
Hi,
Can you give a scope capture of your digital transaction?
Can you also give a simple i/f diagram of your controller and the eval board?
Not very familiar with arduino spi_mode3, but ad5755-1 has a serial interfacing diagrams in the datasheet. not sure if generic SPI protocols would work.
Best regards,
Ian
Thank you for getting back to me.
I've attached scope data below.
Blue = SDIN
Yellow = SCLK
Green = SDO
Red = SYNC
I believe the timings are fine in accordance with Table 3 and Figure 4 of the AD5755 Revision E documentation.
As for the diagram, It's pretty straightforward as described below. There are 6 total connections:
Arduino - 5755 Eval Board (pins 1-6 on Figure 2 and Table 3
3v3 - DvDD
AGND - DGND
SCLK - SCLK
MOSI - SDIN
MISO - SDO
PIN 25 - SYNC
Looks like the timing is indeed OK.
About the connections, If there is space on your Arduino, try and assign a pull-up or a default high IO for the RESETB pin.
I'm curious as to how your IO stream works, for example:
Benjamin.G said:Software ResetSending: {1C, 85, 55};Received: {E0, 80, 0};
Is the "received" data here, the SDO output on the same frame as the "Sending" data? I'm assuming this is the case.
About the sequence below, it is recommended that the read transaction is followed by either another read transaction or a NOP. Your readback data is clocked out of the SDO output on this next transaction. This also means that a write command should follow either another write command or a NOP.
Benjamin.G said:Main Control Register Write (16mA)Sending: {1C, 22, 0};Received: {0, 80, 0};read main control register (0200 expected)Sending: {99, 0, 0};Received: {0, 0, 0};Main Control Register Write (8mA)Sending: {1C, 22, 40};Received: {0, 80, 0};
This sequence below is correct, readback on the DAC register and the received data during NOP should be the DAC register data but should've been 0x0 (default value). Please try to fix the sequence for the other transactions and let's see if it works.
I've added the following connections. These are static for the duration of the tests, but can be controlled.
RESET is pulled to 3v3,
LDAC to 3v3, and
CLEAR to 0v
This has not changed the initial results.
iandal said:Is the "received" data here, the SDO output on the same frame as the "Sending" data? I'm assuming this is the case.
You have the correct interpretation of what is going on. So if a read command was not the previous command, this data would not be used. It's included for posterity and debugging.
iandal said:Please try to fix the sequence for the other transactions and let's see if it works.
I think this is the sequence you wanted. I made sure to include NOP commands after every read command.
Software ResetSending: {1C, 85, 55};Received: {E0, 80, 0};DCDC register writeSending: {1C, 60, 7};Received: {0, 80, 0};Main Control Register Write (16mA)Sending: {1C, 22, 0};Received: {0, 80, 0};read main control register (0200 expected)Sending: {99, 0, 0};Received: {0, 0, 0};NOP CMDSending: {1C, E0, 0};Received: {0, 80, 0};Main Control Register Write (8mA)Sending: {1C, 22, 40};Received: {0, 80, 0};read main control register (0000 expected)Sending: {99, 0, 0};Received: {0, 0, 0};NOP CMDSending: {1C, E0, 0};Received: {0, 80, 0};gain registerRead Gain RegisterSending: {88, 0, 0};Received: {0, 0, 0};NOP CMDSending: {1C, E0, 0};Received: {0, 80, 0};
What else could it be?
Thanks in advance,
I'm comparing your waveforms from my previous tests. I noticed you are clocking out data on the falling edge from your Arduino. AD5755-1 also clock-in on the falling edge. This might cause some mismatch with the data. Can you config your controller to clock out data on the rising edge, so that when data reaches the device, it should be in a stable state at the following falling edge? Let me know if this works.