Internship Report New
Internship Report New
Internship Report New
EMBEDDED SYSTEMS
by
AKSHAYA SRI SARAVANAN 41130016
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
Faculty Incharge
Dr.E.ANNA DEVI, M.E, Ph.D.,
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 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 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.
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.
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.
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.
• 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.
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.
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.
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
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
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 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 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 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 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.
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
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.
CHAPTER 3
COMPONENTS DESCRIPTION
: Resistor
The ohm (symbol: Ω). commonly used multiples and submultiples in electrical and
electronic usage are the milliohm (1x10-3), kilohm (1x103), and megohm (1x106).
Capacitor
C=Q/V
Fig: 3.2: CAPACITORS
14
Crystal oscillator
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.
15
Transistor
Diode
16
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.
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:
• Step up 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
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
•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.
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.
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
22
CHAPTER 5
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.
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.
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.
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.
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.
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...
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
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
Bharat intern-
Cousers -1
Course-2
Course 3
Course 4
Course 5
Course-6
Course 7-