I'm reading the PIC ADC in 10 bit mode and storing the result in an int16 type. I need to break up the 10 bit value into two bytes so I can send them over the network. At the other end I need to combine the two bytes back into a 10bit value and store in another int16 type. Problem is I can't get this to work. I tried the make8() and it's not doing the job. Does anyone have a solution for this?
for e.g. If my ADC = 504 the highByte should be 0x01 and lowByte should be 0xF8
But using the make8() returns highByte = 0x19 and lowByte = 0xBC
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum