piclist 1999\06\05\012853a >
Thread: 24-bit binary to BCD?
www.piclist.com/techref/index.htm?key=bit+binary+bcd
flavicon
face BY : Lynx {Glenn Jones} email (remove spam text)



The way i convert to BCD is as follows. Note: this may not be most
efficient but it works. Also, this is to convert an 8bit into three BCD
digits, but its easily expandable
Start by subtracting 100 from your value. If result is negative, stop,
else increment 100's counter and loop
Next subtract 10. If result is negative stop. else increment 10's counter
and loop
Whats left is the units digit.

------------------------------------------------------------------------------
A member of the PI-100 Club:
3.1415926535897932384626433832795028841971693993751
058209749445923078164062862089986280348253421170679

On Fri, 4 Jun 1999, Gabriel Gonzalez wrote:

{Quote hidden}

<Pine.GSU.4.05.9906042224360.15067-100000@garcia.efn.org>

In reply to: <000501beaf02$0182d760$3c2ee994@chih1.chih1.telmex.net.mx>
See also: www.piclist.com/techref/index.htm?key=bit+binary+bcd
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) 24-bit binary to BCD?

month overview.

new search...