Internship Report New

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 49

INTERNSHIP ON

EMBEDDED SYSTEMS

PROFESSIONAL TRAINING REPORT

by
AKSHAYA SRI SARAVANAN 41130016

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

SCHOOL OF ELECTRICAL AND ELECTRONICS

SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
(DEEMED TO BE UNIVERSITY)
Accredited with Grade “A++” by NAAC
JEPPIAAR NAGAR, RAJIV GANDHI SALAI, CHENNAI- 600 119
OCTOBER – 2024
I
DEPARTMENT OF
ELECTRONICS AND
COMMUNICATION
ENGINEERING
BONAFIDE CERTIFICATION

This is to certify that this Internship Report is the bonafide work of


AKSHAYA SRI SARAVANAN 41130016 who carried out the internship
on EMBEDDED SYSTEM at Retech-solutions from AUGUST 7th 2024 to
AUGUST 21st 2024.

Faculty Incharge
Dr.E.ANNA DEVI, M.E, Ph.D.,

Head of the Department


Dr.T. RAVI, M.E., Ph.D.,

SUBMITTED OR VIVA VOICE EXAMINATION_________________________

INTERNAL EXAMINER EXTERNAL EXAMINER


II

DECLARATION
I, AKSHAYA SRI SARAVANAN 41130016, hereby declare that the Professional
training Report is done under the guidance of Dr.E.ANNA DEVI, M.E, Ph.D.,is
submitted in partial fulfillment of the requirements for the professional training report

DATE:
PLACE: Chennai SIGNATURE OF THE CANDIDATE

III

ACKNOWLEDGEMENT
We are pleased to acknowledge my sincere thanks to the Board of Management Of
SATHYABAMA INSTITUTE OF SCIENCE AND TECHNOLOGY for their Kind
encouragement in doing this training for completing it successfully. We are grateful
to them.

We convey our thanks to Dr. N.M. NANDHITHA., M.E., Ph.D., Prof. & Dean,
School of Electrical and Electronics Engineering and Dr. T. RAVI., M.E., Ph.D.,
Head of the department Electronics and Communication Engineering for
Providing necessary support and details at the right time during the progressive
Reviews.

We would like to express my sincere and deep sense of gratitude to my Faculty


Incharge Dr.E.ANNA DEVI, M.E, Ph.D., for her valuable Guidance, suggestions and
Constant encouragement paved the way for the Successful completion of internship.
We wish to express our thanks to all Teaching and Non- teaching staff members Of
the Department of Electronics and Communication Engineering who were Helpful in
many ways for the completion of the training..

We wish to express my thanks to all teaching and non-teaching staff members of the
Department of Electronics and Communication Engineering who were helpful in
many ways for the completion of my internship.

IV

TABLE OF CONTENTS
CHAPTER.NO TITLE PAGE.NO

ABSTRACT 10
1 EMBEDDED SYSTEMS 11
1.1 Introduction 11
1.2 Components in an embedded 12
system
1.3 Characteristics of embedded 12
products
1.4 Embedded products in Today’s 12
industry
2 MICROCONTROLLERS 14
2.1 Introduction 14
2.2 Definition of Microcontroller 14
2.3 The key features of microcontroller 15
2.4 Microcontrollers 15
2.5 8051 Architecture 16
2.6 Standard features of the 8051 17
2.8 Reset circuit and clock circuit 20
2.9 Family Members of 8051 20
2.10 RAM Architecture 21
2.11 Register Bank 22
2.12 Bit Memory 23
2.13 Special Function Register 23
(SFR) Memory
2.14 Registers 23
2.15 The Accumulator 23
2.16 The "R" registers 24
2.17 The "B" Register 24
2.18 The Data Pointer (DPTR) 24
2.19 The Program Counter (PC) 24
2.20 The Stack Pointer (SP) 24
2.21 Interrupts 24
2.22 Timers 24
2.23 Central Processing Unit 25
3 COMPONENTS DESCRIPTION
3.1 Resistor 25
3.2 Units 26
3.3 capacitor 26
3.4 crystal oscillator 27
3.5 Liquid Crystal Display 27
3.6 Transistor 28
3.7 Diode 29
3.8 Light emitting diode 30
3.9 power supply circuit 30
3.10 Relay 31
3.11 Transformer 32
4 LCD INTERFACING
4.1 Pin Configuration 33
4.2 DDRAM - Display Data RAM 34
4.3 BF - Busy Flag 34
4.4 Interfacing LCD to 8051 34
4.5 LCD Commands 35
4.6 Sending Commands to LCD 35
5 7-SEGMENT DISPLAY
5.1Introduction 37
VI
5.2 Creating Digit Pattern 37
5.3 Multi 7 Segment interfacing 38
6 KEYPAD INTERFACING
6.1 Introduction 39
6.2 Constructing a Matrix keypad 39
6.3 Scanning a Matrix Keypad 40
6.4 Interfacing Matrix keypad 41
7 SOFTWARE
7.1 Trouble shooting 41
7.2 Hardware section 42
7.3 Component mounting 42
7.4 Hardware testing 42
7.5 Software section 42
7.6 Software testing 42
8 CONCLUSION 43

