LED BASED SNAKE GAME

Similar documents
EE Chip list. Page 1

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

Department of Electrical and Computer Engineering Mid-Term Examination Winter 2012

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

Final Project [Tic-Tac-Toe]

SIGNETICS INTEGRATED CIRCUITS Low Power Schottky TTL 54LS00-74LS00 Series. Supply Current/typmA Delay/typns Quad 2-Input NAND Gate 54LS00/C,D

List of the CMOS 4000 series Dual tri-input NOR Gate and Inverter Quad 2-input NOR gate Dual 4-input NOR gate

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

1 Hour Sample Test Papers: Sample Test Paper 1. Roll No.

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science

Chapter 9 MSI Logic Circuits

CPSC 121: Models of Computation Lab #5: Flip-Flops and Frequency Division

Assignment 2b. ASSIGNMENT 2b. due at the start of class, Wednesday Sept 25.

North Shore Community College

Catch or Die! Julia A. and Andrew C. ECE 150 Cooper Union Spring 2010

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

CPSC 121: Models of Computation Lab #5: Flip-Flops and Frequency Division

MODULE 3. Combinational & Sequential logic

Tribhuvan University Institute of Science and Technology Bachelor of Science in Computer Science and Information Technology

LAB #6 State Machine, Decoder, Buffer/Driver and Seven Segment Display

Laboratory 8. Digital Circuits - Counter and LED Display

Combinational Logic Design

Step 1 - shaft decoder to generate clockwise/anticlockwise signals

55:131 Introduction to VLSI Design Project #1 -- Fall 2009 Counter built from NAND gates, timing Due Date: Friday October 9, 2009.

FUNCTIONS OF COMBINATIONAL LOGIC

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

Chapter 2. Digital Circuits

Part IA Computer Science Tripos. Hardware Practical Classes

Lab #12: 4-Bit Arithmetic Logic Unit (ALU)

Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: 2. Description of the Circuit:

Spring 2011 Microprocessors B Course Project (30% of your course Grade)

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

16 Stage Bi-Directional LED Sequencer

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

University of Victoria. Department of Electrical and Computer Engineering. CENG 290 Digital Design I Lab Manual

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

Copyright 2011 by Enoch Hwang, Ph.D. and Global Specialties. All rights reserved. Printed in Taiwan.

Integrated Circuits 7

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore)

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

University of Illinois at Urbana-Champaign

TIME SCHEDULE. MODULE TOPICS PERIODS 1 Number system & Boolean algebra 17 Test I 1 2 Logic families &Combinational logic

Analogue Versus Digital [5 M]

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

1. Convert the decimal number to binary, octal, and hexadecimal.

Computer Systems Architecture

DIGITAL FUNDAMENTALS

IS1500 (not part of IS1200) Logic Design Lab (LD-Lab)

Final Exam review: chapter 4 and 5. Supplement 3 and 4

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

NORTHWESTERN UNIVERSITY TECHNOLOGICAL INSTITUTE

EECS 270 Final Exam Spring 2012

Part IA Computer Science Tripos. Hardware Practical Classes

Physics 323. Experiment # 10 - Digital Circuits

Digital Logic. ECE 206, Fall 2001: Lab 1. Learning Objectives. The Logic Simulator

Electromania Problem statement discussion

VU Mobile Powered by S NO Group

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

Find the equivalent decimal value for the given value Other number system to decimal ( Sample)

1. Synopsis: 2. Description of the Circuit:

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Combinational vs Sequential

Microprocessor Design

Engineering College. Electrical Engineering Department. Digital Electronics Lab

ELEN Electronique numérique

Experiment 8 Introduction to Latches and Flip-Flops and registers

LED Array Tutorial. This guide explains how to set up and operate the LED arrays that can be used for your. Internal Structure of LED Array

Chapter 7 Memory and Programmable Logic

Experiment # 4 Counters and Logic Analyzer

IT T35 Digital system desigm y - ii /s - iii

Texas Instruments OMAP1510CGZG2 Dual-Core Processor Partial Circuit Analysis

[2 credit course- 3 hours per week]

ENGG2410: Digital Design Lab 5: Modular Designs and Hierarchy Using VHDL

Serial In/Serial Left/Serial Out Operation

Integration of Virtual Instrumentation into a Compressed Electricity and Electronic Curriculum

BCN1043. By Dr. Mritha Ramalingam. Faculty of Computer Systems & Software Engineering

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS)

Nan Ya NT5DS32M8AT-7K 256M DDR SDRAM

