>-----Original Message----- >From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] >Sent: 11 April 2005 15:06 >To: pic microcontroller discussion list >Subject: [PIC] : hex or binary to decimal > > >Well i've done some searching and havent quite come up >with what id like to do... > >That is I have a value in hex and i want to transmit >it to a console but display it in decimal because >sometimes you get control characters etc and then you >don't see what you have unless you capture the data. >Did that make sense? > >example 0x32 = 50 and transmit a byte as "50", so need >to convert it over and also let it splill into another >byte if necessary. 0xFF = 02 55 so it would be >transmitted as 02 the 55. > >I have everything in place for transmitting so thats >not an issue. Just need to convert and drop into a >temp memory location. > >thanks everyone There are some very optimsied routines for converting binary to ASCII at http://www.piclist.com/techref/microchip/math/radix/index.htm Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist