Sei sulla pagina 1di 55

SIX MONTH INDUSTRIAL TRAINING REPORT

ON

EMBEDEED SYSTEM AND


MICROCONTROLLER
COMPLETED AT

HCL CDC HISAR


SUBMITTED TOWARDS PARTIAL FULFILMENT OF THE REQUIREMENT FOR
THE AWARD OF THE DEGREE OF

BACHELOR OF TECHNOLOGY

(Electronics and Communication Engineering)


SUBMITTED BY

NISHA RANI

Class Roll No : 475/ECE/09

University Roll No : 4942640


SUBMITTED TO

Department of Electronics and Communication Engineering

VAISH COLLEGE OF ENGINEERING, ROHTAK

(Affiliated to Maharshi Dayanand University, Rohtak)

June,2013
CONTENTS
Page No

Certificate i
Acknowledgement ii
Abstract iii - iv
List of Figures v
List of Tables vi
List of Abbreviations vii - ix
Chapter 1 : INTRODUCTION ABOUT THE COMPANY 1-4
1.1 Company Profile 1
1.1.1 Promoters 1
1.1.2 Products 2
1.1.3 R&D 2
1.1.4 After Sales Service 2
1.2 Training 2
1.2.1 Faculty Profile 2
1.3 Course Offered 3
1.3.1 Education Programs 3-4
Chapter 2 : INTRODUCTION ABOUT TRAINING WORK 5-9
2.1 Embedded System 5
2.1.1 Introduction 5
2.1.2 Characteristics of Embedded Products 6
2.1.3 Embedded Products in Today Industry 6
2.2 Microprocessor Unit (MPU) 7
2.3 Microcontroller Unit (MCU) 7
2.4 Comparison between Microprocessor and Microcontroller 7-9

Chapter 3 : TRAINING WORK 10 - 33

3.1 Microcontroller 10

3.1.1 Introduction 10

3.1.2 Definition of Microcontroller 10

3.1.3 Features of Microcontroller 10


3.2 Block Diagram of Microcontroller 8051 11

3.3 Pin Configuration of Microcontroller 11

3.3.1 Brief Description 13

3.4 Reset Circuit 16

3.5 Registers 16

3.6 Project Work 19

3.6.1 Introduction 19

3.6.2 Features of IC Tester 19

3.6.3 Technical Specification 19

3.7 Circuit Diagram of IC Tester 20

3.7.1 Component Description 20

3.7.2 ICs Tested by IC Tester 28

3.7.3 Description of ICs 30 - 33

Chapter 4 : EVALUTION OF TRAINING 34 - 38

4.1 LCD Interfacing 34

4.1.1 Pin Configuration 34

4.1.2 Display Data RAM 34

4.1.3 Busy Flag 34

4.1.4 Instructions Register & Data Register 35

4.1.5 Interfacing LCD to 8051 35

4.1.6 Commands and Instructions Set 35

4.1.7 Sending Command to LCD 35

4.2 Segment Display 37

4.2.1 Introduction 37

4.2.2 Creating Digit Pattern 38

4.2.3 Multi 7 Segment Interfacing 38


Chapter 5 : CONCLUSION AND RECOMMENDATIONS 39 - 41

5.1 Conclusion 39

5.2 Application 39

5.3 Benefits 39

5.4 Experimental Observation 39

5.5. Future Scope of Work 41

REFERENCES
i

CERTIFICATE

It is to certify that NISHA RANI (475/ECE/09) student of Electronics and


Communication Engineering Department, Vaish College of Engineering, Rohtak has
completed the Industrial / Institutional Training at “HCL Carrier Development Centre,
Hisar for partial fulfillment of the requirement for the award of Bachelors of Technology
(Electronics and Communication Engineering) Degree of MDU, Rohtak. This is a record
of student’s own study carried under my supervision & guidance.

This report has been submitted for the award of B, Tech Degree.

Signature of the Supervisor


ii

ACKNOWLEDGEMENT

Success is a sweet fruit, which everyone strives to taste. To achieve this goal, one has to
put in a lot of physical and mental efforts. While writing this report, I gain a stronger
appreciation for the following fact: I couldn’t do it without the help of many talented and
dedicated people. So I wish to express my appreciation to those whose help has been
most valuable.

Firstly, I would like to express my gratitude and appreciation to Mr. ANIL PUNIA
(Director, HCL CDC HISAR) who explained me everything about the training process
at the company and made me familiar with the company staff. I am equally grateful to
Mr. VINAY KHATOR who guided me in completing this training and project work
successfully and was always there to help me in sorting out the problems during the
training.

Finally, I would like to say thanks to all the staff of the company and the faculty of my
esteemed institute for their kind co-operation.

Signature with date


NISHA RANI
iii

ABSTRACT
MY EXPERIENCES:
With the completion of this training, I am now aware of the Microcontroller 8051. I have
worked for four complete months in the Embedded systems. I have worked almost as an
engineer to the extent of my technical capabilities. Doing all these, I have acquired a lot
of knowledge about the working of Microcontroller with Embedded C Programming and
its Software (Keil and Flash Magic).
I was the part of one of the most happening and demanding field of electronics i.e. 8051
Microcontroller started and spending four months into it really proved very useful to me
and I have gained a lot out of it :
1 I got the knowledge of uC 8051 (Harward Architecture & Cisc type).
2 I worked practically on the software Keil u vision, Flash Magic, Proteus.
3 I worked practically which helped me in being more familiar to the interfacing of
different display devices which I am supposed to do in the long run.
4 I learned basic concepts of electronics which helped me to understand more.
5 Training helped me increasing my working skills and the knowledge in this field
and also showed me the atmosphere that we have to join after completion of the
degree program.
Finally, the main advantage of this training was that it has now enabled me to explore
myself in the giant Robotic industry. This training report is all about the embedded
systems and its application in various fields of real world. We are living in the
Embedded World. We are surrounded with many embedded products and our daily life
largely depends on the proper functioning of these gadgets. Television, Radio, CD
player, Washing Machine or Microwave Oven in our kitchen, Card readers, Access
Controllers, Palm devices of our work space enable us to do many of our tasks very
effectively. Apart from all these, many controllers embedded in our car take care of car
operations between the bumpers. All kinds of magazines and journals regularly dish out
details about latest technologies, new devices; fast applications which make us believe
that our basic survival is controlled by these embedded products. Now we can agree to
the fact that these embedded products have successfully invaded into our world. What is
iv

this Embedded System? Theoretically, an embedded controller is a combination of piece


of microprocessor based hardware and the suitable software to undertake a specific task.
v
LIST OF FIGURES

Fig 2.1 Hardware of Embedded System


Fig 2.2 Block Diagram of Microprocessor
Fig 2.3 Block Diagram of Microcontroller
Fig 3.1 Microcontroller 8051
Fig 3.2 Block Diagram of Microcontroller 8051
Fig 3.3 Pin Configuration of Microcontroller
Fig 3.4 Reset Circuit of Microcontroller
Fig 3.5 Circuit Diagram of IC Tester
Fig 3.6 Resistor
Fig 3.7 Capacitor
Fig 3.8 Crystal Oscillator
Fig 3.9 Liquid Crystal Display
Fig 3.10 Diode
Fig 3.11 Light Emitting Diode
Fig 3.12 ZIF Socket
Fig 3.13 Power Supply Circuit
Fig 3.14 Transformer
Fig 3.15 7408 IC
Fig 3.16 7432 IC
Fig 3.17 7404 IC
Fig 3.18 7400 IC
Fig 3.19 7402 IC
Fig 3.20 7486 IC
Fig 3.21 74266 IC
Fig 4.1 Pin Configuration of LCD
Fig 4.2 Interfacing of LCD to 8051
Fig 4.3 Segment Display
Fig 4.4 (a) Common Anode
Fig 4.4 (b) Common Cathode
Fig 4.5 Multi 7 Segment Interfacing
vi

LIST OF TABLES

Table 3.1 Alternate Uses of Port-3 Pins


Table 3.2 Family Members of 8051
Table 3.3 Program Status Word
Table 3.4 Color Coding of Resistor
Table 4.1 Hex Code for Displaying Various Digits
vii

LIST OF ABBREVIATIONS

Ω : Ohm
% : Percentage
AC : Auxiliary Carry
ADC : Analog Digital Converter
ALE : Address Latch Enable
ALU : Arithmetic and Logical Unit
ATMS : Automatic Tiller Machines
BF : Busy Flag
BJT : Bipolar Junction Transistor
CISC : Complex Instruction Set Computer
CLR : Clear
CPU : Central Processing Unit
CRT : Cathode Ray Tube
CY : Carry
DDRAM : Display Data RAM
DIP : Dual Input Package
DIV : Division
DPTR : Data Pointer
DR : Date Register
DSP : Digital Signal Processing
E, EN : Enable
EA : Enable Address
ECG : Electrocardiogram
EEPROM : Electrical Erasable Programming ROM
EPROM : Erasable Programming ROM
EX-OR : Exclusive OR
EX – NOR : Exclusive NOR
FIR : Finite Impulse Response
GaAs : Gallium Arsined
GaAsP : Gallium Arsined Phosphate
viii
GaP : Gallium Phosphate
GND : Ground
HEX : Hexa decimal
Hz : Hartz
I/O : Input
IC : Integrated Circuit
IIR : Infinite Impulse Response
INT0 : Interrupt 0
INT1 : Interrupt 1
IR : Instruction Register
LCD : Liquid Crystal Display
LED : Light Emitting Diode
mA : Milli Ampere
MOS : Metal Oxide Semiconductor
MRI : Magnetic Resonance Imaging
MSB : Most Significant Bit
MUL : Multiplication
NRZ : Non Return to Zero
NOP : No Operation
O/P : Output
OV : Overflow
PIC : Peripheral Interface Controller
PSEN : Program Store Enable
R/W : Read and Write
RAM : Random Access Memory
RD : Read
RISC : Reduce Instruction Set Computer
ROM : Read Only Memory
RS : Register Set
RST : Reset
RXD : Receiving Data
Seg : Segment
SETB : Set Bit
ix
SFR : Special Function Register
SP : Stack Pointer
T0 : Timer 0
T1 : Timer 1
TCON : Timer Control
TMOD : Timer Mode
TTL : Transistor Transistor Logic
TXD : Transmitting Data
uC : Microcontroller
uP : Microprocessor
UART : Universal Asynchronous Receiver Transmitter
V : Volt
VCC : Voltage
VCR : Visual Control Room
VEE : Power Supply
VLSI : Very Large Scale Integration
WR : Write
Chapter 1: INTRODUCTION ABOUT THE COMPANY
1.1 COMPANY PROFILE:
Neo Technology established in the year 2009 is an embedded design house. It provides
out-of-the-box solution from concept to reality. It is registered with Small Scale
Industries with Chandigarh Administration.
Neo Technology consists a group of talented and experienced business professionals who
are dedicated to maintaining a standard of excellence, while providing personalized
services and the highest quality of Products at the lowest price as possible as in the
market place.
The well – versed executives, engineers are all trained in this field for years together and
successfully developed latest technologies as well as gained managing capabilities. The
Company has built a resource base of high innovate professionals and state-of-art
Manufacturing in a very short time.
Neo Technology has been identified as a reputed and innovative manufacturer of
Electronics Hardware & Software. Today the company has grown progressively with a
composite infrastructure base and a strong liquidity. It looks forward to serve the varied
Industrial & Consumer Customers by providing state-of-the-art equipments, Services &
Solutions.
The Company undertakes various turnkey projects related to industrial automation,
domestic applications and higher end biomedical applications. It deals in Four
Technological Domains
 VLSI (Very Large Scale Integration)
 PLC’s & SACADA
 Micro-controllers
 Digital Signal Processing
 Embedded Wireless

1.1.1 PROMOTERS

Mr. Sitendar Kumar (Phd. in ECE), the architect of the Neo Technology is a self made
man and a man of vision. His foresight & 16 years experience of maintaining high
quality standards, has shown success and company flourished rapidly. With a
background in Electronics Engineering, he bring his intellectual skills in the field of
management, marketing & business development and play a vital role in the company’s
success graph.

1.1.2 PRODUCTS

The Company develops protoboards in the respective domains, which are used in
educational institutes. These protoboards are so designed that a student working on it
develops a complete knowledge from firmware development to interfacing to various
active and passive components.
They are authorized channel partners and sole distributor of various world-class real-time
software in the respective domains. They are the most powerful vendors in the northern
sector of India, as they provide prompt and complete prior and after sales service to the
customers purchasing software and hardware from them.
1.1.3 R & D

Neo Technology has state-of-the-art computerized design facilities and a team of design
engineers to develop any equipment as per the customer’s need. All arrangements are
made right from start to end of project i.e. designing, manufacturing, installation etc.

1.1.4 AFTER SALES SERVICE

Company has a team of professional service engineers equipped with latest


communication system for an effective after sales service. Periodical checks are also
carried out as preventive maintenance.

1.2 TRAINING

In educational programs, training is imparted in all the four domains. Training is such
that it equips a student to use the practical knowledge gained here, fully in the field.
They also undertake training for corporate in all the respective domains.

1.2.1 FACULTY PROFILE


The personnel undertaking the training are actual design and application engineers
interacting and handling the technology with a close and deep insight. They bear huge
experience in terms of practical experience in developing applications using these
technologies. Their learning programs in Corporate Unique Elements help trainees to
develop into a complete & confident professional, driven by experienced and highly
motivated faculty. They provide Corporate as well as Industrial Training
1.3 COURSES OFFERED

 Microcontroller Based Design


 PLC’s
 Digital Signal Processing
 VLSI Design
 Embedded Wireless

Their schedules for educational programs are

1.3.1 EDUCATION PROGRAMS


 Industrial Training Programs Six weeks & Six months in
 Embedded System Design
 Digital Signal Processing
 Micro Controller Design
 PLC manufacturing & Design
