Will this chip work with a processor that only supports half-duplex SPI?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Todd,
If you were to connect the ADS7953 to a processor that only supports half-duplex SPI, it would work, but for a very limited range of its capabilities.
Assuming that the SDI tied to ground at the ADC, the part would work in its default power up state. That is, it could convert the analog input at Ch0, restricted to Range 1 and with no control on the GPIOs.
Regards,
Sandeep
Sandeep,
I want to use Auto-1 mode. The datasheet is somewhat confusing, especially Figure 51 "Entering and Running in Auto-1 Channel Sequencing Mode", which shows that I would need to write 2<<12 to get to this mode. Then, Figure 52 "Auto-1 Register Programming Flowchart" shows that I need to do 2 writes to set the channels that I want to sample. It would seem that I would need to do that before the flowchart in figure 51.
Ideally, I want to configure the ADC to sample the first 13 channels in Auto-1 mode and then just simply do reads after that.
So, initialization would be
write 8<<12 to enter auto-1 programming sequence
write 0xffff to sample all channels
write 2<<12 to enter auto-1 mode
Then, all reads after that. During reads, the SPI output line is tri-stated, I think.
On a previous project, we used the ADS8028 and were able to do that.
Todd,
I am sorry, I got the impression from your first post that you did not have the SDI on your processor available - ever.
If you do have it available for initial configuration, you could set it up as required, as you have correctly described.
Regards,
Sandeep
Another question is what SPI mode is to be used (there are 4 modes)? From the timing diagrams, it is uncertain whether the clock idles high or low (figure 46). The diagram seems to indicate that the data should be sampled on the falling edge of the clock.
Here is my device initialization code:
uint16_t val;
val = (8<<12); // AUTO-1 programming mode
spi_write(val);
val = 0x1FFF; // sample channels 0 to 12
spi_write(val);
val = (2<<12) | (1<<6); // select AUTO1 mode and 5V ref
spi_write(val);
After that I just do reads. I get all zeros when reading. I would expect something like:
0x0xxx
0x1xxx
0x2xxx
0x3xxx
0x4xxx
0x5xxx
0x6xxx
0x7xxx
0x8xxx
0x9xxx
0xAxxx
0xBxxx
0xCxxx
0x0xxx
etc.
Where bits 15-12 are the channel, and the xxx would be the 12-bit ADC values. I have tried all SPI modes and started with a 17.67 MHz SPI clock and lowered that incrementally. I always read zeros. I even tried manual mode and still get all zeros.
for (i = 0; i < NUM_CHANNELS; i++) {
val = (1<<12) | (i<<7); // set manual mode and channel number
spi_write(val);
val = spi_read();
adc_frame->vals[i] = spi_read();
}
Todd,
I managed to get my hands on a board that has an ADC from the same family and tested your scenario. It works perfectly. One extra precaution I took was to ensure that the SDI was parked at logic LOW after configuration, to ensure that it does not accidently change modes during the data transfer.
Based on your last post, your problem seems to be elsewhere. Could you share your schematics of the ADC and related circuitry? Have you connected the MXO-AINP correctly?
Regards,
Sandeep
Sandeep,
Traced signals today with an oscilloscope. Found a problem that was inhibiting the chip select. The device started to act somewhat properly in Auto-1 mode after we fixed the CS. The ADC would get confused after a while and report channels that I had not selected. I figure that with the SDI floating (high-Z), that the ADC was probably getting confused. Switched to Manual mode and the ADC seems to be behaving better.
I appreciate your help with this. We really like the TI ADC chips. We are migrating to a TI DM3730 processor, so we will have full-duplex SPI communications soon. Hopefully, we can use the ADC in Auto-1 mode after that.
Thanks,
Todd
Todd,
Good to hear that you were able to resolve the issue that you were seeing.
Half-duplex SPI operation with ADS7953 is possible, but was always going to be a little messy as you have observed on your setup. Good to know that you will be moving to a new processor and a TI one at that.
All the best with your design.
Regards,
Sandeep