Author Topic: SPI ADC reads all zeroes  (Read 257 times)

0 Members and 1 Guest are viewing this topic.

Offline leonerd

  • Regular Contributor
  • *
  • Posts: 163
  • Country: gb
SPI ADC reads all zeroes
« on: November 21, 2020, 11:18:48 pm »
I've been working on a design that needs two coincident ADCs, so I've been toying around with several of the little 6-pin SOT-23-6 SPI ADCs. There seems quite a few on the market with identical package/pinouts, all working in very similar ways. Assert the CS# line and the chip will take a sample, then you just clock 16 bits out of it via SPI and there's your sample. These chips have no config, no special trigger command,.. there isn't even an SDI pin into which any sort of config or command could be written. They shouldn't need anything. Just assert CS# and read some data. Couldn't be simpler.

I bought myself a selection of different ones to try - all 12 bit. So far I've had success with Maxim's MAX11665 and Texas Instruments' ADC121S101.

I have no luck with an ADS7886 however. Any attempts I've made always read as just zeroes. I've tried several chips, both on the same batch I bought, and even as a last attempt to see if for some reason I had an entire faulty batch, I bought some more at great expense from some no-name eBay seller. All the chips I bought have case marking "BBAQ", which at least matches what the datasheet says they should. But still they all read as 16bits of zero.

To clarify the situation a bit: All these ADCs are a simple 6 pin chip. +3.3V and GND on pins 1 and 2. Input signal on pin 3. SPI clock and data out on pins 4 and 5, and chip select/sample signal is on pin 6. Each test has been done by soldering the chip onto a SOT-23-6 breadboard adapter board, mounted in a breadboard, connected to a USB-attached SPI interface. The input voltage was supplied by a 10k pot between 3.3V and GND, initially set about halfway but varied about somewhat to watch the numbers change in real time. The setup worked just fine for MAX11665 and ADC121S101.

Now I know that these chips are doing something, because I attach a logic analyser and watch the SDO pin. It normally floats high, but is pulled low by the ADC chip just after I assert CS#, and floats up again after I release CS#. So the chip is definitely seeing that. It just outputs zeroes as if that was its sample.

I've tried slow SCK, really fast SCK.. longer or shorter delays between CS# time and starting to read data. I've added extra 10n, 100n or even 1ยต decoupling caps right there next to the chip on its little SOT-23-6 adapter board. I've even tried intentionally wiring up the chip backwards, in case the case marking has been printed backwards and the chip is rotated 180 degrees. Whatever I do, it just reads zero.

Can anyone suggest anything I might have overlooked in trying to get these to work?


Offline TexasRanger

  • Contributor
  • Posts: 10
  • Country: de
Re: SPI ADC reads all zeroes
« Reply #1 on: November 22, 2020, 12:29:11 am »
Have you considered buying the ADS7886 EVM?
Can you scope the Signals on SCK, CS, MISO with oscilloscope and a Logic analyzer?
Do they match the Timing diagram?
Are the waveforms looking good?

Offline pigrew

  • Frequent Contributor
  • **
  • Posts: 580
  • Country: us
Re: SPI ADC reads all zeroes
« Reply #2 on: November 22, 2020, 01:48:11 am »
Please provide a logic analyzer capture. Are you sure the analog input signal is making it to the ADC?

Could it be in power-down mode? Try performing two captures in a row.

Is it asserting CS only for 8 bits? That'll send it to power-down.

Is CLK idling high? The timing diagrams show CLK high when CS is asserted.

Offline rfmerrill

  • Regular Contributor
  • *
  • Posts: 54
Re: SPI ADC reads all zeroes
« Reply #3 on: November 22, 2020, 09:39:53 pm »
One difference to be aware of: It looks like at least between the 12-bit MAX chip and the ADS7886, the 12 bits of the ADC data are shifted differently within the 16-bit SPI transaction.

Offline rfmerrill

  • Regular Contributor
  • *
  • Posts: 54
Re: SPI ADC reads all zeroes
« Reply #4 on: November 22, 2020, 09:51:11 pm »
Only thing I can think is that it is not seeing the edges on your SCK signal. Is your SCK signal 50% duty cycle?

Also as always check that all your solder joints are good and the chip is not backwards.

Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo