PIC
Microcontoller
Radix
Math
Method
s
ASCII
1 digit Hex to Binary 4 bits
From Regulus Berdin, Tracy Smith
2 digit Hex to Binary 8 bits
from Andrew Warren
2 digit Decimal to Binary 8 bits
from
Scott Dattalo
and Dmitry Kiryashov
BCD
unpacked to binary 2 digit to 8 bit
from Mike Keitz
packed to binary 2 digit to 8 bit
from
Scott Dattalo
half-packed to ASCII decimal 3 digit to 8 bit
from
Scott Dattalo
Binary
8bit to BCD half-packed (3 digits)
from
Scott Dattalo
16bit to BCD unpacked 5 digit 50 inst, ~200 executed 5 output registers
from John Payson
32bit to BCD packed and ASCII 10 digits
from
Ron Kreymborg
and Mike Keitz
16bit to ASCII
5 digits
with leading zero suppression and fixed decimal point from Dontronics and Scott Edwards
16bit to ASCII 5 digits in 1 temp register, 76 instructions, ~500 executed
by James Newton (
Parallax menomics
see
Macros for using Parallax instructions with MPASM
also
Prlx.asm
)
16bit to ASCII 5 digits in 0 temp registers, 42 instructions, ~266 executed
by Rich Leggit tweeked by
Scott Dattalo
.and bugfix by Dmitry Kiryashov and
Nikolai Golovchenko
16bit to ASCII 5 digits in 0 temp registers, 68 instructions, ~220 executed
by
Nikolai Golovchenko
24bit signed to ASCII 8/9 digit decimal with point and minus sign (if negative)
by Tony Kübek
See also:
http://www.shm.monash.edu.au/~r.kreymborg/pic/dopic.cgix?ascii16
16 or 32 bit binary to ASCII