0 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 1 1 Stop bits. 11-bit Serial Data format

To design a sequential logic circuit using D-Flip-flop. To implement the designed circuit.

EXPERIMENT: 1. Graphic Symbol: OR: The output of OR gate is true when one of the inputs A and B or both the inputs are true.

Adding Analog and Mixed Signal Concerns to a Digital VLSI Course

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

MUX AND FLIPFLOPS/LATCHES

University of Pennsylvania Department of Electrical and Systems Engineering. Digital Design Laboratory. Lab8 Calculator

VeriLab. An introductory lab for using Verilog in digital design (first draft) VeriLab

Digital Circuits I and II Nov. 17, 1999

Logic Design. Flip Flops, Registers and Counters

12-bit Wallace Tree Multiplier CMPEN 411 Final Report Matthew Poremba 5/1/2009

Digital Fundamentals. Lab 5 Latches & Flip-Flops CETT Name: Date:

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS

FPGA Design. Part I - Hardware Components. Thomas Lenzi

EECS 270 Midterm 2 Exam Closed book portion Fall 2014

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

Contents Circuits... 1

AIM: To study and verify the truth table of logic gates

A Combined Combinational-Sequential System

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous)

DIGITAL ELECTRONICS MCQs

Transcription:

LED BASED SNAKE GAME Group 14 1 NAME ROLL NO MAJOR Muhammad Shoaib Hassan 14100005 Electrical Engineering Syed Muhammad Ali 14100167 Electrical Engineering Muhammad Ali Gulzar 14100017 Computer Science Hassan Shabbir 14100026 Electrical Engineering PROJECT INTRODUCTION AND OBJECTIVES Led based snake game is primarily a hardware implementation of the classic NOKIA snake game on the Led Matrix. The execution and implementation of the game employs diverse skills learned at the class from the very first day and covers a wide spectrum of topics. The project appreciates the way in which different topics and techniques learnt in this course are put to practice, simultaneously, to perform a specific task. This project capitalizes on the fundamental concepts of combinational logic and incorporates other pertinent techniques such as, data storage, counter and clock. By the end of this project, we had successfully implemented the entire game along with pattern generation, food generation and scoring system. PROJECT HIERARCHY SNAKE GAME Snake's Movement Snake's Body Snake's Speed Regeneration LED Patterns Food Generation User Interface Fixed Initital Length Variable Speed Re-Entry From the Opposite Side At the Start of the Game Movement of food at the walls of the LED Scoring System Turn Left/Right Smooth Increment At the End of the game Score Automatically restarts at 30 pts Turn Up/Down Legal Moves Smooth Turning

Group 14 2 PROJECT SPECIFICATIONS 74LS08 74LS37 74LS28 555 74HCT374 7404 74LS85 74151 LED Matrix Resistors Switches Voltage Source Capacitor Tri State Buffer Decoders 74194 2732 74193 7447 AND Gates NAND Gates NOR Gates /Oscillator 8-Bit Edge D-Flip Flops Inverter Bit Magnitude Comparartor 1 to 8 Data Selectors/Multiplexers Common anode Food Controls +5V DC Supply Variable speed Octal Bus Transceivers 3-to-8 line decoder, and 2-to-4 line decoder Bi-Directional Shift Register EPROM 4-Bit Binary Counter BCD to Seven Segment Equipment Name IC Number No. Used LED Matrix 8x8 Bi-Colour 6 7-Segment Display Common Anode 2 EPROM's 2732 2 Quad Mux's 74157 14 1 to 8 Multiplexer 74151 8 Octal Bus Transceivers 74245 8 Bi-Direction Shift register 74194 8 4-Bit Comparators 7485 8 4-Binary Counter 74193 4 BCD to Seven Segment 7447 2 /Oscillators 555 2 8-Bit Edge D-Flip Flops 74374 2 3-8 Line Decoder 74138 2 2-4 Line Decoder 74HC139 1 AND 7408 12 NOT 7404 24 XOR 7432 8 Resistors 100/220/7000 Ω 40 Capacitors 10/5/20 µf 5

