# MOD 6 counter using 7490

Discussion in 'General Electronics Discussion' started by Anish, Jun 30, 2011.

1. ### Anish

46
0
Feb 5, 2011
Hi
I am having six 7490 bcd counter ICs. I want to set up a bcd clock. How to create a mod six counter with 7490. And i tried to AND the o/p for the number seven (0111) and giving it to the reset pin of the IC it worked. But there must be another way without using the AND gate.?
Any help?

Regards.

2. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
No, your approach seems to be correct, but the count seems wrong.

Don't you want it to count 0, 1, 2, 3, 4, 5, 0, 1, 2, 3 , 4, 5...

By resetting at 0111 it is counting: 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6...

you want it to reset as soon as the count hits 6 (0110)

3. ### Anish

46
0
Feb 5, 2011
Yeah you were right steve. I want to build a bcd clock counting hh:mm:ss
so, it has to reset on counting 6. (0,1,2,3,4,5,0,1,2,3...)

But is there any approach by doing it not using the AND gate?

4. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
Well, you can achieve the desired outcome by many methods, but if you're using a 7490 then this is the most practical way.

If it's the and gate itself, then you can get the same function using other logic (a nand gate and an inverter (or 2 nand gates, one wired as an inverter).

5. ### Anish

46
0
Feb 5, 2011
I feel, keeping the AND gate itself, makes the module bigger. No way for a nand and a inverter.! Ok, I will continue on my project and ask when i am stuck

6. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
Are you using 74 series TTL for a reason? Or are you actually using 74HC?

Is there any reason you're not using something very space saving, like a microcontroller?

If you're using 74HC then there are single chip surface mount AND gates in SOT-23-5 cases. They're pretty small!

7. ### Anish

46
0
Feb 5, 2011
Yeah i am using 74LS90 TTL because of low cost and I dont have a programmer to use the microcontroller. If I were to use the controller, i would have directly designed a digital clock with the 7segment display and not the BCD clock!
Anyways, BCD clock seems some what geeky than traditional 7segment display clock!

8. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
OK, fair enough.

You could always use a couple of diodes, resistors and transistors to produce an and gate, but it would probably be larger than a 16 pin IC.

If the whole thing is being built on a single board then you should be able to use a single package to handle several dividers.

9. ### Anish

46
0
Feb 5, 2011
Sorry dude... I cant get you in this line:
"you should be able to use a single package to handle several dividers"

and also consider this questions:
1. I am using 555 for the clock. Will it be accurate enough to use this as a counting clock or can i take the wall output and divide it by 10 and then by 6 to get the 1 Hz clock? (wall outlet here is 230v 60hz). But I cant rely on this on power cuts.

2. Give me some ideas concerning, how do i manually control the countings too for changing the time as and when needed.

Thanks

10. ### Laplace

1,252
184
Apr 4, 2010
Doesn't the 7490 have an internal AND gate for the two reset inputs? So why use an external gate?

11. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
A single 74LS08 contains 4 2-input and gates in one package. This one package provides enough AND gates for 4 divide by 6 modules (I presume you need only 2)

You'd probably want something more stable than this. It may gain or lose several minutes per day unless you can trim it accurately. Even with trimming it will vary with temperature depending on the stability of the various components (especially capacitors) and so it would be difficult to get it under +/- many seconds per day.

You could use a 32768 Hz crystal and divide it by 32768 (2^15) to get an accurate 1Hz signal.

If you start with a higher frequency oscillator then you can reduce the amount that it is divided. This will allow you to count forward very fast. It's still a problem if you go too far since the 7490 can't count backward.

12. ### Anish

46
0
Feb 5, 2011
@laplace. Yeah it has. But when i tried to reset it at count six using those pins provided in the ic, it resets for the count of 3! i.e. at 0011 instead for 0110

Last edited: Jun 30, 2011
13. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
Heh. So it does. And a quick google shows how to wire it up.

Whilst I recognise the 7490 by its name, its is actually a chip I've never used.

I will go and sit in the corner for a while...

14. ### Anish

46
0
Feb 5, 2011
@steve, I googled and found out for a mod 6 counter, connect the outputs QB and QC to RO1(pin2) and RO2(pin3). Its perfectly working. But now, where from can I take the carry signal, when it finishes counting 10? i.e when o/p is 0000

PS: also give me info about the lowest available crystal oscillator(in frequency, i mean lowest frequency available)

Last edited: Jul 1, 2011
15. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
I'd say that you could use QC as the carry output.

The lowest easily available crystal is 32.768kHz.

You can get either crystals or modules that have a TTL compatible output.

16. ### Anish

46
0
Feb 5, 2011
How does QC helps as a carry o/p? I mean its the 12th pin right? It works for the counts 8 as well as 9.

17. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
Check the datasheet.

The 7490 counts on the negative edge of the clock. You thus want something that goes from high to low as the counter is reset. The highest order bit (the "4" bit). This should be QC (pin 8), presuming that from LSB to MSB it goes QA, QB, QC.

18. ### Anish

46
0
Feb 5, 2011
If its the highest order bit, will it not be QD(11th pin)? I did know that 7490 is negative edge triggered. But I didnt notice that the MSB pin would be high for both 8 and 9, and than only it will become low.(I thought it would go up after finishing 8 and again would come down to count 9).
Thanks a lot for triggering that idea...

19. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
No. because you're resetting the counter before QD ever gets set.

If you're resetting at 6, does it ever reach 8 or 9?

20. ### Anish

46
0
Feb 5, 2011
I am sorry you mistook dude, i asked for a generation of carry after the count of 9 not 6.
So taking carry from the QD will generate the carry every 10th count.