How to deal with 4 bit 7 segment display drivers making a decimal counter?

Thread Starter

Vilius_Zalenas

Joined Jul 24, 2022
156
I need to make a 7 digit TTL pulse counter. Lets not focus on the details, but my exact problem is how to deal with the hex to decimal conversion in 7 segment display drivers. Every 7 sd drivers IC that I find is a 4 bit one, which means it will count 0-F or 0-9 ant then goes blank or whatever. I managed to find an algorithm to cascade the counter IC's to get my numbering right, but how do I make the 7 sd to come back to 0 after digit 9? Are there any resettable 0-9-5 type like 7sds? I feel like I am missing something important here, what is usual solution in such case?
 

MrChips

Joined Oct 2, 2009
29,850
You need to convert from binary to BCD, possibly in software.
All 4-bit to 7-segment decoder drivers will accept BCD which is 0-9 in 4 bits. If your count is 20-bit binary, you need to convert this to BCD.
 

Ian0

Joined Aug 7, 2020
8,947
I need to make a 7 digit TTL pulse counter. Lets not focus on the details, but my exact problem is how to deal with the hex to decimal conversion in 7 segment display drivers. Every 7 sd drivers IC that I find is a 4 bit one, which means it will count 0-F or 0-9 ant then goes blank or whatever. I managed to find an algorithm to cascade the counter IC's to get my numbering right, but how do I make the 7 sd to come back to 0 after digit 9? Are there any resettable 0-9-5 type like 7sds? I feel like I am missing something important here, what is usual solution in such case?
What you seem to be missing is the BCD counter. 74LS160, 74LS162, 74LS192
 

WBahn

Joined Mar 31, 2012
29,512
I need to make a 7 digit TTL pulse counter. Lets not focus on the details, but my exact problem is how to deal with the hex to decimal conversion in 7 segment display drivers. Every 7 sd drivers IC that I find is a 4 bit one, which means it will count 0-F or 0-9 ant then goes blank or whatever. I managed to find an algorithm to cascade the counter IC's to get my numbering right, but how do I make the 7 sd to come back to 0 after digit 9? Are there any resettable 0-9-5 type like 7sds? I feel like I am missing something important here, what is usual solution in such case?
Most 7-segment display decoders only worry about the decimal digits (codes 0 through 9). What they display for the remaining six input patterns varies all over the place. If you WANT them to display hex digits, you have to be careful to get a 7-segment decoder that does that, since most do not.

Converting a binary value greater than 9 to BCD is not a function of the decoder IC. If your conversion algorithm is correct, then the driver is not an issue because the four lines going to each driver will go from 9 to 0. If this isn't the case, then your algorithm for converting from binary to BCD isn't correct (or isn't implemented correctly).

You could address the issue by just using BCD counters to begin with.
 

Thread Starter

Vilius_Zalenas

Joined Jul 24, 2022
156
So what is the problem? The display will display zero when the counter resets to zero.
Display should reset to zero at number nine, not at number F. I already got my desired answer from the first reply in this thread. I will use CD4026 for both counting and driving the segment displays.
 
Last edited:
The problem is that the OP hasn’t told us exactly which chip he is using for the BCD to 7 segment decoder.
Therefore we can’t explain him directly from the data sheet what he is required to do.
 
Last edited:

Thread Starter

Vilius_Zalenas

Joined Jul 24, 2022
156
The problem is that the OP hasn’t told us exactly which chip he is using for the BCD to 7 segment decoder.
Therefore we can’t explain him directly from the data sheet what is required to do.
CD4026B is 20V compatible chip (it is claimed in the datasheet). Every line has 5V 10V and 15V Vcc specifications. Is there any need for additional BCD decoder between the 7 segment display and the CD4026B? I intend to count 5V signals at 5V vcc, datasheet has specifications for this, I should be good... Or am I missing something?
 

Ian0

Joined Aug 7, 2020
8,947
CD4026B is 20V compatible chip (it is claimed in the datasheet). Every line has 5V 10V and 15V Vcc specifications. Is there any need for additional BCD decoder between the 7 segment display and the CD4026B? I intend to count 5V signals at 5V vcc, datasheet has specifications for this, I should be good... Or am I missing something?
It's slow, and it won't be very bright!
You didn't specify your input frequency. Specifying TTL not CMOS may imply (in the absence of any other detail) that your circuit might be too fast for CMOS.
 

Thread Starter

Vilius_Zalenas

Joined Jul 24, 2022
156
It's slow, and it won't be very bright!
You didn't specify your input frequency. Specifying TTL not CMOS may imply (in the absence of any other detail) that your circuit might be too fast for CMOS.
I will use a transistor for each segemnt, so brightness wont be an issue. About the speed... I am not doing this counter for only one task, but I guess I wont exeed 100 kHz at counting. Anyway, datasheet specifies maximum speed of minimum 2.5 MHZ at 5 V vcc, so are there any other cosideratioms under 2.5 MHz, is there any difference between TTL and CMOS given speed will always be under 2.5 Mhz and the minimum pulse duration of around 220 ns (thats what the datasheet claims)
 

Ian0

Joined Aug 7, 2020
8,947
I will use a transistor for each segemnt, so brightness wont be an issue. About the speed... I am not doing this counter for only one task, but I guess I wont exeed 100 kHz at counting. Anyway, datasheet specifies maximum speed of minimum 2.5 MHZ at 5 V vcc, so are there any other cosideratioms under 2.5 MHz, is there any difference between TTL and CMOS given speed will always be under 2.5 Mhz and the minimum pulse duration of around 220 ns (thats what the datasheet claims)
If you're designing a pcb, then tracking 7 transistors will be a real pain - search for a really bright display instead!
Otherwise it would be easier to go back to your original circuit with separate counter and decoder.
 
CD4026B is 20V compatible chip (it is claimed in the datasheet). Every line has 5V 10V and 15V Vcc specifications. Is there any need for additional BCD decoder between the 7 segment display and the CD4026B?
Thanks for the information.
The following timing diagram will clarify to you the CD4026’s operation. But the short answer is: no.
IMG_4099.jpeg
 
Last edited:
Top