Question
Simple integer conversion error
Posted on November 13, 2015 at 11:01
Hi guys i am struggling to convert 2 8bit values into 16bit value, please help me
//Global variable
volatile uint8_t data[16];
volatile uint16_t BIG;
main()
{
data[1] = 23;//msb
data[0] = 21; //lsb
BIG = data[0] | (data[1] << 8);
while(1);
}
but in the output i only get lsb.. MSB is not showing up
#stm32-c