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.

ADS1118 Programming help

Other Parts Discussed in Thread: ADS1118

I am trying to program an ADS1118 analog-to-digital converter. I've tried reading the datasheet on this module and have found it to not be very useful.

In particular, I'm trying to start by writing to the config register. However, I can't find any mention of how to do this in the data sheet. No address is given for the configuration register, nor any code to initiate writing to that register. Is this a generic function per the SPI specification (doesn't seem to be for my research), or a device-specific function? If it's the latter, I can't seem to find any mention of how to accomplish this.

Any suggestions for how to get started learning to program on this device would be greatly appreciated.

Thank you.

  • Andrew,

    Welcome to the forum!  You follow the diagrams of figure 37 or 38, depending on the mode you want to run in.  Basically in either case you write to the device the same time as you read (full-duplex) and every transaction is 4 bytes.  The first two bytes read (MISO) is the data result and the second two bytes are the config register settings.  The bytes written are your config settings (MOSI) and they are duplicated where the first two bytes are resent.  You can send the config as a nop, but this is determined by bits 1 and 2 of the config settings sent to the ADS1118.

    Best regards,

    Bob B

  • Hello,

    I was reading the datasheet for ADS1118 and I think that in Table 6. Config Register on page 20, the labels of bit 1 and 2 is in reverse. It should be NOP2 and NOP1.

    Furthermore, in page 21 the bit field for NOP should be Bits[2:1].

    Regards