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.

ADS8201: ADS8201 Problems

Part Number: ADS8201

First I had the same problem as one of the earlier posters, I could not get any writes to take effect. Then I realized writes have to be done with SPI mode 1, reads with SPI mode 0.

But now, I can only seem to write to registers 0x8, 0x9 and 0xa. If I write to reg 8 to a mode other than 2, then do a reset by writing to 0x9, the mode is restored back to 2, the default. This proved that SW reset took place.

I cannot write to regs 0-3 the channel config registers. for example. These are always read back as 0.  Same with the other remaining registers like 4, 5, 6.

I have made sure I am in IDLE mode 0 via register 8 as described in the datasheet.

  • Hi Bill,

    It seems you've got the register read protocol working right because you are able to read-back register 8.
    However, could you please confirm if you are able to write and read-back a non-zero value to register 8 without resetting the device.

    You could try the following steps -

    1) Device power-up.
    2) Read register 8 -> should return the value 2.
    3) Write value 3 to register 8.
    4) Read register 8 -> should return the value 3.
    5) Write value 0xAA to register 9 -> will cause software reset.
    6) Read register 8 -> should return the value 2.

    This will help ascertain that read and write are working where we actually read-back the written value.

    Thanks.
  • HI Rahul, thanks for the quick reply.  I have tried various tests of writing to register 8 different values and they all read back fine.

    Below is a capture of your specific test.

    As mentioned I can also write to reg 10 and read back the value. This is not the case for other registers.

    Not to add more problems here but , since I could not configure the actual parameters I wanted, I did try to just use it in default mode 2 after a reset to see if I could trigger a conversion.

    I pulse the CONVST* line negative for about 500ns and poll on register 7 for any status bits set and that never happens.

    The done flag is never set.

    -Bill

  • So it seems the register write problem was because I was not switching SPI modes between 0 and 1 in all places that I needed to. For example in my spi_read(), I had forgotten that it starts with a write, then a dummy write/read. I was only changing modes before calling spi_write(). So I had to modify my driver code internally. 

    What threw me off was that I could write to some registers but not all. Also this dynamic changing of SPI modes makes analysis on the scope confusing.

    spi_read():

    • wait for spi not busy
    • set spi mode 1
    • write address
    • wait for spi not busy
    • set spi mode 0
    • write dummy/read data

    spi_write():

    • wait for spi not busy
    • set spi mode 1
    • write address byte
    • write data byte

  • Hi Bill,

    Thanks for posting the resolution to your problem. You have got the interface working now?
  • yes it seems to be all working now.

    Bill