rxe3936

ok, i’ve just done testing this unit, and i have some concerns. first, the temperature is off by about 7C i can compensate for that, but i am unsure if this error is constant over temperature, linear or what? obviously some of the calibration coefficients in the registers from 0xAA to 0xBE are messed up.

can someone shed some light on how to perform an error correction on these units?

did i hit a nerve or something? you seem to have no clue how many hours programmers spend coding in assembly to ensure a higher degree of determinism because they cannot rely on the compiler to do the trick. the worst approach to embedded programming is to assume that “the compiler knows best and does a better job than ‘you’ can anyway”, and if you do not believe that just read a few lines how the compiler can get confused when you declare uiTadc as unsigned. in addition, this code is meant to be portable, you do not know what compiler people are gonna use, the “most compilers” approach does not cut it. code is meant for programmers to read, not for humans. when you code you would assume that your target audience is another programmer, unlike what your CS101 java teacher is preaching.

the line above is indicative of extremely poor coding. instead of a floating point division by a constant, that could have easily been turned into a multiplication saving some precious cycles. instead of dividing by (-5.35) the code should multiply by (-0.187).

SparkFun is an online retail store that sells the bits and pieces to
make your electronics projects possible. Whether it's a robot that can
cook your breakfast or a GPS cat tracking device, our products and
resources are designed to make the world of electronics more accessible.

In addition to products, SparkFun also offers
classes and online tutorials to help educate
individuals in the wonderful world of embedded electronics.