Presentation is loading. Please wait.

Presentation is loading. Please wait.

Handheld Mastermind Senior Design Projects II Carl Kelso, Mike Ellis, Ryan Shon.

Similar presentations


Presentation on theme: "Handheld Mastermind Senior Design Projects II Carl Kelso, Mike Ellis, Ryan Shon."— Presentation transcript:

1 Handheld Mastermind Senior Design Projects II Carl Kelso, Mike Ellis, Ryan Shon

2 Agenda Objective Example Hardware Firmware Interface Considerations Questions

3 Objective Create a Handheld Replica of Mastermind Provide a Variety of Play Modes Single Player Time Challenges Guess Challenges Tournaments Variable Difficulty Levels Maintain User History High Score List

4 Mastermind A Game of Code Breaking Pattern Keeper chooses and hides an ordered set of colored pegs Pattern Guesser attempts to guess the peg colors and order Pattern Keeper informs the Guesser of how many pegs are correct and how many are the right color but in the wrong place

5 An Example Game A master code is created and hidden Codes are made from a set of colors The responses do not show which peg is correct, only how many White means the correct color is in the wrong place Black means the correct color is in the right place

6 Our System Handheld Device Selectable LEDs Firmware Game Logic Serial Graphics Custom Controller

7 Hardware Microprocessor –ATMEGA 8515, 16, or 164 (40pin DIP) Peg Display –4x RGB LEDs Peg Selection –4x Red LEDs –4x Placement Tactile Switches –2x Up/Down Tactile Switches –1x Select Tactile Switches Output Display –DB9 Serial Port ATMEGA16 ATMEGA164

8 ATMEGA 8515, 16, 164 Onboard USART –0-5V Inverted RS232 (vs. ±12V) Maximum Current Limit Per Power Pin –Capable of driving or sinking 200mA Maximum Current Limit Per IO Pin –Port A supports up to 100mA –Ports B, C, D, and E support up to 100mA total Room for Growth –40 pin DIP Package

9 Generalized Schematic 4444 VCC MPU VCC MPU VCC MPU VCC MPU VCC MPU MISO VCC MPU MOSI VCC MPU SCK TX VCC RS232 OUT RX VCC RS232 IN

10 Safe Value Calculations All considered microcontrollers support –200mA total current along power pins –100mA total current out of bank A –100mA total current out of banks B, C, D, E Power Sinks –16x LEDs & USART RX/TX –5mA×16 LEDs = 80mA Between 3 and 5mA, the LED output is sufficient –Converting RS232 Voltages to 0-5V requires a pair of NPN or NMOS transistors and a diode. Doing this provides safe voltages to the chip itself, preventing a burnout

11 Controller Design In Game Controls –Select buttons choose a single LED –Pressing the highlighted LED’s button deselects –Pressing up or down while an LED is selected changes the color –Pressing up or down while an LED is not selected pauses the game and switches to the pause menu –Pressing enter submits the code for comparison Menu System –The up/down buttons highlight an item and the enter key chooses it –To go back, press the up key

12 RS232 Java Terminal Display Raster Object Based Drawing Commands Benefits over LCD –Lower Cost/Speed Requirements $100-$300 for a 320x240xRGB LCD –Abstracted Rendering Commands –Simplified Circuit Design RXTX based Serial Comm Still Considering –LCD/OLED Display Addition

13 System Modes Startup –Boot sequence initializes interrupts, USART, timers, memory, etc… Menu –Allows player to select game modes and difficulties, as well as enter in their name Single –Single player game where the computer selects a secret code Multi –One of several multiplayer modes where two players compete for the fewest guesses, fastest time, or against one another Tournament –System maintains a stack where several players compete for the fewest guesses across several games Completed –Menu screen for acknowledging a player’s success

14 Firmware Modules Abstraction to Simplify Assembly –EEPROM Control Saving user data –Graphics Output Rendering menus and output to the screen –Timer/RTC Control Scoring in single and multiplayer modes –String Manipulation –LED Control

15 Menu System Root –New Game –High Scores New Game –Single Player –Multiplayer –Difficulty Single Player –Guest –New User –User List… Pause –Resume –Save –Give Up Multiplayer –Guess Challenge –Speed Challenge –Head to Head –Tournament Tournament –View Players –Add Player –Remove Player –Mode –Start Add Player –New User –User List…

16 Error Sources Serial Communication –Terminal or Controller may request resend –Parity based error detection possible Input –There are seven input tactile switches –All should be pressable at any point during operation

17 Test Procedure GUI Testing –Command File Response –Broken Command Tests Hardware Testing –Oscilloscope Sanity Check –Max Current Draw Tests Communication Testing –Oscilloscope Sanity Check –Streaming USART IO –IO Error Detection –Serial GUI Testing Independent Module Tests Menu Tests History and Memory Tests –Basic Reads/Writes –Complex Structure Save/Restore Timer Tests –Extended Accuracy Check Gameplay Tests –Volunteers Welcome!

18 Integration Hardware Design Finalization Assembly Module Development Integration of Modules –Module Level Testing and Hardware Integration Successive Game Mode Development Menu Development –Integration of Game Modes and Menu System Final Hardware Integration Optional LCD/OLED Display Module and Hardware Integration

19 Feasibility Concerns Expected Bottlenecks –Assembly Language Programming Expected Challenges –MPU Power Limitations –RS232 Communications –LCD Integration

20 Questions?


Download ppt "Handheld Mastermind Senior Design Projects II Carl Kelso, Mike Ellis, Ryan Shon."

Similar presentations


Ads by Google