38
Catch or Die! 1 © M u s t a f a k a m e l

Catch or die Project

Embed Size (px)

Citation preview

Page 1: Catch or die Project

© M

ustafa kamel

1

Catch or Die!

Page 2: Catch or die Project

2Team Members

Ahmed OrabiOmar RaafatMahmoud El-SayedMahmoud EidarousMustafa Kamel

Page 3: Catch or die Project

Egg catcher game

Inspired from egg catcher game Classic game Gain points or loss lives

3

Page 4: Catch or die Project

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

Page 5: Catch or die Project

5The circuit

Consists of seven subcircuits:1. Random position generator2. Display (Array of LEDs)3. Transition bus4. Basket position controller5. Comparator6. Counter and score display7. Lives Display

Page 6: Catch or die Project

6The circuit schema

RPG circui

t

Display LEDsTransitio

nbus

Basket position Comparato

r

Century Counter

Live

s di

spla

y

Page 7: Catch or die Project

7The circuit

1. Random position generator2. Display (Array of LEDs)3. Transition bus4. Basket position controller5. Comparator6. Counter and score display7. Lives Display

Page 8: Catch or die Project

81. 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

Page 9: Catch or die Project

9The subcircuit schematic

Page 10: Catch or die Project

10The circuit

1. Random position generator2. Display (Array of LEDs)3. Transition bus4. Basket position controller5. Comparator6. Counter and score display7. Lives Display

Page 11: Catch or die Project

112. 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

Page 12: Catch or die Project

12The circuit

1. Random position generator2. Display (Array of LEDs)3. Transition bus4. Basket position controller5. Comparator6. Counter and score display7. Lives Display

Page 13: Catch or die Project

133. 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)

Page 14: Catch or die Project

14Transition bus schematic (feeder)

Page 15: Catch or die Project

15Transition bus schematic (flip flops)

Page 16: Catch or die Project

16The circuit

1. Random position generator2. Display (Array of LEDs)3. Transition bus4. Basket position controller5. Comparator6. Counter and score display7. Lives Display

Page 17: Catch or die Project

174. 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

Page 18: Catch or die Project

18BPC schematic

Page 19: Catch or die Project

19The circuit

1. Random position generator2. Display (Array of LEDs)3. Transition bus4. Basket position controller5. Comparator6. Counter and score display7. Lives Display

Page 20: Catch or die Project

205. 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

Page 21: Catch or die Project

21Comparator schematic

Page 22: Catch or die Project

22Comparator schematic

Page 23: Catch or die Project

23The circuit

1. Random position generator2. Display (Array of LEDs)3. Transition bus4. Basket position controller5. Comparator6. Counter and score display7. Lives Display

Page 24: Catch or die Project

246.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

Page 25: Catch or die Project

7490 counter25

Page 26: Catch or die Project

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

Page 27: Catch or die Project

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

Page 28: Catch or die Project

284026 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)

Page 29: Catch or die Project

296.2 Score display subcircuit

Just take the counter output and display it on two 7-segments

Page 30: Catch or die Project

Comparator and score display30

Page 31: Catch or die Project

31The circuit

1. Random position generator2. Display (Array of LEDs)3. Transition bus4. Basket position controller5. Comparator6. Counter and score display7. Lives Display

Page 32: Catch or die Project

327. 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

Page 33: Catch or die Project

337. 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

Page 34: Catch or die Project

34Lives display schematic

Page 35: Catch or die Project

35Conclusion

Page 36: Catch or die Project

36Components

Component Quantity Component Quantit

y Component Quantity

Red LEDs 8x8 Decoders 2 PWM ICs 1

Green LEDs 8 IC 2047 2 PPM circuit 1

Push buttons 2 7490 1 4-bit adder 1

Octal flip flops 8 Green 7-seg 2 Hex not(Schmitt Triggered) 3

Quad flip flop 2 Red 7-seg 1 Double 4-input OR 3

Monostable multivibrator 1 BCD to 7Seg 1 Hex Schmitt buffer 1

Quad 2-input AND 4 Quad 2-input XOR 3 Resistors --

Page 37: Catch or die Project

37

Any questions!

Page 38: Catch or die Project

38

Thank you!