EMBEDDED SYSTEM DESIGN:
 Introduction
 Architecture
 Theory Of Embedded System Design
 Implementation Strategies
 Microprocessor Based
 PC Based
 Microcontroller Based
 DSP Controller Based
DIGITAL SIGNAL PROCESSING:
 Fourier Transform Algorithms
 Discrete Fourier Transform
 Fast Fourier Transform
 Digital Filtering
 IIR Filtering Technique
 Architecture And Implementation of FIR
 Various Windows (LAISER, HAMMING, HANNING, BARTLETT)
 Multi Rate Filtering Techniques
 Implementation On Hardware DSP Boards
 TEXAS Instrument TMS320C6711
Analog Devices ADSP2181
MICRO CONTROLLER BASED DESIGN:
 Assembly Language and Instruction Set
 Microcontroller Based Designs
 Inter-Facing with Devices
 Tools - KEIL, FLASH MAGIC Microcontroller Evaluation Board
CHAPTER 2:INTRODUCTION ABOUT TRAINING WORK

Microcontroller are widely used in Embedded System products. An Embedded product


uses the microprocessor (or microcontroller) to do one task & one task only. A printer is
an example of Embedded system since the processor inside it perform one task only
namely getting the data and printing it. A PC can be used for any no. of applications such
as word processor, print server, bank teller terminal, video game player, network server
or internet terminal. Software for variety of applications can be loaded and run. Of
course the reason a PC can perform multiple task is that it has RAM memory and an
operating system that loads the application software into RAM & lets the CPU run it. In
an Embedded system there is only one application software that is typically burn into
ROM.
Although microcontroller are preferred choice for many Embedded systems, There are
times that a microcontroller is inadequate for the task. For this reason in recent years
many manufactures of general purpose microprocessors such as INTEL, Motorolla,
AMD & Cyrix have targeted their microprocessors for the high end of Embedded
market.
One of the most critical needs of the embedded system is to decrease power
consumptions and space. This can be achieved by integrating more functions into the
CPU chips. All the embedded processors based on the x86 and 680x0 have low power
consumptions in additions to some forms of I/O, Com port & ROM all on a single chip.
In higher performance Embedded system the trend is to integrate more & more function
on the CPU chip & let the designer decide which feature he/she wants to use.

2.1 EMBEDDED SYSTEM:

2.1.1 Introduction:

Embedded Systems are inseparable part of our life. Whether we are at home or office or
on the move, we are always surrounded by embedded systems. Starting from home
appliances like TV, washing machine and systems like printer and elevator in workplace
to the automobiles and automatic traffic control system are all examples of embedded
systems. All kinds of magazines and journals regularly dish out details about latest
technologies, new devices; fast applications which make us believe that our basic
survival is controlled by these embedded products. Embedded system is a combination of
Hardware and Software Design to meet a specific need with performance in given time
frame. Component in an embedded system are as: Hardware, Input & Output and Software as
shown in figure 2.1.

2.1.2 Characteristics of embedded products:


1. They perform a single set of functions.
2. Works in a time constrained environment.
3. Provide high performance and reliability.
4. Mostly Embedded systems have low cost because they are mass produced in
millions.
2.1.3 Embedded products in Today’s industry:
1. Telecom
 Mobile phone systems, modems, routers.
2. Automotive applications
 Braking systems, traction systems, airbag release systems, engine-
management units, steer-by-wire systems, cruise control applications
3. Domestic appliances
 Dishwashers, televisions, washing machines microwave ovens, Video
recorders, security systems, garage door controllers, calculators, digital
watches, VCRs, Digital cameras, Remote controls, Treadmills.
4. Robotic
 Fire fighting robots, Automatic floor cleaner, robotic arm etc.
5. Aerospace applications
 Flight control systems, engine controllers, autopilots, passenger in-flight
entertainment systems.
6. Medical equipment
 An aesthesia monitoring systems, ECG monitors, Pacemakers, Drug
delivery systems, MRI scanners
7. Defense systems
 Radar systems, fighter aircraft flight control systems, radio systems,
missile guidance systems
8. Office automation
 Laser printers, fax machines, pagers, cash registers, gas pumps,
credit/debit card readers, thermostats, grain analyzers
9. Automated tiller machines (ATMS).
10. Engine controllers and antilock brake controllers for automobiles
The core of any embedded system is formed by one or several microprocessor or micro
controller programmed to perform a small number of tasks. In contrast to a general
purpose computer, which can run any software application, the user chooses, the
software on an embedded system is semi-permanent, so it is often called firmware.

2.2 MICROPROCESSOR UNIT (MPU) :


A microprocessor is a general-purpose digital computer central processing unit (CPU).
Although popularly known as a “computer on a chip” is in no sense a complete digital
computer. The block diagram of a microprocessor CPU contains an arithmetic and
logical unit (ALU), a program counter (PC), a stack pointer (SP), some working
registers, a clock timing circuit, and interrupt circuits as shown in figure 2.2.

2.3 MICROCONTROLLERS UNIT (MCU) :

A typical microcontroller is a true computer on a chip. The block diagram incorporates


all of the features found in micro-processor CPU: ALU, PC, SP, registers and some
other additional features needed to make a complete computer: ROM, RAM, parallel
I/O, serial I/O, counters, and clock circuit. As shown in figure 2.3.

2.4 COMPARISON BETWEEN MICROPROCESSORS &


MICROCONTROLLERS :
The microprocessor must have many additional parts to be operational as a computer
whereas microcontroller requires no additional external digital parts.

 The prime use of microprocessor is to read data, perform extensive calculations


on that data and store them in the mass storage device or display it. The prime functions
of microcontroller is to read data, perform limited calculations on it, control its
environment based on these data. Thus the microprocessor is said to be general-purpose
digital computers whereas the microcontroller are intend to be special purpose digital
controller.
 Microprocessor need many opcodes for moving data from the external memory to
the CPU, microcontroller may require just one or two, also microprocessor may have
one or two types of bit handling instructions whereas microcontrollers have many.
 Thus microprocessor is concerned with the rapid movement of the code and data
from the external addresses to the chip, microcontroller is concerned with the rapid
movement of the bits within the chip.
Lastly, the microprocessor design accomplishes the goal of flexibility in the hardware
configuration by enabling large amounts of memory and I/O that could be connected to
the address and data pins on the IC package. The microcontroller design uses much
more limited set of single and double byte instructions to move code and data from
internal memory to ALU.
FIG. 2.1 HARDWARE OF EMBEDDED SYSTEM

CPU Data Bus


General-
Purpose Serial
RAM ROM I/O Timer com
Micro-
processor Port Port

Fig 2.2 BLOCK DIAGRAM OF MICROPROCESSOR

CPU RAM ROM


A single chip
Serial
I/O Timer COM
Port Port
Fig2.3 BLOCK DIAGRAM OF MICROCONTROLLER.
CHAPTER 3: TRAINING WORK

3.1 MICROCONTROLLERS:
3.1.1 INTRODUCTION:

Circumstances that we find ourselves in today in the field of microcontrollers had their
beginnings in the development of technology of integrated circuits. This development
has made it possible to store hundreds of thousands of transistors into one chip. That was
a prerequisite for production of microprocessors, and the first computers were made by
adding external peripherals such as memory, input-output lines, timers and other. Further
increasing of the volume of the package resulted in creation of integrated circuits. These
integrated circuits contained both processor and peripherals. That is how the first chip
containing a microcomputer, or what would later be known as a microcontroller came
about. The first microcontroller 8051 was developed by Intel Corporation in the year
1981. it was called as a “System on a chip”. A microcontroller 8051 is shown in figure
3.1.

3.1.2 DEFINITION OF A MICROCONTROLLER:


Microcontroller, as the name suggests, are small controllers. They are like single chip
computers that are often embedded into other systems to function as
processing/controlling unit.
For example, the remote control you are using probably has microcontrollers inside that
do decoding and other controlling functions. They are also used in automobiles, washing
machines, microwave ovens, toys ... etc, where automation is needed.
3.1.3 FEATURES OF MICROCONTROLLER:
The key features of microcontrollers include:
 High Integration of Functionality
 Microcontrollers sometimes are called single-chip computers because they have
on-chip memory and I/O circuitry and other circuitries that enable them to
function as small standalone computers without other supporting circuitry.
 Field Programmability, Flexibility
 Microcontrollers often use EEPROM or EPROM as their storage device to allow
field programmability so they are flexible to use. Once the program is tested to be
correct then large quantities of microcontrollers can be programmed to be used in
embedded systems.
 Easy to Use

Assembly language is often used in microcontrollers and since they usually follow RISC
architecture, the instruction set is small. The development package of microcontrollers
often includes an assembler, a simulator, a programmer to "burn" the chip and a
demonstration board. Some packages include a high level language compiler such as a C
compiler and more sophisticated libraries.
Most microcontrollers will also combine other devices such as:
 A Timer module to allow the microcontroller to perform tasks for certain time
periods.
 A serial I/O port to allow data to flow between the microcontroller and other
devices such as a PC or another microcontroller.
 An ADC to allow the microcontroller to accept analogue input data for processing.
 The 8051 is a high performance single chip computer intended for use in
sophisticated real time applications such as instrumentation, industrial control and
computer peripherals. It provides extra features like interrupts, bit address ability
and an enhanced set of instructions, which makes the chip very powerful and cost
effective.

3.2 BLOCK DIAGRAM OF MICROCONTROLLER 8051:


Figure 3.2 block diagram of microcontroller 8051 consisting of

 8 bit data path and ALU


 On chip flash memory
 4K X 8 ROM – Program Memory
 128 X 8 RAM – Data Memory
 Multiple 16 – bit Timer/Counter.
 Full duplex UART (serial port).
 On chip clock oscillator.
 32 I/O pins
3.3 PIN CONFIGURATION OF MICROCONTROLLER:
Figure 3.3 showing the pin configuration of microcontroller 8051. We have 4 ports in
8051 micro controller. They are port0, port1, port2, port3 which can be accessed as I/O
ports. The pins of the micro controller are explained below.
Fig 3.1 MICROCONTROLLERS 8051

Fig3.2 BLOCK DIAGRAM OF MICROCONTROLLER 8051


Fig 33 PIN CONFIGURATION OF MICROCONTROLLER

3.3.1 BRIEF DISCRIPTION:


VCC:
 Pin 40 provides supply voltage to the chip. The voltage source is +5 Volts.
GND:
 Pin 20 is the ground.
XTAL1 and XTAL2:
 The 8051 has an on chip oscillator but requires an external clock to run it. Most
often a quartz crystal oscillator is connected to inputs XTAL1 (pin 19) and XTAL2
(pin 18). The quartz crystal oscillator connected to XTAL1 and XTAL2 also needs
two capacitors of 30 pf value. One side of each capacitor is connected to the ground.
Speed refers to the maximum oscillator frequency connected to XTAL .When the
8051 is connected to a crystal oscillator is powered up we can observe the frequency
on the XTAL2 pin using the oscilloscope.
RST:
 Pin 9 is the RESET pin. It is an input and is active high. Upon applying a high
pulse to this pin the microcontroller well reset and terminate all activities. This is
often referred to as a power on reset .Activating a power on reset will cause all values
the registers to be lost. It will set program counter to all 0s.
In order for the RESET input to be effective it must have a minimum duration of
two machine cycles. In other words the high pulse must be high for a minimum
of two machine cycles before it is allowed to go low.
EA:
 The 8051 family members such as the 8751/52, 89C51/52 or DS89C4*0 all come
with on chip ROM to store programs. In such cases the EA pin is connected to Vcc.
For family members such as the 8031 and 8032 in which there is no on chip ROM,
code is stored on an external ROM and is fetched by 8031/32. Therefore for the 8031
the EA pin must be connected to GND to indicate that the code is stored externally.
EA which stands for “external access” is pin number 31 in the DIP packages. It is an
input pin and must be connected to either Vcc or GND. In other words it cannot be
unconnected.
PSEN:
 This is an output pin. PSEN stands for “program store enable”. In an 8031 based
system in which an external ROM holds the program code, this pin is connected to
the OE pin of the ROM.
ALE:
 ALE stands for “address latch enable. It is an output pin and is active high. When
connecting an 8031 to external memory, port 0 provides both address and data. In
other words the 8031 multiplexes address and data through port 0 to save pins. The
ALE pin is used for de-multiplexing the address and data by connecting to G pin of
the 74LS373 chip.
PORTS 0,1,2,3:
 All the ports upon RESET are configured as input, since P0-P3 have value FFH
on them. The following is a summary of features of P0-P3.
PORT 0:
 Port 0 is also designated as AD0-AD7 allowing it to be used for both address and
data. When connecting an 8051/31 to an external memory, port 0 provides both
address and data. The 8051 multiplexes address and data through port 0 to save pins.
ALE indicates if p0 has address A0-A7.in the 8051 based systems where there is no
external memory connection the pins of P0 must be connected externally to 10k-ohm
pull-up resistor. This is due to the fact that P0 is an open drain, unlike P1, P2 and P3.
Open drain is a term used for MOS chips in the same way that open collector is used
for TTL chips. In many systems using the 8751, 89c51 or DS89c4*0 chips we
normally connect P0 to pull up resistors.
PORT 1, PORT 2:
 In 8051 based systems with no external memory connection both P1 and P2 are
used as simple I/O. however in 8031/51 based systems with external memory
connections P2 must be used along with P0 to provide the 16-bit address for the
external memory. P2 is also designated as A8-A15 indicating its dual function. Since
an 8031/51 is capable of accessing 64k bytes of external memory it needs a path for
the 16 bits of address. While P0 provides the lower 8 bits via A0-a7 it is the job P2 to
provide bits A8-A15 of the address. In other words when the 8031/51 is connected to
external memory P2 is used for the upper 8 bits of the 16 bit address and it cannot be
used for I/O.
PORT 3:
 Port 3 occupies a total of 8 pins 10 through 17. It can be used as input or output.
P3 does not need any pull-up resistors the same as P1 and P2 did not. Although port
3 is configured as input port upon reset this is not the way it is most commonly used.
Port 3 has the additional function of providing some extremely important signals
such as interrupts.

Table 3.1 ALTERNATE USES OF PORT- 3 PINS:

PINS ALTERNATE USE SFR

P3.0 RXD Serial data input SBUF

P3.1 TXD Serial data output SBUF

P3.2 INT0 External Interrupt 0 TCON.1

P3.3 INT1 External Interrupt 1 TCON.3

P3.4 T0 External Timer 0 I/P TMOD

P3.5 T1 External Timer 1 I/P TMOD

P3.6 WR External Memory write pulse -

P3.7 RD External Memory read pulse -


Table 3.2 FAMILY MEMBERS OF 8051

Features 8051 8031 8052 8032


ROM 4K 0K 8K 0K

RAM(bytes) 128 128 256 256

Timers 2 2 3 3

I/O Pins 32 32 32 32

Serial Port 1 1 1 1

Interrupt Sources 6 6 7 7

3.4 RESET CIRCUIT:


Figure 3.4 showing the reset circuit of microcontroller.

Fig3.4 RESET CIRCUIT OF MICROCONTROLLER

3.5 Registers:
The Accumulator:
The Accumulator, as its name suggests, is used as a general register to
accumulate the results of a large number of instructions. It can hold an 8-bit (1-byte)
value and is the most versatile register
The "R" registers:
The "R" registers are a set of eight registers that are named R0, R1, etc. up to and
including R7. These registers are used as auxiliary registers in many operations.
The "B" Register:
The "B" register is very similar to the Accumulator in the sense that it may hold
an 8-bit (1-byte) value. The "B" register is only used by two 8051 instructions: MUL AB
and DIV AB.
The Data Pointer (DPTR):
The Data Pointer (DPTR) is the 8051’s only user-accessible 16-bit (2-byte)
register. The Accumulator, "R" registers, and "B" register are all 1-byte values. DPTR, as
the name suggests, is used to point to data. It is used by a number of commands which
allow the 8051 to access external memory.
The Program Counter (PC):
The Program Counter (PC) is a 2-byte address which tells the 8051 where the
next instruction to execute is found in memory. When the 8051 is initialized PC always
starts at 0000h and is incremented each time an instruction is executed.
The Stack Pointer (SP):
The Stack Pointer, like all registers except DPTR and PC, may hold an 8-bit (1-
byte) value. The Stack Pointer is used to indicate where the next value to be removed
from the stack should be.
PSW (Program Status Word) Register:
Program status word register is an 8 bit register. It is also referred to as the flag
register. Although the PSW register is 8 bits wide, only 6 bits of it are used by the 8051.
The unused bits are user-definable flags. Four of the flags are called conditional flags,
meaning that they indicate some conditions that result after an instruction is executed.
These four are CY (carry), AC (auxiliary carry), P (parity) and OV (overflow).

Table 3.3 PROGRAM STATUS WORD

CY PSW.7 Carry Flag


AC PSW.6 Auxiliary Carry Flag
F0 PSW.5 Available to the user for
General Purpose
RS1 PSW.4 Register Bank Selector Bit 1
RS0 PSW.3 Register Bank Selector
Bit 0
OV PSW.2 Overflow Flag
-- PSW.1 User Definable Bit
P PSW.0 Parity Flag.
Addressing Modes:
An "addressing mode" refers to how you are addressing a given memory location.
The addressing modes are as follows,
With an example of each:
Immediate Addressing MOV A, #20h
Direct Addressing MOV A, #30h
Indirect Addressing MOV A, @R0
External Direct MOVX A, @DPTR
Code Indirect MOVC A, @A+DPTR
Each of these addressing modes provides important flexibility.
Interrupts:
An interrupt is a special feature which allows the 8051 to provide the illusion of
"multitasking," although in reality the 8051 is only doing one thing at a time.
.Timers:
Timers are one of the categories of hardware time delays. Time delays are used to
keep a system into halting System or sleepy mode. We have two timers - timer0,
timer1.Hardware time delays are used to generate exact time delays.
3.6 PROJECT WORK:
3.6.1 INTRODUCTION:
In industries, research centers and college, some common IC's are frequently
used; many times people face problems due to some fault in these integrated circuits. So
it is very essential to test them before actually using them in any of the applications.
Microcontroller based digital IC tester is best solution for these problems.
This project has the capability of testing any available digital IC of the TTL
family of 14 pins. The main advantage over the industry standard for the project is its
low cost and eases of updating to any new IC design which may be inducted in the
market by any company only through software updating.

The IC-tester tests the basic logic gates used in the digital laboratory of colleges.
It uses 89c51 as the controlling and processing unit. The input is given to the
corresponding pins of the IC to be tested using program stored in micro-controller. The
output is taken from the relevant pin. It is compared with the look-up table of that IC
being stored in the memory. Depending on the result of comparison, the output is
displayed in the LCD display.

3.6.2 FEATURES OF IC TESTER:

1: User friendly set up and operates.


2:16 X 2 character LCD display.
3: Built in 2 functions and 10 numerical keys.
4: Identifies over TTL digital ICs (up to16 pins).
5: Various LED’S and LCD display to present the test results FAIL or PASS.
3.6.3 TECHNICAL SPECIFICATIONS:

FAMILY : TTL
RANGE : Logic Gates can be tested.
TEST SOCKETS : A single 14 pin ZIF sockets for IC Testing.
PACKAGE : DIP14, 16, 20 and 24 pins.
DISPLAY : 16X2 LCD Display.
INDICATOR LEDs : 1 bright LEDs of 3 mm each.
ELECTRICAL : 230 V (+/- 10 %), 1 phase, 50 Hz (+/- 2 %)
3.7 CIRCUIT DIAGRAM:
The circuit diagram of IC tester is shown in figure 3.5.

3.7.1 COMPONENTS DESCRIPTION:

RESISTOR:
 A resistor is a two-terminal electronic component that produces a voltage across
its terminals that is proportional to the electric current through it in accordance with
Ohm's law:
V=IR
Units
The ohm (symbol: Ω). commonly used multiples and submultiples in electrical
and electronic usage are the milliohm (1x10-3), kilohm (1x103), and megaohm (1x106).
The resistor is shown in figure 3.6.
Each color corresponds to a certain digit, progressing from darker to lighter colors, as
shown in the chart 3.4 below.

CAPACITOR:
 Capacitor is a passive electronic component consisting of a pair of conductors
separated by a dielectric as shown in figure 3.7. When a voltage potential difference
exists between the conductors, an electric field is present in the dielectric. This field
stores energy and produces a mechanical force between the plates.
An ideal capacitor is characterized by a single constant value, capacitance, which is
measured in farads.

C=Q/V

