Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Beginner: Counter Design Circuit

Status
Not open for further replies.

berrymr

New Member
I have to design a logic circuit that will count the months of the year. The count should increase each time a button is pressed. The display should show a "1" for January, "2" for February ... through a "12" for December. When the display reaches 12, the next time the button is pressed the display should return to "1".

The count should be shown on two seven segment displays. You may use any gates or modules or "primitives" to create the design.

This is probably really easy but I am fairly new to circuit design logic. I am struggling on trying to figure out how to start the design and could use some help.

thanks,
Mike
 
I have to design a logic circuit that will count the months of the year. The count should increase each time a button is pressed. The display should show a "1" for January, "2" for February ... through a "12" for December. When the display reaches 12, the next time the button is pressed the display should return to "1".

The count should be shown on two seven segment displays. You may use any gates or modules or "primitives" to create the design.

This is probably really easy but I am fairly new to circuit design logic. I am struggling on trying to figure out how to start the design and could use some help.

thanks,
Mike

hi,
Get the datasheet for the CD40110B ic from Datasheet Archive - Free Datasheet Search Engine :: PDF Datasheets :: Data Sheet :: Datasheet :: Application Note : çš„å￾‚æ•° : 规格书 : 技术资料 : ë￾°ì￾´í„°ì‹œíŠ¸ : データ・シート : Fiche technique : Datenblatt : опиÑ￾ание

A simple circuit would be to use two of these ic's, connected in series as a 0 to 99 counter.
They will drive the 7 seg LED's directly.
Use a CD4011 NAND gate to detect a count of '13' that will RESET the counter and CLOCK in the 1st '1" bit.
So it counts from 1 thru 12.

OK.?:)
 
Use a CD4011 NAND gate to detect a count of '13' that will RESET the counter and CLOCK in the 1st '1" bit.
So it counts from 1 thru 12.

OK.?:)

Detecting the "13" state from two 7-segment outputs using 4011 are easier said than done.
 
Detecting the "13" state from two 7-segment outputs using 4011 are easier said than done.

hi LC,
Never said it would be easy.:)

I am trying to help as he said, 'to start the design'.
 
hi LC,
Never said it would be easy.:)

It is very hard indeed. :)

If the OP can decode "13" using only 4011 on two CD40110Bs 7-segment outputs, then he already deserve an A for his project.

The CD40110B does not has preload pins so it can only reset to zero. Therefore the above decode circuit would also require to give it an extra clock pulse after reset so that its count value is now "1".

I would bet even his tutor can't easily know how to pull off that trick.
 
It is very hard indeed. :)

If the OP can decode "13" using only 4011 on two CD40110Bs 7-segment outputs, then he already deserve an A for his project.

The CD40110B does not has preload pins so it can only reset to zero. Therefore the above decode circuit would also require to give it an extra clock pulse after reset so that its count value is now "1".

I would bet even his tutor can't easily know how to pull off that trick.

hi LC,
I think you are taking my comment about the 4011 too literally.
We both know there is much more to it than that.:)
A hint to the OP would be think 'signal diodes'.!

I'm sure you would agree that we like to the OP doing as much as he can using his own limited experience.
 
hi LC,

Just did a quick check, a circuit as simple as this type would get the job done.
 

Attachments

  • Decode13.gif
    Decode13.gif
    8.7 KB · Views: 363
4011

Thinks for the help, all I have to do is draw the design on paper and then use Quartus II software to simulate the design. The only problem is I am unfamiliar with the 4011. I am mostly familiar with 7490 and 7447. Anything else I have no clue about.

thanks,
Mike
 
Thinks for the help, all I have to do is draw the design on paper and then use Quartus II software to simulate the design. The only problem is I am unfamiliar with the 4011. I am mostly familiar with 7490 and 7447. Anything else I have no clue about.

thanks,
Mike

hi Mike,
You have realised a CD40110 is a counter/seg driver .?

and the 4011 is a quad NAND.?

Run your simulation, lets see what you get.:)

EDIT: you cannot use 7447 , active LOW seg drivers with my decoding, will need to be modified.
The 7490 ic would be ok for the counter, but I would recommend you decode on the counter output,,, a different decode circuit.!

Look at 7492 ic.!!!!
 
Last edited:
hi LC,

Just did a quick check, a circuit as simple as this type would get the job done.

Nicely done Eric.

Only possible complaint is the duration of pressing manual push button. If someone presses it for a few seconds then the display will be zero.

Lengthening the RC time constant would result in the display displaying zero, then change into one few seconds later for a brief push of the button.

You just can't win in both cases. :)
 
earlier reply

Scratch what I said earlier, I have to draw the block diagram using Quartus II software and then print that along with the simulation report.

eric the circuit you came up with looks good. Also I cannot get the datasheet for the CD40110B ic from the place you recommended to load up for some reason.
 
Nicely done Eric.

Only possible complaint is the duration of pressing manual push button. If someone presses it for a few seconds then the display will be zero.

Lengthening the RC time constant would result in the display displaying zero, then change into one few seconds later for a brief push of the button.

You just can't win in both cases. :)

hi LC,
The RESET signal is taken out before the manual CLOCK, so you could keep the manual CLOCK switch pressed for as long as you wish without creating a RESET.:)
 
Scratch what I said earlier, I have to draw the block diagram using Quartus II software and then print that along with the simulation report.

eric the circuit you came up with looks good. Also I cannot get the datasheet for the CD40110B ic from the place you recommended to load up for some reason.

hi,
Here is the pdf.

