Quote:
|
Originally Posted by The Lucas
Shouldn't it be
Code:
portAvalue = (rc_dig_in01 << 3) + (rc_dig_in02 << 2) + (rc_dig_in03 << 1) + rc_dig_in04;
[EDIT]
actually it should be
Code:
portAvalue = (rc_dig_in04 << 3) + (rc_dig_in03 << 2) + (rc_dig_in02 << 1) + rc_dig_in01;
since rc_dig_in01 is in bit0 (least significant) of PORTA
[/EDIT]
|
Technically bit0 would be the MSB, because of the endianness.
Btw jsut wxactly what are you trying to do? mask off bits or compare values?