CRYSTAL OSCILLATOR:
 A crystal oscillator is an electronic circuit as shown in figure 3.8 that uses the
mechanical resonance of a vibrating crystal of piezoelectric material to create an
electrical signal with a very precise frequency. This frequency is commonly used to keep
track of time (as in quartz wristwatches), to provide a stable clock signal for digital
integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The
most common type of piezoelectric resonator used is the quartz crystal, so oscillator
circuits designed around them were called "crystal oscillators".
D1
R3
RP1 LCD1
220 RESPACK-8
LED-GREEN LM016L

2
3
4
5
6
7
8
9
C1
U1

VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
19 39
XTAL1 P0.0/AD0
33p X1 P0.1/AD1
38

1
2
3

4
5
6

7
8
9
10
11
12
13
14
CRYSTAL 37
C2 P0.2/AD2
18 36 R2
XTAL2 P0.3/AD3
35
P0.4/AD4
34
P0.5/AD5 1k
33p 33
P0.6/AD6
9 32
RST P0.7/AD7

C3 P2.0/A8
21
10u 22
P2.1/A9
23
P2.2/A10
29 24
PSEN P2.3/A11
30 25
ALE P2.4/A12
31 26
EA P2.5/A13
R1 P2.6/A14
27
10k 28
P2.7/A15
1 10
P1.0 P3.0/RXD
2 11
P1.1 P3.1/TXD
3 12
P1.2 P3.2/INT0
4 13
P1.3 P3.3/INT1
5 14
P1.4 P3.4/T0
6 15
P1.5 P3.5/T1
7 16
P1.6 P3.6/WR
8 17
P1.7 P3.7/RD
AT89C51
PROGRAM=D:\program\ictester.HEX
2

U2:A
7408
3

Fig3.5 CIRCUIT DIAGRAM OF IC TESTER

Fig3.6 RESISTOR
Fig3.7 CAPACITOR

Fig3.8 CRYSTAL OSCILLATOR


Table 3.4 COLOR CODING OF RESISTOR

Colo 1st 2nd 3rd band 4th band Temp.


r band band (multiplier) (tolerance) Coefficient

Black 0 0 ×100

Brow
1 1 ×101 ±1% (F) 100 ppm
n

Red 2 2 ×102 ±2% (G) 50 ppm

Oran
3 3 ×103 15 ppm
ge

Yello
4 4 ×104 25 ppm
w

Gree
5 5 ×105 ±0.5% (D)
n

Blue 6 6 ×106 ±0.25% (C)

Viole
7 7 ×107 ±0.1% (B)
t

Gray 8 8 ×108 ±0.05% (A)

Whit
9 9 ×109
e

Gold ×10-1 ±5% (J)

Silve
×10-2 ±10% (K)
r

None ±20% (M)


TRANSISTOR:
 In electronics, a transistor is a semiconductor device commonly used to amplify
or switch electronic signals. A transistor is made of a solid piece of a semiconductor
material, with at least three terminals for connection to an external circuit. The bipolar
junction transistor (BJT) was the first type of transistor to be mass-produced. Bipolar
transistors are so named because they conduct by using both majority and minority
carriers. The three terminals of the BJT are named emitter, base, and collector. The BJT
consists of two p-n junctions: the base–emitter junction and the base–collector junction,
separated by a thin region of semiconductor known as the base region.

LIQUID CRYSTAL DISPLAY:


 A liquid crystal display (LCD) shown in figure 3.9 is a thin, flat panel used for
electronically displaying information such as text, images, and moving pictures. Its uses
include monitors for computers, televisions, instrument panels, and other devices ranging
from aircraft cockpit displays, to every-day consumer devices such as video players,
gaming devices, clocks, watches, calculators, and telephones. Among its major features
are its lightweight construction, its portability, and its ability to be produced in much
larger screen sizes than are practical for the construction of cathode ray tube (CRT)
display technology. Its low electrical power consumption enables it to be used in battery-
powered electronic equipment. It is an electronically-modulated optical device made up
of any number of pixels filled with liquid crystals and arrayed in front of a light source
(backlight) or reflector to produce images in color or monochrome.

DIODE:
 In electronics, a diode is a two-terminal device. Diodes have two active
electrodes between which the signal of interest may flow, and most are used for their
unidirectional electric current proper. Diode figure is shown in 3.10.
The most common function of a diode is to allow an electric current to pass in one
direction (called the forward biased condition) and to block the current in the opposite
direction (the reverse biased condition).
Fig.3.9 LIQUID CRYSTAL DISPLAY

Fig 3.10 DIODE


LIGHT EMITTING DIODE:
 A light-emitting diode (LED) is a semiconductor diode that emits light when an
electrical current is applied in the forward direction of the device as shown in figure
3.11..
Charge carrier recombination takes place when electrons from the N-side cross
the junction and recombine with the holes on the P side. Electrons are in the higher
conduction band on the N side whereas holes are in the lower valence band on the P side.
During recombination, some of the energy is given up in the form of heat and light. In
the case of semiconductor materials like Gallium arsenide (GaAs), Gallium phosphate
(Gap) and Gallium arsenide phosphate (GaAsP) a greater percentage of energy is
released during recombination and is given out in the form of light. LED emits no light
when junction is reversed biased. LEDs are widely used as indicator lights on electronic
devices and increasingly in higher power applications such as flashlights and area lighting.

Fig 3.11 LIGHT EMITTING DIODE

ZIF SOCKET:
 ZIF stands for “ZERO INSERTION FORCE”. ZIF is a type of IC socket that
requires very little force for insertion as shown in figure 3.12. ZIF socket allow the
socket to open to receive the pin without pressure and then close around the pin to give a
good, solid connection. With a ZIF socket before the IC is inserted, a lever or slider on
the side of the socket is moved, pushing all the sprung contact apart so that the IC can be
inserted with very little force. ZIF socket is commonly used for chip testing, IC testing
and programming equipment.
POWER SUPPLY CIRCUIT:
BRIDGE RECTIFIERS:
 Bridge rectifier circuit consists of four diodes arranged in the form of a bridge as
shown in figure3.13.
OPERATION:
During the positive half cycle of the input supply, the upper end A of the
transformer secondary becomes positive with respect to its lower point B. This makes
Point1 of bridge positive with respect to point2. The diode D1 & D2 become forward
biased & D3 & D4 become reverse biased. As a result a current starts flowing from
point1, through D1 the load & D2 to the negative end.
During negative half cycle, the point2 becomes positive with respect to point1. DiodeD1
& D2 now become reverse biased.
TRANSFORMER:
DEFINITION:
 The transformer is a static electro-magnetic device that transforms one alternating
Voltage (current) into another voltage (current).However; power remains the same
during the transformation. Transformers play a major role in the transmission and
distribution of ac power.
PRINCIPLE:
Transformer works on the principle of mutual induction. A transformer consists
of laminated magnetic core forming the magnetic frame. Primary and secondary coils are
wound upon the two cores of the magnetic frame, linked by the common magnetic flux.
When an alternating voltage is applied across the primary coil, a current flows in the
primary coil producing magnetic flux in the transformer core. This flux induces voltage
in secondary coil shown in figure 3.14.

A transformer is a device that transfers electrical energy from one circuit to another
through inductively coupled electrical conductors. A changing current in the first circuit
(the primary) creates a changing magnetic field; in turn, this magnetic field induces a
changing voltage in the second circuit (the secondary). By adding a load to the secondary
circuit, one can make current flow in the transformer, thus transferring energy from one
circuit to the other. It is the phenomenon of mutual induction.

The secondary induced voltage VS, of an ideal transformer, is scaled from the primary VP
by a factor equal to the ratio of the number of turns of wire in their respective windings:

Transformers are classified as:


(a) Based on position of the windings with respect to core i.e.
(1) Core type transformer
(2) Shell type transformer
(b) Transformation ratio:

(1) Step up transformer


(2) Step down transformer
DC power supply exists in every electronic box whether it is a computer, TV, or
equipment in the laboratory. The power supply consists of ac voltage transformer, diode
rectifier, ripple filter, and voltage regulator. The transformer is an ac device. It has two
coil windings, the primary and the secondary, around a common magnetic core. The
current flowing in the primary winding generates a time varying electromagnetic field
which in turn induces an output voltage across the secondary winding. The ratio of turns
in the two windings determines the ratio of the input voltage and output voltage. The
power supply that we are building in this experiment is a linear power supply. In other
words, the circuit functions with analog signals. In our kit, we have a small transformer
which can convert 230Vac from the wall plug to 6-12 V ac.

3.7.2 IC’S WHICH ARE TESTING ON IC TESTER:

The logic to test an IC is very simple. We can test it using their truth tables and
functional tables. In case of logic gates, we should check truth tables. Different IC’s are
used for different logic gates. These are:-

1. 7408 - AND

2. 7432 - OR

3. 7404 - NOT

4. 7400 - NAND

5. 7402 - NOR

6. 7486 - EX-OR

7. 74266 - EX-NOR
Fig3.12 ZIF SOCKET

Fig3.13 POWER SUPPLY CIRCUIT

Fig 3.14 TRANSFORMERS


3.7.3 Description of IC’s:

7408 IC. 7408 IC is use for AND gate. In this IC 14 pins are present. In which two
pins are input and one pin is output. In 7408 IC four AND gates are use. One pin is for
Vcc and one is for ground. Two inputs are present on first and second terminal and
output is on third terminal as shown in figure 3.15.

Fig 3.15 7408 IC

7432 IC. 7432 IC is use for OR gate. In this IC 14 pins are present. In which two pins
are input and one pin is output. In 7432 IC four OR gates are use. One pin is for Vcc and
one is for ground. Two inputs are present on first and second terminal and output is on
third terminal as shown in figure 3.16.

Fig 3.16 7432 IC


7404 IC. 7404 IC is use for NOT gate. In this IC 14 pins are present. In which one
pin is input and one pin is output. In 7402 IC six NOT gates are use. One pin is for Vcc
and one is for ground. One input are present on first terminal and output is on second
terminal as shown in figure 3.17.

Fig 3.17 7404 IC

7400 IC. 7400 IC is use for NAND gate. In this IC 14 pins are present. In which two
pins are input and one pin is output. In 7400 IC four NAND gates are use. One pin is for
Vcc and one is for ground. Two inputs are present on first and second terminal and
output is on third terminal as shown in figure 3.18.

Fig 3.18 7400 IC


7402 IC. 7402 IC is use for NOR gate. In this IC 14 pins are present. In which two pins
are input and one pin is output. In 7402 IC four NOR gates are use. One pin is for Vcc
and one is for ground. Two inputs are present on second and third terminal and output is
on third terminal as shown in figure 3.19

Fig 3.19 7402 IC

7486 IC. 7486 IC is use for EX-OR gate. In this IC 14 pins are present. In which two
pins are input and one pin is output. In 7486 IC four EX-OR gates are use. One pin is
for Vcc and one is for ground. Two inputs are present on first and second terminal and
output is on third terminal as shown in figure 3.20

Fig 3.20 7486 IC


74266 IC. 74266 IC is use for EX-NOR gate. In this IC 14 pins are present. In
which two pins are input and one pin is output. In 74266 IC four EX-NOR gates are use.
One pin is for Vcc and one is for ground. Two inputs are present on first and second
terminal and output is on third terminal as shown in figure 3.21

Fig 3.21 74266 IC

In all gates except NOT & NOR first two terminals are the inputs and the third
terminal is the output. So we are externally giving inputs to first 2 pins of IC and
checking the 3rd terminal. If the desired output is obtained, LCD displays PASS and if
the output is wrong, LCD displays FAIL. In NOT gate we are giving input only one
terminal and the output is obtained on second terminal.

In NOR gate the inputs are giving on second and third terminal of the IC and the
output is obtained on first terminal.
CHAPTER4: EVALUTION OF TRAINING
4.1 LCD INTERFACING:
4.1.1 PIN CONFIGURATION:
LCD in the board is 16X2 characters display. As shown in figure 4.1.
LCD stands for Liquid Crystal Display. The most commonly used LCDs found in
the market today are 1 Line, 2 Line or 4 Line LCDs which have only 1 controller and
support at most of 80 characters.
8 data pins D7:D0:
 Bi-directional data/command pins. Alphanumeric characters are sent in ASCII
format.
RS: Register Select:
 RS = 0 -> Command Register is selected
RS = 1 -> Data Register is selected
R/W: Read or Write:
 0 -> Write, 1 -> Read
E: Enable (Latch data):
 Used to latch the data present on the data pins.
A high-to-low edge is needed to latch the data.
VEE: contrast control:
4.1.2 DDRAM - DISPLAY DATA RAM:
Display data RAM (DDRAM) stores display data represented in 8-bit character
codes. Its extended capacity is 80 X 8 bits, or 80 characters. The area in display data
RAM (DDRAM) that is not used for display can be used as general data RAM. So
whatever you send on the DDRAM is actually displayed on the LCD.
4.1.3BF - BUSY FLAG:
Busy Flag is a status indicator flag for LCD. When we send a command or data to the
LCD for processing, this flag is set (i.e. BF =1) and as soon as the instruction is executed
successfully this flag is cleared (BF = 0). This is helpful in producing and exact amount
of delay. For the LCD processing to read Busy Flag, the condition RS = 0 and R/W = 1
must be met and The MSB of the LCD data bus (D7) act as busy flag. When BF = 1
means LCD is busy and will not accept next command or data and BF = 0 means LCD is
ready for the next command or data to process
4.1.4 INSTRUCTION REGISTER (IR) AND DATA REGISTER (DR):
There are two 8-bit registers controller Instruction and Data register. Instruction
register corresponds to the register where you send commands to LCD e.g. LCD shift
command, LCD clear, LCD address etc. and Data register is used for storing data which
is to be displayed on LCD. When send the enable signal of the LCD is asserted, the data
on the pins is latched in to the data register and data is then moved automatically to the
DDRAM and hence is displayed on the LCD.

