I have initialized the SPI with 32 x 1 - as sugested.
Then test reading the ID and Tcrit all OK.
Then I set config reg. to continous conversion.
Now reading out temp.reg. (command "read temp.reg." and then 16x clock with DIN= 1).
The Temperature reading of the output (temperature register) is corrupted - see attached diagrams.
Diagram description: D0 -> !CS, D1 -> SCLK, D2 -> DIN, D3 -> DOUT, D4 -> generated scope-sync for convenience, D5 -> unused.
There is a strange behaviour: When the LSBit of the first read temp. byte is 1, then there is a 1 output while sending the last bit of the comand
"read temp.reg" (see ADT7310_ContinConv, false temperature reading_zoom.png).
The value changes when temperature changes. But the values seems to be shifted somehow - at 22°C I get (x01), x0BF0.
I have tried also Oneshot mode and 1SPS: No Output (DOUT always zero). This, we have to discuss later...
PS: I have placed 4 x 100R series resistors in the 4 SPI lines. With Fsclk 250kHz this should be no problem?
- Is my SCLK signal OK?
- What went wrong??? I tried all to read temperature (I think) - nothing works...
- when using "contin. conversion", do I have to send command byte with bit "Continuous read" set? Or is it seperate setting?
- In data sheet Rev. A | Page 10: "To obtain an updated temperature conversion, reset Bits[6:5] of the configuration register (Register Address 0x01) to 01" is confusing. To "RESET" means set to zero! It would be better to say "SET to 01" or "WRITE 01"
Also to me it would be more clear to say "to start new temperature conversion, write to the config register with bits [6:5] set to one shot mode"
- How does the SPI-Interface behave, if command sent with bit C7 and/or C1= 1 and/or C0= 1 ?? Is it simply ignored?