Simple LED Ping Pong ASM

Thread Starter

shaider6192

Joined Sep 7, 2011
6
Hi!

I heard that this forum is a very helpful forum and I would like some help on my project. I'm an Electronics Engineering Student and we have a subject called Switching Theory 2. This are the specs for my project :


LED PING PONG (ASM)

Goal:

In this challenge, design a Ping-Pong Machine for two human players using Shift Registers and Sequential State Machine Controllers.

Description:

The circuit designed and loaded on to the BASYS board will function as a simple Ping-Pong game. The Game uses the 8 LEDs to represent a moving Ping-Pong ball and choice of two push buttons as serving as paddles. At any given time, one of the 8 LEDs is lit and moved to represent the Ping-Pong ball moving in a specific direction. The players use the push button to bounce the ball back whenever the ball reaches the respective ends. The rules of the game and design specifications are listed in the following sections.

Rules:

1.The rules for left and right players are symmetric except for the first serve. The left player always serves first.

2.The ball position is moved by the clock source, that causes LED output to serially shift every one-sixth of a second.

3.After the first serve, the circuit knows who gets to serve the next time (L - Left Player; R - Right Player) according to the rules.

4.When it is L's turn to serve, L hits the push button LPB, the ball (LED - ON) starts to move from left most (LED<7>) to the right most position (LED<0>).
When the ball is in the right most position (LED<0>) and R returns the volley using the right paddle when LED<0> is turned "ON", the ball starts to move from right to left.

5.The direction of shift reverses whenever the correct push button is pressed at the correct time.After a player serves or returns a volley, the corresponding push button is ignored or disabled.

6.If a player hits the paddle either "too early" (when the ball is not in LED<7> or LED<0> correspondingly) or "too late" (when the ball falls off the end, thereby a miss), then the opponent scores a point.

7.A player who scores a point, gets to serve the next time.

8.The score is maintained using two 4-bit counters.

9.A player who scores 9 points first wins the game. The counter then resets to start all over again.


SO heres my idea so far:

I need a CONTROL UNIT and a DATA UNIT.

Im gonna use 74194 IC. It is a multi function IC which performs Shift LEFT and SHIFT RIGHT. So every time im gonna press the push button, the led shifts right and if you push the other push button, it does the shift left.

I will also use a counter IC for the score and connect it to a 7-segment decoder to display the score.

My problem is how do I implement the function which when you press the button, and if the corresponding LED light near the player is lighting, it will perform shift left or right?

Is anyone good at making ASM chart? If so, please help me :D

Thanks alot :D -shaider
 

R!f@@

Joined Apr 2, 2009
9,918
Welcome to the forum.

This forum helps to those who help themselves.
So if you need our help first try to figure out or draw something and post it, then from there it will be amended by the forum members.
 

Thread Starter

shaider6192

Joined Sep 7, 2011
6
ok sir, i will try to do my own ASM chart and ask help for corrections. I will come back maybe 10 hrs from now.. gotta go to school :D
 

Thread Starter

shaider6192

Joined Sep 7, 2011
6
not really Bill.. its simple.. a line of LED's... 8 pcs LED. when it reaches the 1st LED, the person should push the button to send it back.. and when the light reaches to the 8th LED, the opponent should push his button to send it back to you :D
 

Bernard

Joined Aug 7, 2008
5,784
Some random thoughts: Paddle SW's trigger 20 ms pulse ( 555?) to mask SW bounce; leading edge of pulse differentiated to give a short pulse, 1-2 ms. If register were 2 stages longer, trigger of first or last stage would indicate a missed hit ORd with SW pulse, but would require 3 IC's, or have first or last stage trigger oneshots ( more 555's ). If ball return was successful, the oneshot's would never be triggered, but if triggered would be registered as a score & load a 1 on servers end of SR.
74AC194, 74ACT194 can drive LED's directly
For kicks let us see your cascading of two 74194's.
 
Top