VII

LIST OF FIGURE
FIG.NO. TITLE PAGE.NO.
1.1 AURDINO BOARD 12
2.1 8051 MICROCONTROLLER 15
2.2 MICROCONTROLLER AND ITS SUBUNITS 17
2.3 8051 ARCHITECTURE 17
2.4 PIN CONFIGURATION 19
2.5 PIN CONFIGURATION 19
2.6 RESET CIRCUIT 22
2.7 RAM ARCHITECTURE 23
2.8 SIMPLIFIED CPU WITH 3 REGISTERS 27
2.9 RESISTORS 28
2.10 CAPACITORS 29
2.11 CRYSTAL OSCILLATOR 29
2.12 LCD 30
2.13 DIODES 31
2.14 LED 32
2.15 POWER SUPPLY CIRCUIT 32
2.16 RELAY 33
2.17 TRANSFORMER 34
2.18 LCD PIN CONFIGURATION 36
2.19 LCD INTERFACING WITH 8051 39
2.20 7 SEGMENT DISPLAY 50
2.21 7 SEGMENT DISPLAY INTERFACING 41
2.22 7 SEGMENT DISPLAY 43
2.23 CONSTRUCTION OF MATRIX KEYPAD 44
2.24 MATRIX KEYPAD INTERFACING WITH 42
MICROCONTROLLER

III
ABSTRACT
I have done internship for 1 month in online mode by Retech solutions on Embedded
systems .During a one-month intensive online internship with Retech Solutions, I had
the opportunity to delve into the dynamic world of Embedded Systems, gaining
valuable insights, practical experience, and enhancing my skills in this cutting-edge
field. Retech Solutions, a renowned leader in embedded technology solutions,
provided an enriching platform for hands-on learning and professional growth.

This internship encompassed a wide range of essential aspects within Embedded


Systems, including hardware design, microcontroller programming, firmware
development, and IoT integration. Through a structured curriculum and mentorship
from experienced professionals, I was able to grasp fundamental concepts, apply
industry-standard tools, and tackle real-world challenges.

This internship not only allowed me to apply my theoretical knowledge but also
cultivated essential skills in problem-solving, teamwork, and adaptability.
Additionally, it reinforced the importance of meticulous attention to detail and
rigorous testing in the development of robust embedded systems.

As a result of this internship experience, I am better equipped to contribute


effectively to the field of Embedded Systems, with a deeper understanding of its
practical applications and the tools and techniques necessary for success.

I am immensely grateful to Retech Solutions for providing this valuable learning


opportunity and for their unwavering support and guidance throughout the internship.
This experience has fuelled my passion for embedded technology, and I am eager to
continue exploring this exciting field in my future endeavours.

CHAPTER 1
EMBEDDED SYSTEMS
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.

Fig :1.1: AURDINO BOARD


1.2 Components in an embedded system
 Hardware
 Input
 Output
 Software

2
1.3 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.
1.4 Embedded products in Today’s industry
 Telecom
Mobile phone systems, modems, routers.
 Automotive applications
Braking systems, traction systems, airbag release systems, engine-
management units, steer-by-wire systems, cruise control applications
 Domestic appliances
