In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote: T&E Engineer, This might work for you. (I have not actually tested it!) [CODE]DEC2HEX: tmpB1 = __PARAM1 ' get parameter tmpB2 = tmpB1 AND $F0 ' isolate 1st hex value SWAP tmpB2 ' swap the nibbles READ Hex_Digit + tmpB2, tmpB2 ' read the ASCII hex character ' ' display the hex character tmpB2 = tmpB1 AND $0F ' isolate 2nd hex value READ Hex_Digit + tmpB2, tmpB2 ' read the ASCII hex character ' ' display the hex character RETURN Hex_Digit: DATA "0123456789ABCDEF"[/CODE] - Sparks ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=182777#m183182 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)