If you can only simulate say 7490 and 7447 for your project, thats not a problem [use common anode 7 seg LED's].
Just decode the '13th' state on the output pins of the 7490's.

Do you follow OK.?
 

Attachments

  • cd40110b.pdf
    433.5 KB · Views: 417
Last edited:
hi LC,
The RESET signal is taken out before the manual CLOCK, so you could keep the manual CLOCK switch pressed for as long as you wish without creating a RESET.:)

I'm not talking about the reset. It works OK.

Let's consider the case when the count is "12". User press hard and the counter advance to "13" and immediately reset into "0" with no problem.

However, you have rely on the reset circuitry to generate an extra clock pulse to advance the counter into the "1" state. The current circuit won't work because the clock signal control is taken over by the push button as long as it is pressed.

However, it is not difficult to rectify with additional circuitry.

This "0" stage problem is difficult to get around with, unless we use presettable counter.

I have uploaded another simple design that might work. The OP can now have more choices in choosing his design.

This simple circuit is easy to understand and will produce month indication of "1", "2", instead of "01", "02", and does not suffer from any possible timing, state decoding or race problem.
 

Attachments

  • month.gif
    month.gif
    11.5 KB · Views: 292
Last edited:
I'm not talking about the reset. It works OK.

However, you have rely on the reset circuitry to generate an extra clock pulse to advance the counter into the "1" state. The current circuit won't work because the clock signal control is taken over by the push button as long as it is pressed.

hi,
The counter is clocked on the rising edge of the clock pulse.
The manual push generates the clock pulse when the switch is released.

I think the OP may have some difficulty in simulating the action of the 40110 counter.
I suspect he will use the 7490/7447 path for the simulation.:)

Looking at your block circuit I would believe that it would be fairly complex when compared to the 74 series option.

Regards
 
hi,
The counter is clocked on the rising edge of the clock pulse.
The manual push generates the clock pulse when the switch is released.

Right. I see. My oversight with the triggering edge on CD40110.

I think the OP may have some difficulty in simulating the action of the 40110 counter.
I suspect he will use the 7490/7447 path for the simulation.:)

Even so, he would have a hard time moving the count from "0" to "1" after reset.

Looking at your block circuit I would believe that it would be fairly complex when compared to the 74 series option.

Just a few diodes to light up the correct 7-segments, dictated by one of the twelve inputs. :)

Edited: Just did a quick check and if I group several segments together first then I only need about 3 diodes for each of the 12 inputs to drive each digit.

I guess the OP is not allow to use a PROM or EPROM because 8-bit output is all is needed to display "1" to "12" properly.
 
Last edited:
hi LC,

Just did a quick check, a circuit as simple as this type would get the job done.

hi Eric sorry to but in another persons post again but i am trying to improve my circuit reading skills(not doing very well though),i wanted to ask what are the diodes in your diagram for?i mean it will send a high when the other side is grounded?rite

And why the RC circuit on the manual switch side i mean the signal wont go anyways if the switch is not pressed?

Right. I see. My oversight with the triggering edge on CD40110.



Even so, he would have a hard time moving the count from "0" to "1" after reset.



Just a few diodes to light up the correct 7-segments, dictated by one of the twelve inputs. :)

Edited: Just did a quick check and if I group several segments together first then I only need about 3 diodes for each of the 12 inputs to drive each digit.

I guess the OP is not allow to use a PROM or EPROM because 8-bit output is all is needed to display "1" to "12" properly.

Hi eblc,A question to you also about the 'transistor and diode network' what will someone need them for?Decoding?

I know the above questions may sound stupid but it is better to ask them rather then not knowing them for later.Be Gentle!
 
Last edited:
hi Eric sorry to but in another persons post again but i am trying to improve my circuit reading skills(not doing very well though),i wanted to ask what are the diodes in your diagram for?i mean it will send a high when the other side is grounded?rite

And why the RC circuit on the manual switch side i mean the signal wont go anyways if the switch is not pressed?
hi,
The two diodes and the resistor up to +V form an AND gate, both inputs
[cathodes have to be high if the junction of the two anodes is able to go high].

The transistor input [base] has to be low so that AND gate can be enabled.
So, when 'c & g' are high and 'a' is low, pins 1 and 2 of the 4011 will be high.

Pin 3 will go low and the Cap discharged, the RESET pulse is via pins8/9 thru a differentiator C/R to the 40110 RESET pin.

This RESET will clear the inputs to pin 1/2 of the 4011 and the RESET pulse will disappear.[the diode AND gate will open]
As pin3 goes low, pins 5/6 also go low, so pin4 goes high and the clock pulse goes low on pin 11.

As the R/C on pins 5/6 charge towards +V, eventually pin4 will go low and pin 11 go high,, its this high edge which clocks the 40110.


The R/C delay isnt on the manual switch side.?
Its down 'stream' of the R/C and RESET.

Do you follow, if not please ask.

EDIT:
Added image of 2inp AND, using diodes and a resistor.
Both A and B have to be high in order for the Output to go high
 

Attachments

  • AND2.gif
    AND2.gif
    3.2 KB · Views: 217
Last edited:
Hi eblc,A question to you also about the 'transistor and diode network' what will someone need them for?Decoding?

Yes. It is used for decoding when a single line can be mapped into any combination of segment(s) ON. Therefore it is possible to make a 7-segment displays nearly most of he ASCII characters easily. Or have a random display that goes from "1" to "5" to "2" to "8"....etc. Note only the display changes and there is nothing related to the actual inputs which usually is sequential.

You can get some info here where an 8-gang dip switch is decoded into 1~8 on a 7-segment display. Only one switch is ON at a time.

Diode Matrix ROM intro (7-segment display)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top