EC-316 MICROPROCESSOR LAB PROJECT BASED ON INTEL 8085...
Transcript of EC-316 MICROPROCESSOR LAB PROJECT BASED ON INTEL 8085...
EC-316 MICROPROCESSOR LAB PROJECT BASED ON INTEL 8085 “SPELL MASTER”
Netaji Subhas Institute of Technology
This is a report of a working project which utilizes Intel 8085 microprocessor. It is a game designed for
children (age groups: 9-13), in which the player has to choose between four similar looking words and
decide which among the four is correctly spelled. As the player advances in the game the score is
incremented with each correct answer. LCD, LEDs and switches are used for the user interface.
Keywords: 8085, students, spell, school, LCD, LED, switches, project, game, score.
SUBMITTED BY:
NIVEDITA SREEJETH (113/EC/13)
PADMA DOLKER (115/EC/13)
ECE-II
TABLE OF CONTENTS
Contents TABLE OF CONTENTS ..................................................................................................................................... 2
ACKNOWLEDGEMENT ................................................................................................................................... 3
INTRODUCTION ............................................................................................................................................. 4
BLOCK DIAGRAM ........................................................................................................................................... 5
SCHEMATIC ................................................................................................................................................... 6
BOARD LAYOUT ............................................................................................................................................. 7
FLOW CHART: ................................................................................................................................................ 8
GANTT CHART: .............................................................................................................................................. 9
GANTT CHART(REVISED): .............................................................................................................................. 9
GIST OF CODE: ............................................................................................................................................. 10
IN THE MAKING: .......................................................................................................................................... 12
HALF SOLDERED: ......................................................................................................................................... 12
FULLY WORKING BOARD: ............................................................................................................................ 13
BILL OF MATERIALS: .................................................................................................................................... 14
TESTING ....................................................................................................................................................... 15
CONCLUSION ............................................................................................................................................... 16
REFERENCES: ............................................................................................................................................... 17
ACKNOWLEDGEMENT
We would like express our deepest gratitude to Prof. Dhananjay V. Gadre for
providing us with this opportunity to learn and grow. The platform that you have
provided has no doubt helped a lot of people .We appreciate your constant support
and guidance which helped us to stay motivated all along.
We would also like to thank our fellow batch mates, who helped us to debug a lot
of things, especially the CEDT members and our parents also.
INTRODUCTION
There are lots of games related to improving one’s ability to know the correct
spelling especially for school going kids. So we thought why not implement it
using microprocessor 8085.
IMPLEMENTATION:
An LCD will display 4 options of similar looking words, from which only one
option would be the correct spelling. There would be one button corresponding to
each option (total four buttons)from which any one can be selected according to
one’s choice .If the correct option is chosen the LCD would display “CORRECT!”
along with the score and a green LED would also glow. If a wrong option is chosen
Then the LCD will display “INCORRECT” without the score being incremented
and a corresponding red LED will glow. After a particular time, the LCD will be
refreshed with next set of words and the game will continue.
BLOCK DIAGRAM
MICROPROCESSOR
8085
ADDRESS
LATCH
MICROPR
OCESSOR
8085
RAM ROM
DECODER
MICROPR
OCESSOR
8085
8255
LCD
MICROPROCESSOR
8085
LED
ULN
DRIVER
DATA BUS
POWER
SUPPLY
SCHEMATIC
BOARD LAYOUT
FLOW CHART:
START
Display “SPELL MASTER” on the LCD
Wait for 1 second.
Display 4 options on the LCD.
Wait for the button press.
Is the button
pressed?
No
Yes
Debounce
Find out which button was pressed
Correct button pressed?
Increment score
Display “CORRECT” and the score on the LCD Display “INCORRECT” and the score on the LCD
Switch on the correct pattern of LEDs (green for the correct one and red for the wrong ones)
Wait for 1 second.
Switch off all the
LEDs
Is it the end of the
game?
NO
Display “END OF GAME” on the LCD
STOP
YES
GANTT CHART:
GANTT CHART(REVISED):
GIST OF CODE:
DELAY of 1 second
WAIT1SEC: PUSH B
PUSH D
PUSH PSW
MVI D,00AH
SECOND: LXI B,04A68H
LOOP3: DCX B
MOV A,B
ORA C
JNZ LOOP3
DCR D
JNZ SECOND
POP PSW
POP D
POP B
RET
CODE FOR DEBOUNCE
KEYCHECK: IN 07FH
ANI 0F0H
CPI 0F0H
JZ KEYCHECK
CALL DEBOUNCE
KEYPUSH: IN 07FH
ANI 0F0H
CPI 0F0H
JNZ OUTFUNC
JMP KEYCHECK
OUTFUNC: PUSH B
PUSH PSW
CMA
MOV B,A
INX H
MOV A, M
CMP B
JZ DSPCRRT ;jump to the subroutine which diplays correct on the lcd
JNZ DSPINC ;jump to the subroutine which diplays incorrect on the lcd
DEBOUNCE: PUSH B
PUSH PSW
LXI B, 041CH ;5MS
LOOP1: DCX B
MOV A,C
ORA B
JNZ LOOP1
POP PSW
POP B
JMP KEYPUSH
IN THE MAKING:
HALF SOLDERED:
FULLY WORKING BOARD:
BILL OF MATERIALS:
Sno Part Package Quantity 1 8085 DIL 40 1
2 8255 DIL 40 1
3 74573 DIL 20 1
4 74138 DIL 16 1
5 ULN2803 DIL 18 1
6 Ceramic
Capacitor
C-EU25-024X044 10
7 Polarized
Capacitor
CPOL-EUES 1
8 LCD 16X2 1
9 LED 3mm 10
10 7404 DIL 14 1
11 Crystal
(4MHz)
HC49US 1
12 Resistors 0207/7 24
13 RAM (32K) 62256 DIL 28
14 ROM (32K) 58256 DIL 28
15 Switches 10XX 6
16 Connectors M10 4
17 Preset (10k) 10P 1
18 Mini USB USB(POWER) 1
TESTING
After making the schematic, first all the errors were identified using ERC tool in EAGLETM. Then board layout was prepared and errors were constantly checked using DRC tool. The board was tested by first checking all the tracks of the PCB, for any cuts in the tracks, merging of 2 or more tracks, followed by the SID SOD testing of the board. A small code was written to light up an LED at the SOD pin every time a switch at SID pin was pressed. This testing made sure that the basic board is functionally correct. LEDs were tested then using a blinking code. Then switches were tested individually, using the LEDs as the output of the switches. Finally the LCD was tested, following proper initialisation. Following were among the few debugging errors that we came across while making the project:-
Incorrect initialisation of the LCD Garbage values were obtained on the LCD upon initialisation, the error being insufficient amount of time given for the LCD to be ready to accept more data from the microprocessor.
Not giving a delay before writing new data onto the LCD Some of the data was not visible to us and seemed to just have skipped out of the whole code. After adding appropriate delays this error was removed.
Not erasing the previous data before printing the new data onto the LCD LCD has to be cleared before printing new data if the new data does not occupy the space consumed by the earlier data!
Incorrect interpretation of the driver IC ULN2803 has an inverting operation because it is an NPN transistor IC.
Confusion between HEX and DECIMAL while writing the code We had to add 10 to a hex number, and instead we added 16 by incrementing the second place number (leading to a garbage value getting displayed on the LCD).
CONCLUSION
Overall this was a good learning expeience in terms of the depth of the knowledge in hardware, software and the basic understanding of the 8085 microprocessor. The working and functionalities of each component used on the board was acquired. A lot of time and effort was given to minute details in the code during testing and debugging. All in all this was a very good experience which made us understand the importance of the applications of the skills acquired and time management for handling each and every task.
REFERENCES:
Microprocessor Architecture, Programming, and Applications with the 8085
by Ramesh Gaonkar, Fifth edition, Penram International Publishing.
ISBN 81-87972-09-2