ATORTeensyMan
Active member
Where did you get this from? This is completely wrong and is why you were seeing temperatures in the region of 26000 instead of 20.
The original code that I have is:
and this gives the correct results.Code:int64_t dT = raw[1] - (((int64_t)T_REF) << Q5);
I've done some testing of the original code with the raw numbers and PROM values that you've posted and they produce reasonable values. Therefore, the code is correct as it is.
If you've changed the calculations, I suggest that you go back to the original code.
Pete
But using the correct version you just said some of my other sensors don't give the same values. One of my sensors is nearly spot on and the other is like .04psi wrong all the time.