AnsweredAssumed Answered

Simple integer conversion error

Question asked by jagadeesh.puneeth on Nov 13, 2015
Latest reply on Nov 13, 2015 by jagadeesh.puneeth
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

Outcomes