HEX byte to ASCII output...


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jul 2011
    Location
    Hawaii
    Posts
    21


    Did you find this post helpful? Yes | No

    Default Re: HEX byte to ASCII output...

    John,
    The sensor has .5 degree resolution. You can store INTTEMP.LOWBYTE into a NEW VAR of length WORD then multiply the new variable by 5. In your example 49 X 5 is 245. HEX "31" actually represents +24.5 degrees C. Use "DIG" to isolate the digits of the NEW VAR WORD. WORD size is suitable because the maximum of INTTEMP.LOWBYTE is HEX "AA", 170 X 5 = 850 which represent +85.0 degrees C.

    - Martin

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: HEX byte to ASCII output...

    Hi Martin,

    Thanks for the DIG tip. That eliminates all that math.

    Yes, I know I can get the .5 resolution, but I don't need it for this simple project. But, that doesn't mean I won't incorporate it in my code sometime in the future.

    Thank again....

    John

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts