Back to the topic of the binary to BCD conversion, I found in the PICLIST Source Code Library a shift-and-add-3 routine for 32-bit-to-10-digits by Ron Kreymborg and Mike Keitz () that is more optimized than the one I posted here. It takes 33 instruction words an runs in 2250 instruction cycles. I made an unrolled loop version that takes 54 instruction words and runs in 1514 instruction cycles. I wish to update my MPLAB-C18 'printf' and I think this routine should be much more efficient than the Microchip's original approach of divide/module, but perhaps Scott's algorithm can be expanded to this size (32-bit to 10 digits) with much better efficiency. What do you think? Scott?. Best regards, Isaac __________________________________________________ Fa=E7a liga=E7=F5es para outros computadores com o novo Yahoo! Messenger = http://br.beta.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist