submitted by: ayush gupta (44/ec/13) bharti (46/ec/13) · port a, port b and port c lower are...
TRANSCRIPT
(Based on microprocessor - 8085)
NETAJI SUBHAS INSTITUTE OF TECHNOGY
UNIVERSITY OF DELHI, DELHI
Submitted By:
AYUSH GUPTA (44/EC/13)
BHARTI (46/EC/13)
Faculty Advisor:
Prof.Dhananjay V. Gadre
ACKNOWLEDGEMENT
We would like to express our immense gratitude, indebtedness and heartfelt gratefulness to our guide, Prof. D.V. Gadre sir for his incomparable and immeasurable guidance throughout the course of this project titled as “Make the pattern”. We would also thank our parents and friends who have constantly supported us throughout the project
INDEX
DESCRIPTION OF PROJECT
INTRODUCTION
HARDWARE IMPLEMENTATION
BLOCK DIAGRAM
COMPONENTS REQUIRED
SCHEMATIC DIAGRAM
BOARD FILE
PICTURES FROM PROJECT
FLOW CHART
TESTING AND DEBUGGING
GANTT CHART REVISITED
CONCLUSION
BIBLIOGRAPHY
DESCRIPTION OF PROJECT
INTRODUCTION
Make the pattern is a game based on the player efficiency to complete
the pattern (square) in given amount of time. This game consist a 3x7
led matrix, three switches (S1, S2 and S3) and a 16x2 lcd. In a matrix of
three columns a set of three glowing leds i.e. first three of first column
and last three of last column will be given to a player initially.
Upon pressing a switch (S2) to start the game, randomly any set of
three leds will glow in the middle column. Player have to use the
switches to move the initial sets of leds to come in parallel with
randomly glowing leds to complete a 3x3 glowing led matrix (square
pattern). Player has to complete this task in a 3 seconds, failing this task
leads him to lose the game. LCD will also display the result at the end of
the game.
HARDWARE IMPLEMENTATION
8085
Microprocessor 8085 is developed by Intel Corporation. It is an 8 bit
microprocessor that uses +5V DC supply for its working. It is a 40 pin
device. A single Integrated Circuit (IC) has all the functional components
of a CPU namely Arithmetic Logic Unit (ALU), Control Unit and registers.
The 8085 microprocessor is an 8-bit processor that includes on its chip
most of the logic circuitry for performing computing tasks and for
communicating with peripherals.
1. Decoding circuit
Decoding circuit is used to enable RAM, EEPROM and 8255(I/O
device).We have used 74HCT138N decoder for the following decoding
circuit.
2. SID /SOD circuit
SID/SOD circuit is used to check the functioning of 8085 hardware.
3. Power circuit
The circuit can be powered with 5 V using micro USB. Ceramic and
electrolytic capacitors are used to remove high and low frequency
noises. To indicate the system is powered ON, a red led is used.
4. LED Matrix
A 3X7 led matrix consists of 21 leds is being used for the game. To
reduce hardware, instead of udn2981 we have used 3 pnp transistors
BC327 as we would have required only 3 out of 8 pins of udn2981 to
drive our matrix. Across each column, one pin is sourcing the current
only for one led at a time ,but a row pin have to sink the currents from
3 leds.8255 cannot able to sink this much of current so we have used
uln2803A.For column multiplexing we have used 470 ohms resistors.
8255
The 8255 is a programmable peripheral interface device designed for use in Intel microcomputer systems. Its function is that of general purpose I/O component to interface peripheral equipment to them microcomputer system bus.
There are three basic modes of operation that can be selected by the system software: Mode 0 – Basic input/output Mode 1 – Strobed Input/output Mode 2 – Bi-directional Bus We have used 8255 in mode 0 in which ports work either in input mode
or in output mode. The modes for Port A and Port B can be separately
defined, while Port C is divided into two portions as required by the
Port A and Port B definitions.
Port A, Port B and Port C lower are programmed in output mode, while
Port C upper is programmed in input mode as it is connected to four
push buttons. Port A is connected to 8 data lines of LCD, Port B and Port
C lower to matrix
LCD
A 16X2 lcd is interfaced with 8255 in 8 bit bus. It is used to display the
name, time and result of the game.
BLOCK DIAGRAM
Power
supply
COMPONENTS REQUIRED Sl. No. COMPONENTS QUANTITY
01 8085 microprocessor 01
02 Led matrix(3X7) 01
03 Led(5mm) 02
04 USB 01
05 Ceramic capacitor 23
06 Polarized capacitor 03
07 Resistor 28
08 Lcd(16X2) 01
09 Preset(10K) 01
10 Push button(10-XX) 08
11 Ic555(NE555N) 03
12 Decoder(74HCT138) 01
13 Connector(M10) 04
14 Latch(74HCT573N) 01
15 RAM(62256P) 01
16 EEPROM(58C256P) 01
17 8255 Interface 01
18 NOT Gate(74HCT04N) 01
19 Driver(ULN2803A) 01
20 PNP transistor(BC327) 03
21 Crystal(4Mhz) 01
SCHEMATIC DIAGRAM
BOARD FILE
PICTURES FROM PROJECT
FLOWCHART
No
Yes
No
No
Yes
Yes
Initialize memory, register and LCD
Check for S2 switch press
Switch
Pressed?
??
Initialize counter for 3 secs
Generate random no [1-5]
[
Glow corresponding leds set
and initial sets of leds
Read S1 and S3 switches for
downward and upward
movement
IS S2
pressed? Counter
=0?
Check pattern Display result on LCD
End
Start
TESTING AND DEBUGGING
1. Components testing-All ICs were tested on an IC tester and leds
on the breadboard. After completing the soldering, each IC was
checked by connecting a multimeter to their power pins. This was
done to ensure the supply of 5 Volts to each IC.
2. SID/SOD testing- a simple program of ‘SID-SOD’ was burnt on the
eeprom to check the working and connection between 8085,
RAM, EEPROM and Address Latch.
3. LCD testing-a program to print “HELLO” was burnt on the eeprom
to ensure the proper working of LCD. The contrast of the LCD was
adjusted with the help of 10k potentiometer.
4. Main code testing-The main code was divided into various parts.
These includes the subroutine of switches, multiplexing, delay of 3
seconds and random no generation. Each subroutine was
debugged individually which really helped us a lot to correct
logical errors. Syntax errors were easily removed as they were
shown in a simulator while assembling the code.
GANTT CHART REVISITED
PROPOSED
ACTUAL
CONCLUSION
On comparing between proposed and actual Gantt chart, making
schematic file and testing were not completed in the allotted time. The
schematic file was modified several times to meet our objective .Testing
part was delayed due to end semester examinations. We completed
our project successfully with some delay but with the best results.
The whole endeavour has been a great and fun learning experience. It
gives us a better understanding to correlate theoretical concepts to real
life implementation using microprocessor. We also experienced the
importance of time management and team spirit. The project gave us a
good knowledge of microprocessor, assembly language programming
and PCB fabrication.
Make the pattern video:
https://www.youtube.com/watch?v=NFDvCxZX6tE&feature=share
code for the project
https://drive.google.com/open?id=0B3MCpvhxCr2sWk45N1FaeEFfOH
M
BIBLIOGRAPHY
Microprocessor Architecture, Programming and Applications with the 8085 by Ramesh Gaonkar.
The 8085 Microprocessor: Architecture, Programming and Interfacing by K.Udaya Kumar, B.S.Umashankar
Quick Start Guide by CEDT, NSIT for EEPROM Programmer.
For datasheet https://drive.google.com/folderview?id=0ByFqcybodzN8LS1PRTliN1lSdUU&usp=sharing
www.sparkfun.com