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.

ADS1234 - Analog Input Control

Other Parts Discussed in Thread: ADS1234, ADS1232

Hi all,

I'm new to SPI communication and advanced electronics. I've asked to make a strain gage based application. When I searched on Internet, I found ADS1234 and after that I bought it. I looked all parts of datasheet but I couldn't find what I want. My question is that when I connect 4 loadcells individually, how can I read the values at SPI output? I mean analog inputs go into the Input mux but later how can I read them when I communicate with ADS1234 using PIC16F877?

Best regards,

Canfer

  • Hi Canfer,

    You control the ADS1234 with GPIO from the micro.  This would be the A0 and A1 pins that control the mux.  Basically you set the mux to the desired input, then you read the data for that input.  Then you switch the mux to the next input, read the data, and so on. 

    On the PIC you would use the SPI interface and do byte transfers for a three byte transaction.  You read the data when DRDY/DOUT goes low, which signals the end of conversion.  There is no CS for this part, so if you need to share the SPI bus then you will need special logic to handle this.

    Best regards,

    Bob B

  • Hi Bob,

    First of all, I want to thank you for your quick reply.

    As I said before, I'm not familiar with these details but I really want to learn.

    After I wrote that post that you replied, I started to search some examples of other converters that use SPI. I learned that selection of the channel is done by controlling the A1 and A0 digital pins as you said, thanks again.

    Here is my second question: How can I learn the corresponding channel bit and converted bits in a 24 bits stream? In other words, there are 24 bits in the output. I need to know which of these bits is related to A/D converted value. Also I should know which channel is active. How can I choose that?

    Another question will be very easy or stupid for you but it kept me thinking. When we say 24 bit resolution of an ADC, it means we have a digital representation of an analog value in 24 bits, right? ( Analog value is 10 mV, ADC output is 0100111.......01 which are 24 bits) If so, where is the channel information in that stream?

    When you say "On the PIC you would use the SPI interface and do byte transfers for a three byte transaction." , you mean 3 cycles of CLK signal are needed to transfer 24 bits, right? If so, I guess I need to get those 3 bytes one-by-one. I think it is done by creating delay times between bytes. Is this correct?

    I think I asked a lot. :) But as I said above I'm really hunger to learn electronics more and more.

    Thanks in advance,

    Best regards,

    Canfer

  • Hi Canfer,

    I'm glad to hear that electronics excites you and want to learn more.  That's the way I got started, and learning is a life long experience.

    The data output word is 24 bits and there is no status information associated with it.  You need to keep track of which mux input channel is connected by the control signals to A0 and A1.  This is not hard to do if you control the address lines from the microcontroller.

    As far as the communication, you send three bytes of clocks (as you said), but you do not need any delay between the bytes.  In many microcontrollers you initiate the clocks by writing to the transmit buffer.  Most likely you will need to do this even though you have no connection for data in to the ADS1234. 

    The cycle is you initiate the clocks (by writing to the transmit buffer) and when the transmit is complete you read the receive buffer.  That is the MSB and you copy that byte to your variable (which is probably a signed int 32.)  Then you repeat the process shifting the previous data and adding the next  byte.  You repeat the last process for the third  byte.

    As the value is a 24 bit value that is read and is in binary two's complement, you need to make sure that you sign extend the value to 32 bit for any negative values returned.  This is determined by the most significant bit of the output data.  If this bit is high, then all other higher bits must be high as well.  For 32 bits (31:0) then if the msb is high (bit 23 in 23:0 bits) bits 31 to 24 should also be high.  This will make the signed 32 bit value a negative value.   There are other ways for conversion, but this is the simplest.

    Best regards,

    Bob B 

  • Hi,

    I am trying to use ADS1234 for a similar application. I am using the four channels, connected to four load cells. What would be the best way to get (almost) simultaneous data from all 4 channels?

    Say I set it to CH 0, read when DRDY interrupts. Now when should I change the MUX, so that I get valid data? The datasheet does not seem to talk about timings during channel change operations.

    Thanks

  • Hi Akshat,

    See Digital Filter Settling Time in the Electrical Characteristics table of the datasheet.  Each time you switch the mux you need to wait 4 conversion cycles for valid settled data for the ADS1234.

    Best regards,

    Bob B

  • Hi Bob,

    I've been looking for the weight information of ADS1234 in datasheet but I couldn't any information about it. Could you please tell where I can find the weight information of ADS1234?

    Best regards,

    Canfer

  • Hi Canfer,

    I want to make sure I understand your question.  I you talking about the weight of the ADS1234 itself, as if you were to place the actual part on a weigh scale and measure it? Or are you talking about how much weight can you measure by using the ADS1234?

    Best regards,

    Bob B

  • Hi Bob,

    I want to make a structural analysis of the PCB which includes four ADS1234's. I know the weight of ADS1234 is very light but I need the exact values of the weight of ADS1234.

    Best regards,

    Canfer

  • Canfer,

    I'll see what I can find, but I'm not very hopeful.  I'm out of the office until next week.

    Best regards,

    Bob B

  • Canfer,

    Sometimes things can be simple.  From the landing page for the ADS1234 there is a section on quality.  By viewing the information in that section you can find the mass of the device (112mg.)  The link takes you to this page:

    http://focus.ti.com/quality/docs/searchbyopn.tsp?templateId=5909&navigationId=11220&orderablePartNo=ADS1234IPW&pnType=A

    Best regards,

    Bob B

  • hi  Sir / Mam ,

    Vengad here from Avnet , one of my customer selected teh ADS1234 for medical application . They need Driver code for ADS1234 to refer ? could you please share it . They also need a ADS1234 product specific apps note ?

    Thanks in Advance .

    Regards/

    Vengad.

     

  • Hi Vengadesh,

    The ADS1234 is a 4 channel version of the ADS1232.  All information currently available with respect to the ADS1232 is on the ftp site:

    ftp://ftp.ti.com/pub/data_acquisition/ADS123xREF/ADS123x_CDROM/

    I'm currently working on some better example code that will work with this part family and hope to get it posted in the next couple of weeks.  I also suspect that there is some other additional information that I might be able to help with depending on the customer's specific application.  You can 'start a conversation' with me by clicking on my name on the E2E forum, or you can post specific questions my way completely off the forum by sending an email to:

    pa_deltasigma_apps@ti.com

    Best regards,

    Bob B