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.

74ls90/74ls47 foosball scoring--help needed

Status
Not open for further replies.

Torben

Well-Known Member
Hi all,

Short version: can you display a count from 0-4 on a 7seg led display using a 74ls90 and a 74ls47, and detect the carry when it cycles back to 0?

Long version:
My name is Torben and this is my first post. I am a computer programmer by day and a budding electronics hobbyist by night. I got the notion to build an automatic scoring system for my foosball table. This is my first digital circuit after a few analog AF projects (opamp guitar amp, bat detector, etc).

Looking through my junk box, I found a 74ls90 counter and a 74ls47 bcd led decoder/driver. Seems perfect. I made a simple debouncer with a 555, which also allows me to set the retrigger time with the timing cap on the 555. With a 7seg display, it counts from 0-9 nicely.

Unfortunately, foosball is scored best of 9, meaning that the first to 5 wins. So I need a counter which starts from 0, increments through 4, and when going to 5 signals the win (and resets the system but I'll deal with that next).

I have tried various setups on the 74ls90, and I can get it to count by 2, by 1 from 0 to 9, to count from 0 to 1, etc. But I cannot seem to figure out the way to make it increment from 0 to 5 (4 is fine if I can detect the carry to signal the win when it goes over to 5).

So the basic question is: am I misunderstanding this chip? I have read a couple of different data sheets but haven't made it yet. I don't need the full setup drawn out for me (I would like to work it out) but a hint as to what I may be missing would be great. i.e. will the idea even work or should I seek out a different part? And if possible, any pointers to reading material which would help would be great (I'm trying to work through the Art of Electronics bit on counters, but it's a little thin--or I'm a little thick). Thanks!


Torben
 
I hate to reply to my own first post...but by screwing around with the truth table in the datasheet, I have just discovered that I can count 0-4 on the 74ls90 by setting it up as a bcd counter and tying pins 8 and 12 to the master resets 0 and 1 respectively. I suspect that this is something that is likely to be pretty important when working with these things. :)

Anyway, I've learned enough to get this far largely by lurking here, so thanks for providing this site.


Torben
 
If you set the counter to divide by 10 and then reset to 0 on the 5th clock pluse it will probably do what you want. Connect pin 1 to 12, feed the clock to pin 14. Connect pins 6 and 7 to ground. Connect pin 8 to pin 3, and pin 12 to pin 2.
Win pins 2 and 3 are high the counter is reset to 0. When pins 6 and 7 are high the counter is reset to 9.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top