The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
From: Tilmann Reh
Subject: Re: ? Binary to BCD conversion chip ?
Date: Thu, 28 Nov 2002 11:33:34 +0100
Organization: Autometer GmbH
References: <firstname.lastname@example.org> <3DE5D8B5.EF8930F3@scazon.com>
NNTP-Posting-Date: 28 Nov 2002 10:33:07 GMT
X-Mailer: Mozilla 4.78 [de] (Windows NT 5.0; U)
Paul Burke schrieb:
> There is an algorithmic way to do the conversion on an incoming stream
> of data. All I can remember about it was that it was in an old
> programmable logic applications book (over 15 years ago)- perhaps MMI? A
> colleague implemented it in software on a 6809 and all I can say is it
> worked, and saved a few vital bytes compared with divides or repeated
> subtraction. Took an age though.
It's rather simple, I often use that method.
You need to shift the binary data and add correctives if nibbles
fall into the range A..F.
Takes one complete shifting of the binary data, i.e. 16 times
a 16-bit shift for 16-bit data (20-bit output in this case), plus
some conditional additions for the decimal adjustments. But needs
only very small code space and other resources.
Dipl.-Ing. Tilmann Reh
Autometer GmbH Siegen - Elektronik nach Maß.
In a world without walls and fences, who needs Windows and Gates ?
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup