1 | Page NETAJI SUBHAS INSTITUTE OF TECHNOLOGY EC- 316 MICROPROCESSORS LAB PROJECT HIT WHEN RED Submitted by: Sanchit Chopra (154/EC/13) [email protected] Vikhyat Chopra (189/EC/13) [email protected]
1 | P a g e
NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
EC- 316 MICROPROCESSORS LAB PROJECT
HIT WHEN RED
Submitted by:
Sanchit Chopra (154/EC/13)
Vikhyat Chopra (189/EC/13)
2 | P a g e
ACKNOWLEDGEMENT
We would like to sincerely thank Prof. Dhananjay V. Gadre for providing us this
opportunity as a part of our EC-316 coursework and for his endless support and
motivation during the entire project development. We would also like to thank
our friends who helped us in the process. We would also like to mention Vinod
Sir, who helped us with the necessary components and tools required for the
project completion.
3 | P a g e
CONTENTS
1. Title Page ……………………………………………………………………………….1
2. Acknowledgement………………………………………………………………....2
3. Synopsis………………………………………………………………………………….4
4. Introduction…………………………………………………………………………….5
5. Project Description………………………………………………………………….6
6. Schematic File…………………………………………………………………………7
7. Board File………………………………………………………………………………..8
8. Hardware Photographs……………………………………………………………9
9. Gist of Code…………………………………………………………………………..11
10. Flowchart…………………………………………………………………………….12
11. Testing…………………………………………………………………………………13
12. Proposed Timeline……………………………………………………………….14
13. Actual Timeline……………………………………………………………………15
14. Tools Used…………………………………………………………………………..16
15. Bill of Materials……………………………………………………………………17
16. Conclusion……………………………………………………………………………18
17. Bibliography…………………………………………………………………………19
4 | P a g e
SYNOPSIS
The circuit has 3 RGB LEDs, a push button and two segment displays to display the
score. Each RGB LED is capable of producing seven different colors. During each
round, colors will be randomly generated in each LED. If any of the LEDs has ONLY
RED color, the player has to press the button within a stipulated time. Doing this
gets you one point, failing to do this ends the game. The speed of the game
increases as the game progresses. The working of the game can be divided into
four cases, namely:
1. ONLY RED color is produced, and button is pressed :
The score is incremented, speed of the game increases and player moves
on to the next round
2. ONLY RED color is produced, and button is not pressed :
The game ends, and the score is displayed
3. ONLY RED color is not produced, and button is pressed :
The game ends, and the score is displayed
4. ONLY RED color is not produced, and button is not pressed :
Player moves on to the next round. Neither the score, nor the speed of the
game increases
5 | P a g e
INTRODUCTION
The project is based upon 8085 Microprocessor, an 8-bit microprocessor. The
8085 Microprocessor has eight registers namely; A, F, B, C, D, E, H and L and can
be used in pairs or individually as per the desired word length. The processor is
connected to external RAM and EEPROM and needs a 5V power supply for
operation.
The game relies on the response time of the player who’s playing the game. The
player needs to process the colors shown on the LEDs, and has to generate an
appropriate button action, all within a stipulated duration of time. The speed of
the game increases as the game progresses, thereby increasing the amount of
effort required.
6 | P a g e
PROJECT DESCRIPTION
The requirement of this project is to connect three RGB LEDs, 1 push-button and
two 7-segments. Connections for the above devices are facilitated by three
output latches. A decoding circuit is also designed to manage proper control of
these devices. Three RGB LEDs are connected to one latch, while both the 7-
segments are connected to one latch each. Another decoder circuit is used to
generate the necessary control signals to access memory and input-output
devices as per the requirement. Entire system is powered with a help of USB
Connector supplied with 5 Volts. These all components including 8085
Microprocessor, 32k EEPROM, 32k RAM and address latch make the building
blocks of our project ‘Hit When Red’.
7 | P a g e
SCHEMATIC FILE
8 | P a g e
BOARD FILE
9 | P a g e
HARDWARE PHOTOGRAPHS
10 | P a g e
11 | P a g e
GIST OF CODE
12 | P a g e
13 | P a g e
TESTING
After the board (hardware) and code (software) were ready, it was time to test it
and get the things working. Modular testing technique was adopted and various
elements were tested sequentially. Firstly each of the individual ICs was checked
by connecting a multimeter to their power pins, and it was ensured that the
power signal reaches them for their proper functioning. This ensured correct
interconnection between the power supply and each of the ICs. After that, a
simple ‘SID-SOD-Test-Code’ was uploaded to test the basic working and
synchronization between 8085, RAM, ROM and Address Latch. After verifying the
system components it was necessary to test the peripherals (7-segments, LEDs).
This was ensured by writing a simple code that lit up all the LEDs and displayed
data on all the 7-segments. The LEDs and the seven segments gave the required
output, but we observed that the intensity of one seven segment was very low.
We found out that the latch corresponding to this seven segment was not
working properly, and so we replaced it. Following this, the intensity of the seven
segment grew normal.
To integrate the software and the hardware, we burnt the assembly language
code into the ROM and tested it with our board. The code did not yield the
required output at first. What followed was comprehensive debugging, wherein
we tried resolving one problem at a time. We started with color generation and
concluded with the scoring mechanism. The color generation table had a mistake
due to which the game ended when one of the LEDs displayed purple color. To fix
this, we checked the color generation table for each possible case, and fixed the
error.
14 | P a g e
PROPOSED TIMELINE
Beginning Date End Date Duration Task
16th January 29th February 45 days Studying the concepts important for making the project
Creating a schematic and checking it for errors
Correcting errors in the schematic and moving to subsequent drafts
Finalize schematic and generate board file for the same
1st March 20th March 20 days Sending the board file for fabrication and receiving the fabricated PCBs
5th March 15th April 40 days Devising the required logic
Writing down a first draft of the code
Debugging and creating subsequent drafts
Eventually have a code that is ready to test on the board
20th April 10th May 20 days Soldering components on the board
Testing for the proper functioning of SID-SOD operations
Testing the code on the board
Debugging
15 | P a g e
ACTUAL TIMELINE
Beginning Date End Date Duration Task
16th January 10th March 55 days Studying the concepts important for making the project
Creating a schematic and checking it for errors
Correcting errors in the schematic and moving to subsequent drafts
Finalize schematic and generate board file for the same
20th March 5th April 15 days Sending the board file for fabrication and receiving the fabricated PCBs
25th March 20th April 25 days Devising the required logic
Writing down a first draft of the code
Debugging and creating subsequent drafts
Eventually have a code that is ready to test on the board
23rd April 2nd May 10 days Soldering components on the board
Testing for the proper functioning of SID-SOD operations
Testing the code on the board
Debugging
16 | P a g e
TOOLS USED
The various Tools (Software and Hardware) required during the course of project
development are as below:
SOFTWARE TOOLS:
(i) EAGLE 7.3.0 for schematic and board layout
(ii) 8085 Simulator IDE by OshonSoft
(iii) EEPROM Programmer.jar
HARDWARE TOOLS:
(i) EEPROM Programmer Board (equipped with Shift Registers and Arduino
Nano)
(ii) Soldering Iron
(iii) Solder
(iv) Multimeter
(v) +5V DC Power Supply
(vi) Cutter, Tweezer, Hand Files
17 | P a g e
BILL OF MATERIALS
NAME DEVICE PACKAGE QUANTITY Microprocessor 8085 DIL40 1
RAM (32K) 62256P DIL-28 1
EEPROM (32K) 28C256 DIL-28 1
Crystal (4MHz) CRYSTALHC49US HC49US 1 Latches 74HCT573N DIL-20 4
Decoders (3x8) 74HCT138N DIL-16 2 2-input NOR gate 74HC02N DIL-14 2
Resistors R-US_0204/7 0204/7 41
Capacitors C-EU025-025X050 C025-025X050 16 Capacitors CPOL-EUE2.5-7 E2-5-7 4
Push Buttons Omron 10-XX B3F-10XX 2 LEDs LED-5mm LED-5mm 2
RGB LEDs RGBLED_CA-5MM LED5MMRGB 3 Seven Segments HD-H101 HDSP-M 2
USB Connector USB (POWER) USB (POWER) 1
Header Pins (Male) M20 20P 2 Header Pins (Female) - - 4
18 | P a g e
CONCLUSION
Overall the project was an enjoyable learning experience. It helped us develop a
deep understanding of the 8085 microprocessor and introduced us to various
aspects of PCB development. We also learned how hardware and software can
join hands and work together to make something worthy. We enjoyed and
learned a lot during the project development and recognized the importance of
Time Management and Team-work for completing important tasks. Overall we
are satisfied with the end result of our project and appreciate all the learning we
received in the process.
19 | P a g e
BIBLIOGRAPHY
Ramesh Gaonkar. Microprocessor Architecture, Programming, and
Applications with the 8085, Sixth Edition. Penram International Publishing,
2013. ISBN-978-81-87972-88-4
Linear Feedback Shift Register (LFSR)- https://en.wikipedia.org/wiki/Linear-
feedback_shift_register
Pseudo Instructions- https://www.scribd.com/doc/79734566/8085-Main-
Assembler-Directives