4.1.5 INTERFACING LCD TO 8051:


Figure 4.2 show the interfacing LCD to 8051.The LCD requires 3 control lines as
well as either 4 or 8 I/O lines for the data bus. The user may select whether the LCD is to
operate with a 4-bit data bus or an 8-bit data bus. If a 4-bit data bus is used, the LCD will
require a total of 7 data lines. If an 8-bit data bus is used, the LCD will require a total of
11 data lines. The three control lines are EN, RS, and RW. Note that the EN line must be
raised/lowered before/after each instruction sent to the LCD regardless of whether that
instruction is read or write, text or instruction EN is the LCD's way of knowing that you
are talking to it. If you don't raise/lower EN, the LCD doesn't know you're talking to it on
the other lines.

4.1.6 COMMANDS AND INSTRUCTION SET:


Only the instruction register (IR) and the data register (DR) of the LCD can be
controlled by the MCU. Before starting the internal operation of the LCD, control
information is temporarily stored into these registers to allow interfacing with various
MCUs, which operate at different speeds, or various peripheral control devices. The
internal operation of the LCD is determined by signals sent from the MCU.
4.1.7 SENDING COMMANDS TO LCD:
To send commands we simply need to select the command register. Everything is
same as we have done in the initialization routine. But we will summarize the common
steps and put them in a single subroutine.
Following are the steps:

 Move data to LCD port


 Select command register
 Select write operation
 Send enable signal
 Wait for LCD to process the command
Fig4.1 PIN CONFIGURATION OF LCD

Fig4.2 INTERFACING OF LCD TO 8051


4.2 SEGMENT DISPLAY:
4.2.1 Introduction
Segment display is shown in figure 4.3.The 7 segment display can also be used
for displaying numbers. Each of the segments of the display is connected to a pin on the
8051. In order to light up a segment on the pin must be set to 0V. To turn a segment off
the corresponding pin must be set to 5V. This is simply done by setting the pins on the
8051 to '1' or '0'. LED displays are Power-hungry (10mA per LED) and Pin-hungry (8
pins per 7-seg display). But they are cheaper than LCD display.
7-SEG Display is available in two types -1. Common anode & 2. Common
cathode are shown in figure 4.4(a) and 4.4(b) respectively but command anode display
are most suitable for interfacing with 8051 since 8051 port pins can sink current better
than sourcing it.

Fig4.3 7 SEGMENT DISPLAY

Fig 4.4(a) COMMON ANODE Fig 4.4(b) COMMON CATHODE


4.2.2 Creating Digit Pattern
In Common Anode display, the common Anode pin is tied to 5V .The cathode
pins are connected to port 1 through 330 Ohm resistance (current limiting). For
displaying Digit say 7 we need to light segments -a ,b, c. in Common anode display , to
do so we have to provide Logic -0 (0 V) at cathode of these segments. So need to clear
pins- P1.0 ,P1.1,P1.2. that is 1 1 1 1 1 0 0 0 -->F8h.
Table 4.1 HEX CODE FOR DISPLAYING VARIOUS DIGITS

Digit Seg. h Seg. g Seg. f Seg. e Seg. d Seg. c Seg. b Seg. a HEX

0 1 1 0 0 0 0 0 0 C0

1 1 1 1 1 1 0 0 1 F9

2 1 0 1 0 0 1 0 0 A4

3 1 0 1 1 0 0 0 0 B0

4 1 0 0 1 1 0 0 1 99

4.2.3 Multi 7 Segment interfacing:


Since we can enable only one 7-seg display at a time, we need to scan these
display at fast rate .the data lines are common for all the 4 segments. The scanning
frequency should be high enough to be flicker-free. At least 30HZ .Therefore – time one
digit is ON 1/30seconds.

Fig4.5 MULTI 7 SEGMENT INTERFACING


CHAPTER5: CONCLUSIONS AND RECOMMENDATIONS
5.1 CONCLUSIONS:
The project has been successfully completed and the main objective of emulating
an IC tester on 89c51 micro controller has been achieved. For a given specification any
IC can be checked for its functionality. It takes more time to test an IC manually, with
the implementation of the system with microcontroller makes the testing procedure
simpler.
So we conclude that any digital IC with the given specifications can be
implemented on IC tester circuit. This system is capable of testing the IC’s having up to
24 pins.

5.2 APPLICATIONS:

 In electronic industries.

 Research center

 In college laboratory

5.3 BENEFITS:

 Its low cost.

 Easily updating the IC in ZIF socket.

5.4 EXPERIMENTAL OBSERVATIONS:

Problems &Trouble shooting:


Problems do occur even with perfect designed circuit the problems that are faced during
the project
Use of NOP command
Considerable delays
Supply and ground to IC
Operating system for downloading hex code
Even though there are no errors in the code and the logic is also correct, sometimes there
will be a distraction on the LCD screen during displays we have to use the NOP
command- No Operation command adequate number of times such that there doesn’t
occur any characters other than the desired ones.
Considerable delays are to be given during the issue of control commands to
LCD. We know that controller is faster than the external I/O devices. So we use delays in
between the issue of control and data commands to LCD screen.
While writing procedures for the IC to be tested, the first step is to give supply
and ground connections to the IC and later proceed with the testing code. Without giving
supply and ground connections to IC, if we implement the code that is, first the logic
later the supply connections, the logic will not work i.e., it is futile. So always keep in
mind that, be sure of supply and ground connections and later proceed with the logic.
It is better to implement the design of the code in either Windows NT or
windows XP operating system for downloading the hex code in to controller board. The
.exe files are compatible for Windows NT or windows XP operating system but not
recommended for Windows 95 or windows 98. It is recommended to work with windows
2000 professional operating system
5.5 FUTURE SCOPE OF WORK:
This digital IC tester can test various digital IC families just by the software
updating. In this project the code is written for 10 IC’s which can be extended to digital
families of 74XX , but the code written might be reaching out of bounds of memory that
is available in the microcontroller. That is due to the RAM may not be sufficient to
support the whole code so we have to interface extra memory chips.
The availability of large memory capacity makes the PIC processor the best
suited surrogate for microcontroller with optimal features. So far the IC to be tested is
mounted on the ZIF socket, and the respective details of the IC are selected form the
menu provided in the micro controller board. This in turn produces the results by
displaying if the IC is working or not by mentioning the gates. One special feature which
makes this project, true equipment for industrial purpose is that to have a search
procedure included in it. The search procedure is used, so that if we place an IC in the
ZIF socket the entire process of identifying the IC and then selecting and sending the
inputs to the IC’s should be done by this procedure.
This circuit has been designed with an aim to test an IC having up to 24 pins. So
necessary steps should be taken in order to utilize this project to be implemented for
digital IC’s having pins more than 24.
REFERENCES

I. “THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEM” by


Muhammad Ali Mazidi , Janice Gillispie Mazidi, Rolin D. Mckinlay.
II. www.8051projects.com
III. www.electronics4u.com

Potrebbero piacerti anche