Dishwashers, televisions, washing machines microwave ovens
Video recorders, security systems, garage door controllers, calculators, digital
watches, VCRs, Digital cameras, Remote controls, Treadmill.
 Robotic
Firefighting robots, Automatic floor cleaner, robotic arm etc.
 Aerospace applications
Flight control systems, engine controllers, autopilots, passenger in-flight
entertainment systems.
 Medical equipment
An aesthesia monitoring systems, ECG monitors, Pacemakers, Drug delivery
systems, MRI scanners
 Defense systems
Radar systems, fighter aircraft flight control systems, radio systems, missile
guidance systems
 Office automation
Laser printers, fax machines, pagers, cash registers, gas pumps, credit/debit
card readers, thermostats, grain analysers.

3
CHAPTER 2
2.1 MICROCONTROLLERS
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”. Intel refers to it as MCS-51 now.

Fig: 2.1: 8051 MICROCONTROLLER

2.2 Definition of 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.

The key features of microcontroller

• High Integration of Functionality.

4
• Microcontrollers sometimes are called single-chip computers because they have
onchip 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.

2.3 Microcontrollers

•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.

Fig: 2.3: MICROCONTROLLER


5
2.4: 8051 Architecture

Fig: 2.3: 8051 ARCHITECTURE

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.

2.5 Standard features of the 8051

• 8 bit data path and ALU

• 4K X 8 ROM – Program Memory

•128 X 8 RAM – Data Memory

• Multiple 16 – bit Timer/Counter.

• On chip clock oscillator. 32 I/O pins

Fig:2.4 :PIN DIAGRAM


6

Fig: 2.5: PIN CONFIGURATION OF MICROCONTROLLER

Port 0 (pin 32-39)


Dual purpose I/O port.

In min. component design, it is used as a general purpose I/O port. In Larger designs
with external memory, it becomes a multiplexed data bus: Low byte of address bus,
strobe by ALE.

8-bit instruction bus, strobed by PSEN.

8-bit data bus, strobed by WR and RD.

Port 1 (pin 1-8)


As an I/O port: Standard bi-directional port for interfacing to external Devices as
required for I/O.
Alternate functions: Only on some derivatives.
7
Port 2 (pin 21-28)
Dual purpose I/O port.

As an I/O port: Standard bi-directional general purpose I/O port. Alternate functions:
High byte of address bus for external program and Data memory accesses

Port 3 (pin 10-17)


Is an 8-bit bi-directional I/O port with internal pull-ups? It also serves the Functions of
various special features of the 80C51

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 -

Reset It resets total 8051 micro controller.


XTAL1 & XTAL2: To connect the crystal oscillator. for 8051 crystal oscillator of
11.0592 MHZ is connected between these pins.

ALE: Address latch enable which is used to access the address locations from
external memory.

PSEN: Program store enable which is used for storing programming code into
the external memory.

EA: External Access: 64 KB of ROM is the limit for external memory. Supply and
Ground pins: Pin 40 is for +5V and pin 20 is for GND.
8

Fig: 2.6: RESET CIRCUIT OF MICROCONTROLLER

RAM ARCHITECTURE

Fig: 2.7: RAM ARCHITECTURE

The 8051 has a bank of 128 bytes of Internal RAM. This Internal RAM is found
onchip on the 8051 so it is the fastest RAM available, and it is also the most flexible
in terms of reading, writing, and modifying its contents. Internal RAM is volatile, so
when the 8051 is reset this memory is cleared. The 128 bytes of internal ram is
subdivided as shown on the memory map. The first 8 bytes (00h - 07h) are "register
bank 0". These alternative register banks are located in internal RAM in addresses
08h through

1Fh.Bit memory actually resides in internal RAM, from addresses 20h through 2Fh.
The 80 bytes remaining of Internal RAM, from addresses 30h through 7Fh, may be
used by user variables that need to be accessed frequently or at high-speed. This
area is also utilized by the microcontroller as a storage area for the operating stack.

Register Bank
The 8051 uses 8 "R" registers which are used in many of its instructions. These "R"
registers are numbered from 0 through 7 (R0, R1, R2, R3, R4, R5, R6, and
R7).These registers are generally used to assist in manipulating values and moving
data from one memory location to another. The concept of register banks adds a
great level of flexibility to the 8051.

