Other Parts Discussed in Thread: HDC2010, HDC2021, HDC2080, , HDC2022
I have the following code running in Verilog:
- Write configuration - writing a value of 0x1000 to config register 0x02 for "temperature then humidity mode" AND 14-bit resolution (datasheet figure 10)
- Trigger both measurements - pointing to temperature register 0x00 (datasheet figure 12)
- Reading temperature then humidity - 4-byte read transaction (datasheet figure 14)
I repeat this at some frequency, let's say 1 Hz.
Questions:
- Would re-writing the configuration on every pass cause any undesirable effects? (Is this safe to do?)
- Should I, instead, read the configuration, compare with the correct configuration, then write the configuration once? If I'm getting ACKs when writing the configuration, isn't that enough evidence of success?
- Is the approach for reading temperature then humidity in one transaction the preferred method? Or is it preferred to trigger temperature then read temperature then trigger humidity then read humidity? I don't see an advantage of one over the other. Except that I have less logic (fewer FSM states) for the one transaction method.
Thanks,
Craig Meyers