On Mon, 15 Feb 2010, Scott Dattalo wrote: > Isaac Marino Bavaresco wrote: > > > Attached is an implementation in assembly language for mid-range (14-bit > > instructions) PICs. > > The conversion routine takes 34 program words and runs (always) in 207 > > instruction cycles. > > It's been a while since I looked at this stuff, but 10 years ago we came > up with an efficient PIC-based algorithm. I think Nikolai's 16-bit version > can be truncated to 9-bits. This takes 38 cycles (and 38 instructions) for > a 9-bit binary to packed BCD. > > http://www.piclist.com/tecHREF/microchip/math/radix/b2a-16b3a2-ng.htm > Thank you Scott. We can always rely on you to come up with the real heavy stuff :-) Regards Sergio Masci -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist