Lab 11: Protoboard Ping-Pong
Design and build a circuit that allows two people (LEFT and RIGHT) to play ping-pong
using eight LEDs in a row to display the moving ball and two push buttons for paddles. A
single lit LED represents the ball, which moves from left to right or from right to left.
Here are the rules:
- The circuit powers up with the ball in the leftmost position, ready for LEFT to serve.
- The balance of the rules are symmetric for the two players, L (LEFT) and R (RIGHT).
- The circuit knows whose turn is next, L or R.
- When it is L's turn, L hits the left paddle button (LPB), and starts the ball moving
from left to right. The LPB is ignored while the ball is moving from left to right.
- When the ball is moving from left to right, R must push the right paddle button (RPB)
when the ball is in the right most position. If R pushes RPB at this time, the direction
of the ball changes, and it then moves from right to left. Then it is up to L to press LPB
at the proper time to "return the volley'' when the ball reaches the left end, etc...
- If R pushes RPB before the ball is in the rightmost position, or fails to push it the
before the ball "falls off the end,'' then the turn ends, L gets a point, and it is
L's turn next, to serve.
- When L scores a point, an output will go high. When L serves, the output will go back
low. (Adding a score counter is not a required part of this lab.)
- If R scores a point (L failed to hit the ball at the proper time), the ball will go and
sit at the rightmost position so that R can serve.
Implement and test your circuit. Use the debounced pushbuttons on your breadboard as
Bonus Question: Implement some method of keeping track of and
displaying the score (5% extra)..
Copyright © 2000, New Mexico Tech