PDA

View Full Version : Hex to Decimal to Binary



Ramius
- 27th March 2014, 02:49
Hi All!
Got a question about a pressure sensor I have been looking at. The spec sheet says the output range is 19A to E66 in hex. It also says that the resolution is 12 bit! If you take 19A hex and convert it to decimal you get 410. Take the same 19A and convert it to binary and you get 110011010, which is only 9 digits? If the resolution is 12 bit should there not be 3 more digits?:confused:


Thanks, Ed

richard
- 27th March 2014, 03:44
at last count it takes 12 binary digits to make $E66, i guess that if it can get a result of $e65 that's 1 digit different hence 12 bit resolution

HenrikOlsson
- 27th March 2014, 07:30
Hi Ed,
Your ordinary PIC ADC has a resolution of 10 bits. Yet, when it returns a result of 5 and you convert that to binary and you get 101, that's only three bits.....what's up with that?

Max reading from your sensor is 0xE66, Min reading from your sensor is 0x19A. 0xE66-0x19A=0xCCC which in binary is 1100 1100 1100 - 12bits. Strictly speaking I'd say the resolution is somewhere between 11 and 12bits.

/Henrik.

Ramius
- 28th March 2014, 02:01
Thanks!
I guess it makes sense now.

Best, Ed