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.

74LS138 3-to-8 decoder

Status
Not open for further replies.

danny009

New Member
hi i am new to electronics and i have just decided to make a dotmatrix pong game 7x8 matrix (pog game is just two paddles and a ball that you batt around until someone misses) and someone said to use a 74LS138 3-to-8 decoder i am not sue on what these are and how the work ive looked around on the net and all i get is mostly junk can someone please help and tell me please thanks
 
Given the idea of the setup I think it will be very difficult to build it using logic chip alone. Let me tell you why.

The playing field is 7(Height)x8(width) and you have bat on each side. The size of bat can be 1 or more, moving vertically. This leaves the middle 5x8=40 positions where the LED can light up to denote where and how the ball is moving. Of course you would want the ball to be able to move fast or slow and sometimes bounce off at an angle to the bat or when it reaches the top and bottom field boundary. All these means a lot of calculations, and is best done using microcontroller.

Actually, this is a very nice (school) project for microcontroller programming.
 
oh no sorry i dint explain very well :( im using a picaxe 28x2 and they said it would be easyer to use a decoder for the outputs as it will free some up as when i was testing my progrmming for the whole game it was very easy as it was almost square so i wanted to make it longer but t do this i needed more outputs so that what i need it for sorry for not being clear on the first post.
 
something like a 74hc595 will give you LOTS of outputs from 3 (or 4) control lines on your microcontroller. once you connect the first '595, the rest daisy chain to it, so you can easily add 8 outputs at a time... 16, 24, 32, 40, etc, limited only by the speed at which your uC can update the registers.
 
Both the 74HC138 and the 74HC595 devices will allow you to save pins but neither provides the 'peak' current output you'll need when driving a matrix at low duty cycles so you will probably need driver transistors on the outputs.

You might consider an 8-bit serial-to-parallel driver IC like the Micrel MIC5821 or the pin-for-pin compatible Allegro A6821 instead. These ICs are very much like the 8-bit serial-to-parallel 74HC595 IC but capable of sinking up to 500-ma current on each open collector (open drain) output pin.

I've used these ICs with an 8-bit, 9-bit, or 10-bit bus to drive single 8x8 and multiple 8x8 matrix displays. One advantage using the 74HC595 IC or the MIC5821 or A6821 driver ICs is their OE (output enable) pins which make it very easy to impliment PWM brightness control.
 
Poor little old 4000 series cmos everyone has forgotten you except me ... try using 4094 serial to parrallel plus can cascade em ... 3 pins ==> hundreds just becareful you dont run too fast a signal about 4mhz top clocking speed !!
 
blueroomelectronics said:
I like the old CD4000 stuff, used a CD4022 recently on a kit.

It is old farts like us blue that keep them making the 4000 and 7400 series ... you wait soon they be taking our beloved cheap opamps away too !!!
 
No doubt, but they're are millions of em out there and everybody makes em. I try to avoid the odd ones in my designs. You can still get vacuum tubes from Russia & China. So most 40xx CMOS & 74xx TTL have a few decades left.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top