Well, it's nice because my input only needs to me multiplied by (500/512) = .97 so I'm just going to forget about it (this isn't a precision project by any means)... What exactly did the bin -> bcd routines give you? Input: 45 -> Output 0x45 ? This would be handy then I could just jump off those two digits individually... nick@veys.com | www.veys.com/nick > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Vasile Surducan > Sent: Wednesday, July 25, 2001 11:34 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: "itoa" routines? (16F870) > > > I've done this using a standard bin to bcd routine from > piclist. You may adjust a little the slope ( if you need ) by > playing with references of your microcontroller. If your LM > outputs the correct voltage for measured temperature ( in > your favorite measuring sistem), no table look or other > software tricks are required. Even for kelvin to celsius > conversion, with some resolution loss you may apply same > hardware trick. From farenheit to celsius I don't know... Vasile > > On Thu, 26 Jul 2001, Nick Veys wrote: > > > Hi all. I'm in a bit of a tangle with some A/D input! I've been > > wrestling with a way to do this all night, which means I haven't > > thought of anything new, and won't! I have an 8bit number, only > > ranging 99 >= N > > >= 0 so it will only be 2 digits. I need to find a way to > output it > > >to > > my LCD... I have tried subtract and compare methods but > they're huge > > and sloppy and I fear incorrect. Has anyone tackled this? My LCD > > output function spits out what is in W, I would *like* an > "itoa"-like > > function that would break my 8-bit variable into 2 > variables holding > > each digit, so I can then spit it out, but I am at a loss > on how to do > > this effectively! (btw: my 100-line jump table didn't work out so > > well either! ;) > > > > nick@veys.com | www.veys.com/nick > > > > -- > > http://www.piclist.com hint: PICList Posts must start with > ONE topic: > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other > [BUY]:,[AD]: ->Ads > > > > > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads