On Sun, 16 Jan 2000, : S.Ramasubramanian wrote: > Hello, > Does any one has patch for converting bin16 to BCD. I got a patch from > microchip website. But it has got some bug. I have not deeply gone > through the code for debuging as I didn't have much time. > If anybody have this patch, please send it across. If you're looking for a quick answer and quick code, then grab John Payson's routine: http://www.dattalo.com/technical/software/pic/bcd.txt There's an explanation on how it works following the code. Scott