What is the best déclaration for the micro (for speed)? I don't really need 16 bit variables but i am translating old functions to a new application for 9s12x and a lot of functions are declared with int for char really needed. If i change all my declarations functions, will my program will work faster?
I'm not sure, but my feeling is that for the HC12, using unsigned char or unsigned int wont differ a lot in speed. Some arithmetic operations (or, and,) are faster with unsigned char's but on the other side C rules often require int arithmetic so char's may have to be explicitly zero extended in other cases. Probably you wont see a huge difference in speed (but in memory usage :smileyhappy: