You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code in AD5933_Library--AD5933.cpp, Line 29:
tTempVal = (tTemp[0] % (12 * 16)) * 16 * 16 + tTemp[1];
I think the author want to extract the lower 5 digits in tTemp[0], which means the D4-D0 in 0x92. However if use tTemp[0] % (1216), it is possible to extract the D5-D7 digits. For example, if the tTemp[0] = 0100 0000, the tTemp[0] % (1216) = 0100 0000, more than lower 5 digits.
I think this might be better:
"tTempVal = (tTemp[0] % (4*16)) 1616 + tTemp[1]"
or
"tTempVal = (tTemp[0] & 0x1F)1616 + tTemp[1]".
The text was updated successfully, but these errors were encountered:
The code in AD5933_Library--AD5933.cpp, Line 29:
tTempVal = (tTemp[0] % (12 * 16)) * 16 * 16 + tTemp[1];
I think the author want to extract the lower 5 digits in tTemp[0], which means the D4-D0 in 0x92. However if use tTemp[0] % (1216), it is possible to extract the D5-D7 digits. For example, if the tTemp[0] = 0100 0000, the tTemp[0] % (1216) = 0100 0000, more than lower 5 digits.
I think this might be better:
"tTempVal = (tTemp[0] % (4*16)) 1616 + tTemp[1]"
or
"tTempVal = (tTemp[0] & 0x1F)1616 + tTemp[1]".
The text was updated successfully, but these errors were encountered: