Two player pong on 8x8 led matrix

Post here to let others know of a project you're working on.

Moderators: Chuckt, Garth, bitfogav

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
tgraz34
decided to stick around...
decided to stick around...
Posts: 32
Joined: Tue Jun 08, 2010 12:14 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Two player pong on 8x8 led matrix

Post by tgraz34 » Mon Sep 13, 2010 7:38 am

Ive been thinking about this project for a while now and i could use a little insight. I plan on using potentiometers as the controllers and a GR led matrix as the display.

Would assembly be an efficient way of programing this?

If you have any ideas, suggestions, example code please let me know. :D

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: Two player pong on 8x8 led matrix

Post by bitfogav » Mon Sep 13, 2010 11:36 pm

tgraz34 wrote:Ive been thinking about this project for a while now and i could use a little insight. I plan on using potentiometers as the controllers and a GR led matrix as the display.

Would assembly be an efficient way of programing this?

If you have any ideas, suggestions, example code please let me know. :D
Sounds like a really great idea, It will probably be easier to program using pic basic though.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Post by brad » Tue Sep 14, 2010 6:14 am

First up, check out my adc with digital ports page to see exactly how to use paddle controllers or potentiometers as your input device :)

It would be quite straight forward to make in assembly but how large is your display? do you want the ball to just keep bouncing in the same direction or change direction depending on where it hits your paddle?

And bitfogav certainly has a good point, pic basic would make this game into something great. you could easily interface an LCD screen to display your score and whatever else.

tgraz34
decided to stick around...
decided to stick around...
Posts: 32
Joined: Tue Jun 08, 2010 12:14 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Two player pong on 8x8 led matrix

Post by tgraz34 » Wed Oct 06, 2010 10:09 am

Hello again
Surprisingly, i made some progress with this project. Ive been so busy with work and school. I have a circuit that can move a paddle up and down the matrix with a potentiometer. I followed brads adc with digital ports to do that. Now im just trying to interface what i have right now with the pong from the 8x8 game system.

I had a question though, could anyone tell me how 74373 latches work. how do they send data to the matrix and such.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Two player pong on 8x8 led matrix

Post by brad » Wed Oct 06, 2010 4:00 pm

The 74373 latches are really quite straight forward.

All that is inside one of these chips is eight D latches (which means they will store whatever is present on their input when they get a latch pulse) and then on the output of each of the latches is a tri-state buffer. The tri-state buffers are like an electronic switch which will either be enabled which will then pass on the data to the LED's or they will be disabled which effectively open circuits the LED's from the latches.

So, all we do is connect the eight inputs to the microcontroller and the eight outputs to the LED's (or perhaps to transistors etc.. if you are using them)

This means we now have our data connections all ready to go - but we need a way of controlling the data. this is where the latch enable and output enable lines come into play. We first want to latch (or grab) the data and THEN we want to send it to the LED's. The reason that we don't want to send the data straight to the LED's is because we need to send all data (e.g. red, green and perhaps blue) to the LED's at once, we can't really stagger it because we would get strange results. So we send eight bits of data to the latches and then we send a logic 1 then back to a logic 0 to the LATCH ENABLE pin of this particular 74373. This means we have now latched onto the data (so it is now stored in the 74373)

We then do this for all other 74373's that we may have connected to our display - E.G. if you have an RG display you will need one 74373 for the red LED's and one for green. if you have an RGB display you would need three etc... Once all 74373's have their data, we then enable the output of ALL 74373 by sending a logic 0 to the output enable pins (you can connect them altogether because they all get enabled at the same time)

once you have displayed the info on the display for long enough you then just send a logic 1 to the output enable pin and the LED's will turn off because you have created an open circuit between the LED's and the latches.

hope that helps!

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 15 guests