# Multi digit BCD to LED circuit

Thread Starter

#### Craig Tull

Joined Jan 17, 2012
13
I am in need of a bcd to multi diget seven segment circuit to give me a readout of a 5 bit bcd input (00-31) I can find all kinds of counter circuits but nothing to directly convert 5 bit bcd into a two digit display.
Thanks
Craig

#### MMcLaren

Joined Feb 14, 2010
859
Would something like this work (below)? A couple of us came up with this PIC project a few years ago but the program would need to be modified to display decimal values instead of hexadecimal values.

Regards, Mike

#### Attachments

• 23.5 KB Views: 55
• 7 KB Views: 20

#### spinnaker

Joined Oct 29, 2009
7,830
And there are BCD to 7 Segment display drivers out there.

But you need to know if your display is common anode to common cathode.

#### crutschow

Joined Mar 14, 2008
32,850
A BCD value of 31 requires 6 bits (four to represent 0-9 of the one's digit, and two to represent 0-3 of the ten's digit) so you apparently have a 5-bit binary number, not a BCD number. A binary number cannot be easily turned into BCD with simple logic. For that you need a binary to BCD conversion circuit and then a BCD display driver.

Thread Starter

#### Craig Tull

Joined Jan 17, 2012
13
Yes I guess it is just binary 00= 00000 and 31= 11111, sorry, I just can't understand with a bazillion chips out there....

Thread Starter

#### Craig Tull

Joined Jan 17, 2012
13
Mike that looks like it would be perfect, unfortunately I am not much on writing code. I am much better at implementation than design.
Craig

#### MMcLaren

Joined Feb 14, 2010
859
Modifying the code for your 5-bit binary to 2-digit decimal requirement is relatively easy. Do you have access to someone who can program the PIC device for you (you haven't included location information in your profile).

Regards, Mike

#### LDG

Joined Feb 10, 2012
4
I built this circuit ot aid in PIC chip programming.

if you are interested I can email you the HEX file for the
PIC16F870 microcontroller.

#### Attachments

• 246.8 KB Views: 35
Thread Starter

#### Craig Tull

Joined Jan 17, 2012
13
Yes please do, this looks interesting!
<SNIP>

Last edited by a moderator:

#### bertus

Joined Apr 5, 2008
22,215
Hello,

Personal information can be exchanged by PM.
Please do not give an email adress in the forum.

Bertus

Thread Starter

#### Craig Tull

Joined Jan 17, 2012
13
LDG I can not PM you, please turn on your PM or post the file here.
Thanks
Craig