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.

Reaching only midscale (vref/2) with ADS7961

Guru 20755 points
Other Parts Discussed in Thread: ADS7961, ADS7958

Hello,

We have started working ads7961 on board.

on reading channel 9any channel)  I always get up to 7bit scale , but no more than that.

for example:

for channel 0:  0x07E0

for channel 1:  0x17E0

for channel 2:  0x27E0

... and so on.

1. 0x7E fits half scale, why can't we reach full scale for 8-bit device (0xff) ?

2. The 4 msb bits fits the correct channel - from this I conclude that the spi is read correcly (no issue of wrong spi mode)

We checked again vref voltage, and seems that it is correct :

REF+ =  -2.3volt (accoring to datasheet any value between 2-3volts is valid, so this value seems to be OK)

REF-  = 0volt

On reset, I just read channels (without configuring manual mode).

I see description in Table 13. Ideal Input Voltages and Output Codes for 8-Bit Devices (ADS7958/59/60/61)

which talks about midscale.

Is it that the chip function in midscale instead of full scale ? if yes - is there a way to change it's mode to full scale ?


We made many tests throught the day, but we don't have any idea yet.

Thanks for any suggestion,

Ran

  • Hi Ran,

    1) Mid scale on ADS7961 will correspond to 0x7F; the readout from the device will be 0xm7F0 where m is channel ID. In your case, the maximum achievable code seems to be 0xm7E0. Could you please send a capture from oscilloscope showing SDI, SCLK, CSZ and SDO?

    2) What is the logic level on SDI when you are reading data from the device (in case you are not sending any manual mode configuration on SDI)?

    3) If there is no configuration being sent on SDI, the device remains in previous mode (manual mode, channel 0, range 1 in this case). Hence could you also measure the voltages on pins 2, 3 and 20?

    Regards,

    Rahul

  • Hi Rahul,

    Thank you for the suggestions. I will check and return with information.
    I can say few things:
    1. I do not configure now to enter manual mode.
    2. The 0x07e0 is probably for 2.3volt as input in channel. Not sure if we tried higher voltage. Maybe we can reach higher values in the register value when inputing higher voltage.

    Is there midscale /fullscale modes or only range1/2 modes? I guess the device should Always reach full scale in all modes, Right?

    Maybe the default is range2 when the device is not configured? If this is the case it may explain why we only reach midscale. Maybe we sould try input vref×2 as input in channel?

    Regards
    Ran
  • Hi Ran,

    1) The device does not have a mid-scale only mode. Its transfer function has two modes Range 1 [0 to Vref] and Range 2 [0 to 2Vref].

    2) The default range on power-up is Range 1 i.e. [0 to Vref]. This can only be changed by programming mode control register in the QFN package.

    You may probe on the AINP pin of device to confirm if the output code corresponds to the input voltage sampled.

    Regards,

    Rahul

  • Hi Rahul,

    We made testing today, see results:
    Pin #2 = 2.25 v
    Pin #3 = 2.25 v
    Pin #20 = 2.25 v
    Pin #31 Ref+ = 2.27 v
    Pin #30 Ref- = 0 v

    Regards,
    Ran
  • Hi Ran,

    As per voltage on pin 2 (i.e. Channel 0) and Vref, your output code should be [(2.25 / 2.27) * 255] which is 253.
    The 16 bit output from ADC will be b0000 1111 1101 0000.

    Could you please attach the oscilloscope capture showing SDI, SCLK, CSZ and SDO?

    Regards,
    Rahul
  • Hi,

    We made some progress.

    The SDI/SDO/CLK/CS all seems perfect.

    When reading SDO/SDI we see full match between the read/write in SW, to the scope SDI/SDO (The clock samples both DIN/DOUT from low to high (low is the default).

    When we tried to input channel higher than vref (2.5 -5), we do reach full scale (0xff)

    From this I understand that the default is range 2 , and not range 1, Right ??

    Trying to change to range 1 by writing 0x1800 , did not change behaviour , and we always read the same value in SDO for channel's analog value, whether we try to change to range 1 or 2 (and this value seems to be correct for range 2 ).

    We probably can manage continue working with this chip in "range 2"  , now that we reach fullscale, though I still not sure about:

    1. why we can't change to "range 1" ?

    2. why the default is "range 2" in this chip ?

    I hope trying to configure alarms , and that there is no issue here with wrong device configuration in software.

    3. Can we program this chip for threshold any time during runtime, or must it be in certain sequence after reset ?

    Thanks!

    Ran

  • Hi Ran,

    1) The default range of this chip is Range 1 [0 to Vref]. You can read the mode control register for more details.

    2) You can change to range 1 by sending 0001 1000 0000 0000; This setting takes effect in the third frame after you have launched the command. In this mode, you will be in manual mode, channel 0 and range 0 to Vref. Please read "operating in manual mode" section of  the data sheet for more details.

    Regards,

    Rahul 

  • Thanks,


    It is working now fine.
    There is only some issue I've noticed, when using GPIO0 as "low and high alarm":
    1. When using alarms in manual mode, we must periodic read channels, otherwise we won't get alarms.
    2. When we are out of the range, we see that the value gets high, but there is some periodic change to low of ~5usec every 100usec . Is it a normal behaviour ?
    We'll shall probably try to eliminate this behaviour with a capacitor maybe.


    Thank you, I will wait for this answer, and then mark this as solved.

    Thank you very much for this assistance !
    Ran

  • Hi Ran,

    Great to know that range issue is resolved.

    1) For alarm, the device compares the programmed thresholds with the conversion result. Hence it is necessary to cause a conversion result for the alarm thresholds to be evaluated. The alarm pin will be asserted on the 12 falling edge of SCLK in the same frame when the violation happens.

    2) The alarm pin will be reset on 10th falling edge of SCLK in the next frame. Hence the alarm pin will be inactive between the 10th falling edge and 12th falling edge of SCLK of a frame.

    I think this is the 5us low time seen in your system.

    Could you please confirm this?

    Regards,
    Rahul