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.

ADC12138 digital interface

I tried to Interface ADC12138 with and arduino over SPI as per  the data sheet , ADC is always powered up in my circuit (~PD is low).I do not see any proper results.First i did the autocal function , then verified that and then tried to read the values nut unable to do so.

  • Sorry for the confusion, there are quite a few steps prior to being able to read a conversion result.  it sounds like you are on the right track, since you were able to perform the autocal and then verify the autocal.  are you certain that you completed the additional steps spelled on it section 1.1 in order to read a proper conversion result?  I am asking because the device will not output the conversion result until you complete a second conversion.  only when you execute the second conversion will the device output the result of the first write command to do a conversion.  is DORB toggling from high to low?  that should indicate if the device thinks it was properly instructed to complete a conversion and has data to put out on DO.

    Chuck

  • Thanks

    I am not getting proper results on EOC and DOR and I said I was trying to do an AutoCal and I am not quite sure what is happening.Can you help me out and tell me where exactly should I begin with .After AutoCal the readstatus shows low , but the EOC and DOR do not show apt results as per the data sheet.So I am not sure weather AutoCal is initiated .
  • I sent you a friend request where I provide my email address. I think it is best that we take this offline and that way it is easier for us to share information. I am also interested to learn why you chose this ADC.
    Chuck
  • Hello,

       Will you please tell me how you interfaced ADC12138 with arduino?

  • Hello,

    The ADC12138 uses SPI to communicate. 

    Following the instructions in section 1.1, Figure 65 of the datasheet.  See also Table 2 and Table 4.  Send the following:

    Auto Cal, 0x08 (Table 4)

    Read Status, 0x0C (Table 4)

    Read Status, 0x0C (Table 4)

    12 bit + sign Conversion, 0x00 (Table 2 and 4, this is for a differential measurment using CH0 and CH1)

    12 bit + sign Conversion, 0x00 (Table 2 and 4, this is for a differential measurment using CH0 and CH1)

    Thd data out is as shown in Figure 65.

    Mike

     

  • Hello,

          Thank you for your help. I got the point.  Can I short CCLK and SCLK pin?

    Chetan

  • Hi Chetan,


    The CCLK pin is the clock for the ADC while the SCLK is the clock for the SPI communication.  Normally the SPI clock is run only during communication, while the clock for the converter is continuously run.  I would not short them together.

    Mike

  • Hi Mike,

        Thank you for your help. Now I am able to read the status data. The read status data is nine zeros. Is it right?  If it is so please tell me the next step to read the analog voltage and convert it into 12-bit (sign or without sign) format. I am going to use single ended ADC and channel CH0.

    Chetan 

  • Hi Chetan,

    if the part has been powered up and no changes made to the part a status register should be 0x0A.

    Try doing this. Put scope probes on CS, SCLK, DI and DO. Power on the part.
    Send the command shown in Figure 54 to Autocal the part. Do your waveforms look like what is shown in the datasheet?

    Next, send the command as shown in Figure 62 in the datasheet. You only want to send the first part of the sequence shown, it is labeled Cycle N in the figure. Send it several times. During the first read status command the data is garbage. The second status register read will be correct. The status register should be 0x0A. Make sure that you signal look correct.

    Mike