Quote:
|
Originally Posted by intellec7
accel_xTilt is an unsigned integer, and since Timer1 is configured as a 16 bit timer, that should be suffice to hold any timer value right? But from 6ms - 4 ms I get negative values! I thought maybe for some reason it was wrapping around and doing something funny, so when I made it a long I got all zero values.
|
You probably had the right values in the accel_xTilt variable, but printf() has difficulty showing anything other than an int unless you cast things just right.