Quote:
Originally posted by Burgabot
Therefore, if we were using last year's gyro to practice with, would it return a value between 0 and 1023? If this is the case, would it even return values that aren't multiples of 4 (since last year's resolution was only 255)?
|
Yes and yes. The gyro puts out an analog value, so it's resolution is essentially infinite. It's the microcontroller that rounds it off to some finite amount. The old controllers rounded the value to 8 bits, the new one rounds to 10.
Quote:
|
Also, are there any obscure two-byte data types in C? It seems like a waste of space to use an int to store this value. Thanks!
|
It's not obscure, really. The keyword is
short int. On most compilers this is a 16 bit value. I haven't checked yet with the PIC C compiler if this is the case with it, though.