Bit Memory

The 8051, being a communication oriented microcontroller, gives the user the ability
to access a number of bit variables. These variables may be either 1 or 0. There are
128 bit variables available to the user, numbered 00h through 7Fh. The user may
make use of these variables with commands such as SETB and CLR. It is important
to note that Bit Memory is really a part of Internal RAM.

Special Function Register (SFR) Memory

Special Function Registers (SFRs) are areas of memory that control specific
functionality of the 8051 processor. For example, four SFRs permit access to the
8051’s 32 input/output lines. Another SFR allows a program to read or write to the
8051’s serial port .SFR is a part of Internal Memory. This is not the case. When using
this method of memory access (it’s called direct address), any instruction that has an
address of 00h through 7Fh refers to an Internal RAM memory address; any
instruction with an address of 80h through Fifth refers to an SFR control register.

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

10

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 (1byte)
value. The Stack Pointer is used to indicate where the next value to be removed
from the stack

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.

11

Central Processing Unit

Let add 3 more memory locations to a specific block that will have a built in capability
to multiply, divide, subtract, and move its contents from one memory location onto
another. The part we just added in is called "central processing unit" (CPU). Its
memory locations are called registers. Registers are therefore memory locations
whose role is to help with performing various mathematical operations or any other
operations with data wherever data can be found. Look at the current situation. We
have two independent entities (memory and CPU) which are interconnected, and
thus any exchange of data is hindered, as well as its functionality. If, for example, we
wish to add the contents of two memory locations and return the result again back to
memory, we would need a connection between memory and CPU. Simply stated, we
must have some "way" through data goes from one block to another.

Fig: 2.8: SIMPLIFIED CENTRAL PROCESSING UNIT WITH THREE REGISTERS


13

CHAPTER 3
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

The ohm (symbol: Ω). commonly used multiples and submultiples in electrical and
electronic usage are the milliohm (1x10-3), kilohm (1x103), and megohm (1x106).

Fig: 3.1: RESISTORS

Capacitor

Capacitor passive electronic component consisting of a pair of conductors separated


by a dielectric. 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
Fig: 3.2: CAPACITORS

14

Crystal oscillator

A crystal oscillator is an electronic circuit 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".

Fig: 3.3: CRYSTAL OSCILLATOR

Liquid Crystal Display

A liquid crystal display (LCD) is a thin, flat panel used for electronically displaying
information such as text, images, and moving pictures..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.

Fig: 3.4: LCD

15

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

FIG 3.5 TRANSITOR

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.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.6 DIODE

16

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. LEDs are widely
used as indicator lights on electronic devices and increasingly in higher power
applications such as flashlights and area lighting.

Fig: 3.6: LED

Power supply circuit

Fig: 3.7: POWER SUPPLY CIRCUIT

Bridge rectifiers
Bridge rectifier circuit consists of four diodes arranged in the form of a bridge as
shown in Fig:3.7

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,

17

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.
Thus a current flow from point 2 to point.

Relay

A relay is an electrically operated switch. Current flowing through the coil of the relay
creates a magnetic field which attracts a lever and changes the switch contacts. The
coil current can be on or off so relays have two switch positions and they are double
throw (changeover) switches.

Fig: 3.8: RELAY

Transformer
Fig: 3.9: TRANSFORMER

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

18

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 of two types

• Step up transformer

• Step down transformer

In power supply we use step down transformer. We apply 220V AC on the primary of
step down transformer. This transformer steps down this voltage to 9V AC. We give
this 9 V AC to rectifier circuit, which convert it to 5V DC.
19

CHAPTER 4

LCD INTERFACING

Pin Configuration

Fig: 4.1: LCD PIN CONFIGURATION

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 Fig: 4.1: pin
configuration for 16 X 2 LCD 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.

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.

20

BF - 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.

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.

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.

LCD commands

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.

21

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:

1. Move data to LCD port

2. Select command register

3. Select write operation

4. Send enable signal

5. Wait for LCD to process the command


