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.
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 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,
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