Quote:
|
Originally Posted by KenWittlief
I think your 'shift' is the wrong way - that is a shift left, which will push the 10 bit ADC input up to a 12 bit number;
usually you want to knock the Analog inputs down to 8 bits from 10, a shift right (arrows to the right) >>2;
:^);
|
You'll also want to typecast it into an unsigned char, just for safe keeping:
Code:
unsigned char pot1;
pot1 = (unsigned char) (Get_Analog_Value(rc_ana_01) >> 2);