PROJECT DELIVERABLES (WHICH WERE ACCOMPLISHED) Group 14 3 By the end of this project, we had successfully implemented these features: 1. Movement of the snake on the LED Matrix. 2. Increment in its position with the help of a user control system only in the legal directions. 3. Variable speed of the movement of the snake as a functional feature. 4. Keeping track of the snake and regeneration of the snake once it leaves from the one side of matrix. 5. Led pattern generation at the start and end of game as an additional feature using multiplexing with the help of which the SNAKE letters were generated. MODULE COMPOSITION SNAKE GAME User Interface Snake's Length Snake's Speed Regeneration LED Pattren Food Snake Turning Smooth Turning Fixed Length Smooth Increment Variable Speed Counter LED Matrix At walls SR Latches Tristate Buffer n to 1 Mux D Flip Flops n to 1 Mux D Flip Flops Capacitor D Flip Flop n to 1 Mux Tri State bufer D- Latches ROM Counters 7-Seg Display WEEKLY BREAKDOWN WEEK 1: During the first week, we exercised our knowledge to go about this problem on the proteus software. We tackled the problems faced during the simulation process and tried to find their solution. Moreover, we learnt how to use a led matrix because it was a fundamental component of our project. WEEK 2: After having a fair idea about the proceedings, we had a go at the hardware implementation of our simulated circuit. Our main focus was to have a firm control over the functioning of counters, clocks, latches and flip flops. We strived to use these components with the led matrix such that we could build foundation for the later events. WEEK 3: Having our structure ready in the previous week, we went a step ahead in this week by implementing the incremental motion of the snake. Once this function was implemented, we finalized the length of the snake and will work on its movements on the led matrix. The functionality of the variable speed with which a snake moves on a led matrix also got implemented by the end of this week.

Group 14 4 WEEK 4: During this week, the additional features such as led pattern generation at the start and the end of the game were considered. We figured out a way to crack it through multiplexing and by using the effective ROM writing technique learnt in the lab, we accomplished this task. WEEK 5: Utilizing this time we winded up the project by giving it finishing touch. But we went a step ahead in the final week to implement, if time permits suggestion which we proposed according to which the snake eats the food and there is a proper scoring system to recognize this action. We successfully implemented and demonstrated all the deliverables along with bonus part on the day of demonstration. Week 1 Proteous Simlutaion Debugging Undetrstanding of LED Matrix Week 2 Hardware Implementaion Use of Flips Flops, Counters, Clocks and Latches Synicrnoization between LED Matrix and other componants. Week 3 Implementation of incremental motions of snake Length of the snake Variable speed Week 4 Additional feature like LED Pattrens at the start and end using multiplexing. Smooth movement by avoiding abrupt turns Week 5 Food generation. Scoring system of the food. Neatness of the project. TECHNICAL ISSUES FACED Firstly, the most disturbing issue faced by our group was that we had extensively large circuit and it was breathtaking to debug it if the desired result was not obtained during the testing phase. We cracked this problem with the help of colour coding and using labelled wires. Most importantly, we had a working Proteus simulation in front of us, so wherever lost, we grasped help from that. Secondly, the design of the controller was not an easy task. The design was intriguing since there were five controlling variables and we had to cut that down to two variables. Along with that we had to take care of the legality of the moves from the user side. This task employed some critical thinking and in the end our group was able to overcome the problem by using a 2-to-4 line decoder, couple of OR gates and couple of SR latches. Thirdly, when we tried to implement the time permits module, we were not sure how to add food generation logic in the circuit and the execution of this step was pertinent problem because our circuit had little space for anything else. We dominated this issue by using a separate logic to implement this task, i.e. rotation with the help of Shift registers through which were successfully able to generate food. Finally, we added a counter and testing unit to detect the food eating condition of the snake to accomplish the implementation of our scoring problem. Fourthly, we had to incorporate multiplexing in our project to generate the LED patterns. We learnt the ROM writing and using technique taught in the lab with a little help from the supervisor, we were able to overcome this hurdle.

Group 14 5 PROTEUS SCREENSHOTS Figure 1: Schematic for snake game circuit Figure 2: Schematic for multiplexing circuit

Group 14 6 TRUTH TABLES FOR CONTROLLER S OPERATIONS Controller using 2-to-4 line decoder Input Output Lines Lines I 2 I 1 Switch A Switch B 0 0 1 0 Vertically Upwards 0 1 1 1 Move to the left (horizontally) 1 0 0 1 Move to the right (horizontally) 1 1 0 0 Vertically Downwards SR latch for column operations Input Output Lines Lines I 2 I 1 R S 0 0 0 0 0 1 0 1 1 0 1 0 1 1 0 0 SR latch for row operations Input Output Lines Lines I 2 I 1 R S 0 0 0 1 0 1 0 0 1 0 0 0 1 1 1 0