Fig: 4.2: LCD INTERFACING WITH 8051

22
CHAPTER 5

7-SEGMENT DISPLAY

Fig: 5.1: 7 SEGMENT DISPLAY

Introduction

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 are available in two
types -1.

Fig: 5.2: 7-SEGMENT DISPLAY INTERFACING


23

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.

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 is 1/30 seconds.

Fig: 5.3: INTERFACING OF MULTI 7-SEGMENT DISPLAY


24

CHAPTER 6

KEYPAD INTERFACING

Introduction

Keypads are a part of HMI or Human Machine Interface and play really important
role in a small embedded system where human interaction or human input is
needed. Martix keypads are well known for their simple architecture and ease of
interfacing with any microcontroller.

Constructing a matrix keypad

Construction of a keypad is really simple. As per the outline shown in the Fig: below
we have four rows and four columns. In between each overlapping row and column
line there is a key. So keeping this outline we can constuct a keypad using simple
SPST Switches as shown below.

Fig: 6.1:CONSTRUCTION OF MATRIX KEYPAD

Scanning a matrix keypad

There are many methods depending on how you connect your keypad with your
controller, but the basic logic is same. We make the coloums as i/p and we drive the
rows making them o/p, this whole procedure of reading the keyboard is called
scanning. In order to detect which key is pressed from the matrix, we make row lines
low one by one and read the coloums. Lets say we first make Row1 low, then read
the columns. If any of the key in row1 is pressed will make the corrosponding column
as low i.e if second key is pressed in Row1, then column2 will give low. So we come
to know that key 2 of Row1 is pressed. This is how scanning is done.
25

So to scan the keypad completely, we need to make rows low one by one and read
the columns. If any of the button is pressed in a row, it will take the corrosponding
column to a low state which tells us that a key is pressed in that row. If button 1 of a
row is pressed then Column 1 will become low, if button 2 then column2 and so on...

Interfacing matrix keypad

Fig: 6.2: MATRIX KEYPAD INTERFACING WITH MICROCONTROLLER

26
CHAPTER 7

SOFTWARE

EMBEDDED C PROGRAMMING

Now comes the programming .The entire hardware is nothing if it is not interfaced
with the software .The hardware cannot function in the absence of the software. In
this case we provide the software in the form of EMBEDDED C PROGRAMMING.
This entire program is fed in the memory of the microcontroller .The code for which
the access is allowed is also fed through this c language program . Trouble
shooting

Not to say but yes we faced lots of troubleshooting. So we are providing the ways to
remove those troubleshooting. The whole concept is divided into various sections as
follows:

HARDWARE SECTION

Component mounting

During mounting make sure that the soldering iron you are using is of correct rating,
such that it is at suitable temperature so that your PCB can bear without harming the
tracks. Make sure that components are properly mounted in the whole and
completely covered by solder joint.

Hardware testing

Hardware testing is further subdivided into two parts:

1. without power supply

2. with power supply

In without power supply as the name suggests you don’t have to provide the external
power input. It is just meant testing the desired/undesired tracks or connections. It is
most basic step in the project. Must be done very carefully. In power supply mode,
provide connection of external power input .And check for desired output in terms of
voltage or any other criteria.
27

SOFTWARE SECTION

Software testing

There are various modules in the circuit, e.g. IR-MODULE, H-BRDGE, LEDS
etc.Check proper functioning of each and every component through small tiny
programs. Once this step is done, then final program is implemented and corrected
for proper functioning.
CONCLUSION

On the whole, this internship was a useful experience. I have gained new
knowledge, skills. I achieved several of my learning goals, however for some the
conditions did not permit. I got insight into professional practice. I learned the
different facets of working within ECIL.

At last I come to conclusion that 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.

One thing I have noticed in this study is the level of input given by the employees at
this work place. Every employee takes his job as a challenge and performs for the
betterment of the organization.
Internship certificate -1

Retech solutions- Embedded systems


Internship certificate -2

Internpe- Web development


Internship certificate 3

Bharath intern-machine learning


Internship offer letter(ongoing) 4

Bharat intern-
Cousers -1
Course-2
Course 3
Course 4
Course 5
Course-6
Course 7-

You might also like