I am using ATmega8u2 with C language and need some help.
I am a beginner with C language. I don't know why when get temperature in negative decimals go down instead of up (now I am back: /) and when get temperature digit in negative starting at -1.75 :S
Can who help me please
I added the attached program.
I think it's the problem here:
digit=temperature>>4; digit|=temperature<<4; //Store decimal digits decimal=temperature&0xf;; decimal*=THERM_DECIMAL_STEPS_12BIT;