0
\$\begingroup\$
  1. I am trying to read the K-type thermocouple temperature with MAX31856 in Verilog.
  2. Configured the configuration registers CR0 & CR1.
  3. The conversion result is stored in the registers 0xC, 0XD, 0XE. I have to read these registers using a SPI state machine.
  4. What timings should I have to cater for?
  5. The only timing constraint I found in data sheet is the update rate of 100ms. Which means for cycle reads you have to wait for 100ms for new results. But the data sheet shows that conversion results are available after 110ms? Why this figure violating the update rate (100ms)?
  6. In SPI read for burst mode (auto increments to D and E registers) do I have to send the address of register C only? Or do I have to send ADDRESS of register 0xC with dummy bytes?
\$\endgroup\$
1
  • \$\begingroup\$ Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. \$\endgroup\$
    – Community Bot
    Commented Nov 15, 2023 at 22:51

1 Answer 1

0
\$\begingroup\$
  1. All of them.

  2. Not sure which numbers you're looking at, but it isn't really important.

  3. Figure 6 in the datasheet is fairly clear on this.

Similarly, Figure 7 is clear about the overall protocol: You wait for DRDY- to go low, then you execute the 3-byte read of registers C, D and E, during which DRDY- will go high again. The specific timing at which this happens (update rate) depends on the chip configuration, as described at the bottom of page 4.

\$\endgroup\$
6
  • \$\begingroup\$ Thanks for prompt reply. Can u please elobrate point 6? Do i need to send the address 0XC only or some dummy bytes too on mosi line? And some adafruit driver libraries are not using DRDY pin. Then how those C libraries working? \$\endgroup\$
    – user353944
    Commented Nov 16, 2023 at 16:36
  • \$\begingroup\$ It appears that the chip simply ignores any bytes sent after the address byte when doing a read. So yes, those are "dummy" bytes. \$\endgroup\$
    – Dave Tweed
    Commented Nov 16, 2023 at 16:58
  • \$\begingroup\$ I want to share code with you.. Can u please share your email with me. Its a model sim simulation stuck in the state machine. Not a free running state machine. \$\endgroup\$
    – user353944
    Commented Dec 14, 2023 at 2:46
  • \$\begingroup\$ That isn't how this site works. You paste your code (or a link to it) -- preferably reduced to an MCVE -- into your question. Then everyone can take a look at it. \$\endgroup\$
    – Dave Tweed
    Commented Dec 14, 2023 at 13:51
  • \$\begingroup\$ I moved one step forward. The state machine is free running now and working in simulation. On hardware side there is no temperature data output from chip. I am assuming tcDhh parameter in the data sheet is not satisfied. To test the spi before the temperate data state, i want to read back the configuration register CR0 which i have written at the start of state machine. If that doesnot work i will post code here \$\endgroup\$
    – user353944
    Commented Dec 23, 2023 at 2:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.