embedded systems lab - juembedded-ju.ucoz.com/project/summer_2012/project_summer_2012.pdf3 embedded...

5
Summer 2011/2012 Embedded lab Engineers | UNIVERSITY OF JORDAN Tic-Tac-Toe GAME PROJECT Embedded Systems Lab

Upload: vanhanh

Post on 16-Mar-2018

232 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Embedded Systems Lab - JUembedded-ju.ucoz.com/Project/Summer_2012/project_Summer_2012.pdf3 Embedded lab at JU Summer 2011/2012 Bonuses thBonus 1: (2 Marks per student) If any project

Page 1 of 5

Summer 2011/2012

Embedded lab Engineers |

UNIVERSITY

OF JORDAN Tic-Tac-Toe GAME PROJECT

Embedded Systems

Lab

Page 2: Embedded Systems Lab - JUembedded-ju.ucoz.com/Project/Summer_2012/project_Summer_2012.pdf3 Embedded lab at JU Summer 2011/2012 Bonuses thBonus 1: (2 Marks per student) If any project

2 Embedded lab at JU

Summer 2011/2012

Introduction

Tic-Tac-Toe is two-player game with two symbols refer to two players usually X and O symbols are used. Often the playing board is 3x3 squares. Each player takes a turn placing his character (X or O) into one of the nine squares. The game finishes when a player creates a winning pattern of his symbols or when there are no empty squares remaining.

Project Description and Requirement

It is required to build a small Tic-Tac-Toe game. The objective of a Tic-Tac-Toe game is to create a specific pattern of player symbols to win the game. This game is played on three by three table of squares in each square there are two different LED colors, one led for each player, i.e.18 LEDs arranged in 3 columns and 3 rows, each player has separated three by three LEDS array.

The LEDs array is to be entirely built by the students (no ready modules are allowed for fairness among students). Choose two different LED colors of your choice for each array (red, green, or blue are preferred, other colors are also allowed).

Each player takes a turn for only lighting the LEDs in his array using two push buttons, one

of the push buttons (movement button)is used to select the location of the LED to be lighted

in his LEDs array on the playing board (first the pushbutton will scan over rows then

columns), while moving through LEDs when the player reach the led it will turn on but

after move to another one it will turn off, the other push button (selection button) is used to

choose only one led to light at each turn. The player cannot light a LED in a square that is

already occupied by the other player (i.e. the led for the other player is already lighted)

The PIC should periodically check if any one of the players has any pattern from the winning patterns on his/her LEDs array, the winning patterns are horizontal or vertical or diagonal lines of lighted LEDs. When any player wins the game, the whole LED’s arrays in his/her card is to flash on and off for three seconds.

Preferred Group Size Grading Project Due Date

(2) Two is the allowed group size.

The group can be from the same class (recommended) , or from in between

classes (allowed but highly discouraged)

(15) 15 marks is the

project weight, counted as part of the final examination.

Project marks are not disclosed to students

(15, 16) 15th and 16th July 2012.

Page 3: Embedded Systems Lab - JUembedded-ju.ucoz.com/Project/Summer_2012/project_Summer_2012.pdf3 Embedded lab at JU Summer 2011/2012 Bonuses thBonus 1: (2 Marks per student) If any project

3 Embedded lab at JU

Summer 2011/2012

Bonuses Bonus 1: (2 Marks per student) If any project is submitted before July 8th , a 2 mark bonus

is awarded

Bonus 2: (3 Marks per student) Extend the tic-tac-toe game so there will be 2 modes, the first one as in the description above: two users can play against each other, the second mode: one user can play against the PIC controller. In order to get the full 3 Marks, the PIC controller movement should not be random or periodic you have to use some kind of AI. To begin, you first choose a mode to play using the 1st player selection button for selecting mode 1 (1 player mode) and 2nd player selection button for selecting mode 2(2 players mode)

1st player movement

button

1st player LEDS array

1st player selection

button

2nd

player LEDS array

2nd player selection

button

2nd player movement

button

Tic-Tac-Toe Game Diagram

Page 4: Embedded Systems Lab - JUembedded-ju.ucoz.com/Project/Summer_2012/project_Summer_2012.pdf3 Embedded lab at JU Summer 2011/2012 Bonuses thBonus 1: (2 Marks per student) If any project

4 Embedded lab at JU

Summer 2011/2012

Important Notes Start as early as possible on your project. Although the project sounds simple, it has some

complexity in hardware and software. So do not underestimate the time it needs, you will have many problems along the way which you have to resolve.

Never think of buying a model or commissioning someone to do it for you. Not only you will get a zero in the project, but also your act will be considered as a direct violation to JU laws and your actions shall be reported as cheating in the final exam.

Code sharing between groups is not allowed.

If you acquire a part of your software from a book, website, etc., kindly reference it properly, else it will be considered as plagiarism.

You are free to use any material to build the model and the holding structure of the hardware devices you use. You might use LEGO parts, wood, strengthened cartoon, or even metallic components.

All programming must be done in PIC ASSEMBLY language only; using high-level programming languages in this project will get you a zero.

Your submitted work must be professional:

1. Hardware: you are submitting a product, all electrical and electronic components must be hidden from the user, only user-accessed components are visible. Hide the wiring, be neat. Still, the instructor should be able to easily examine the internal components at the time of discussion when required.

2. Software: your work should be fully documented, all inputs/outputs should be listed, and each subroutine/macro should be fully documented. Use functional comments> Refer to the last section in Experiment 2 regarding documentation.

You should submit two types of flowcharts:

1. An abstract general flowchart of the whole program.

2. A flowchart for each of your written subroutines/macros (flowcharts for the LCD, keypad, and/or those software codes taken from the lab experiments ARE NOT required).

Students are not allowed to move between groups once they are formed. So choose your group carefully from the beginning. We are not responsible if your colleagues in the group chose to drop the class, we will not allow you to join another group.

Divide the work such that each student is responsible for a specific task, YET EVERY student is required to answer for ANY QUESTION in relation to any submitted work of the project.

Page 5: Embedded Systems Lab - JUembedded-ju.ucoz.com/Project/Summer_2012/project_Summer_2012.pdf3 Embedded lab at JU Summer 2011/2012 Bonuses thBonus 1: (2 Marks per student) If any project

5 Embedded lab at JU

Summer 2011/2012

Report Guidelines

You should submit your report as a hard copy. Submission due date is on July 15tha and 16th 2012 Your report should contain: 1. The flowcharts (as described above in the notes

section) 2. Circuit diagram of your hardware (use Multisim

or Proteus to draw the circuit, include the file as well)

3. Any figures or tables which you find useful to

include 4. The contribution of each student in the project

Other Project Proposals

If you have another project idea which you would like to do

instead! You should hand in a proposal (printed) describing in detail the idea of

your project, the hardware components you think you might use, names of

students in this project to your direct engineer ONLY. He/She will notify you of

the proposal acceptance/refusal decision.

Proposal submission deadline is June 24th, 2012, late proposal

submissions will be turned down.

If you submit a project which has not been approved you will get a mark of zero.

Good Luck and Have Fun Building the Project