The project represents a game on a grid of 72 LEDs (9 rows by 8 columns) in which the player must move a light representing a platform from left to right to strategically to catch falling objects.
The game is inspired from a classic game called (egg catcher) in which the player controls the position of a basket so as to catch the falling eggs. If he caught the falling egg his score increases. Otherwise, His lives decreases. The controls are two momentary push buttons. If the player successfully keeps the platform under a falling object while it is in the bottom row, the score will increment. Otherwise, the lives count will decrement. The game starts with 3 lives with the player and ends when the player loses these 3 lives. When this occurs, the game clock is disabled so the objects freeze in place on the screen and a “game over” flag will raise to indicate that the game is over.
3. Egg catcher game
Inspired from egg catcher game
Classic game
Gain points or loss lives
3
4. The main idea
Array of LEDs
Each luminous led represents an egg
Lighting and extinction of LEDs represents
egg movement
Basket position is represented by a row of LEDs
Two seven-segment chips show the score
Another seven-segment chip shows
number of lives
4
5. The circuit
Consists of seven subcircuits:
1. Random position generator
2. Display (Array of LEDs)
3. Transition bus
4. Basket position controller
5. Comparator
6. Counter and score display
7. Lives Display
5
7. The circuit
1. Random position generator
2. Display (Array of LEDs)
3. Transition bus
4. Basket position controller
5. Comparator
6. Counter and score display
7. Lives Display
7
8. 1. Random position generator subcircuit
Purpose: Illuminating a random led every cycle
The idea depends on different transition delays
Consists of three XOR gates
Each of them uses the other two outputs as inputs
The path of every output-to-input is different in transition delays
8
10. The circuit
1. Random position generator
2. Display (Array of LEDs)
3. Transition bus
4. Basket position controller
5. Comparator
6. Counter and score display
7. Lives Display
10
11. 2. Display subcircuit
Purpose: Displaying current position to the player
Consists of 64 LEDs
8 rows x 8 columns
Only one led can illuminate at a time
No two subsequent rows can have an illuminated LEDs
An extra row of 8 LEDs represents basket position
11
12. The circuit
1. Random position generator
2. Display (Array of LEDs)
3. Transition bus
4. Basket position controller
5. Comparator
6. Counter and score display
7. Lives Display
12
13. 3. Transition bus subcircuit
Purpose: Moving the position of illuminated LED to next row
The idea depends on flip flop state transition
Consists of either :
three flip flops and a decoder for each row 8 more ICs
eight flip flops for each row 8 more complex comparator
(more likely to be used)
13
16. The circuit
1. Random position generator
2. Display (Array of LEDs)
3. Transition bus
4. Basket position controller
5. Comparator
6. Counter and score display
7. Lives Display
16
17. 4. Basket position controller subcircuit
Purpose: Moving the basket right or left
The idea depends on an up down counter
Consists of two push buttons, an up down counter and a decoder
We can use a 3-bit adder and flip-flops instead of the counter
The up button will be connected to the input carry
the down button will be connected to all the B inputs
All the A inputs are connected to the flip flops which will store the adder's last state
17
19. The circuit
1. Random position generator
2. Display (Array of LEDs)
3. Transition bus
4. Basket position controller
5. Comparator
6. Counter and score display
7. Lives Display
19
20. 5. Comparator subcircuit
Acts as a logical judge
Purpose: Comparing the last row with the controlled row
The output is a single bit 0/1 to fit the counter input
The output is 0 if die and 1 if caught
Its output is valid only if the last row has an illuminated led
Can done using a set of AND & OR gates
20
23. The circuit
1. Random position generator
2. Display (Array of LEDs)
3. Transition bus
4. Basket position controller
5. Comparator
6. Counter and score display
7. Lives Display
23
24. 6.1 Counter subcircuit
Purpose: Calculates the score
If the comparator o/p is high, increase one
Counts up in range from 0:99
The score will be displayed on two 7-segment chips
It will be implemented using two subsequent 4026 Ics
24
26. 7490 counter
Every clock counts one
Output is 4-bit BCD
So output will be no more than 15
Can be used only for a decade (0:9)
We need to count in a century range (0:99)
26
27. Alternative solution
We need to display the score on two 7-segment chips
7490 IC is inadequate
We can use two 4026 ICs alternatively
Every clock it counts up one
It produces a clock every decade
Its output is the 7-segment input
27
28. 4026 subcircuit
Every time the first IC reaches 9 the second
IC counts one
The clock is the comparator o/p
The o/p goes to 7-segment directly
No need to use 7447 (BCD to 7-segment
decoder)
28
29. 6.2 Score display subcircuit
Just take the counter output and display it on two 7-segments
29
31. The circuit
1. Random position generator
2. Display (Array of LEDs)
3. Transition bus
4. Basket position controller
5. Comparator
6. Counter and score display
7. Lives Display
31
32. 7. Lives display subcircuit (1)
Purpose: Displays Player’s Lives
If the comparator o/p is low and valid, decrease one
Counts down in range from 3 to 0
If the o/p goes to 0 then GAME OVER
We CAN use the 7490 counter here
32
33. 7. Lives display subcircuit (2)
The Circuit uses a 7490 counter that counts UP from 0 to 3
The 1st two bits are inverted to count down from 3 to 0
When it reaches zero a game-over flag is raised and the game
stops
The game's clock will remain high when the player loses
33