EMBEDDED SYSTEM
INTERNSHIP REPORT
Internship Report P a g e 1 | 30
Table of Contents:
1. Introduction on Embedded System
2. Embedded Systems Examples
3. What is a Micro Processor? - General-purpose Microprocessor
4. What is a MicroController?
5. Microprocessor vs MicroController
6. Pin description of 8051 Microcontrollers
7. Popular Microcontrollers
8. Three criteria in Choosing a Microcontroller
9. The necessary tools for a microprocessor/controller
10. Pins of I/O Port
Internship Report P a g e 2 | 30
11. Hardware Structure of I/O Pin
12. Interfacing 16×2 LCD with 8051
13. Interfacing 16×2 LCD with 8051 Circuit Diagram
14. Components Required
15. Circuit Explanation
16. Code Embedded
17. About the Company
INTERNSHIP REPORT ON Embedded System
1. Introduction on Embedded System
o An embedded system is a special purpose system that is used to perform
one or few dedicated functions.
o Simply, we can call any electronic device that has a computer system
embedded inside it an embedded system.
Internship Report P a g e 3 | 30
o The microprocessor is the core of computer systems.
o Many communication, digital entertainment, portable devices, are controlled
by them.
o A designer should know what types of components he needs, ways to reduce
production costs and product reliable.
o Embedded systems are made to perform few tasks only, after implementation
you can’t use them for another purposes.
o Ex. You can’t watch movies using the microprocessor of your microwave
oven!!
Internship Report P a g e 4 | 30
2. Embedded Systems Examples
o Digital and analog televisions
o Set-top boxes (DVDs, VCRs, Cable boxes)
Internship Report P a g e 5 | 30
o Personal digital assistants (PDAs)
o MP3’s and iPod's
o Kitchen appliances (refrigerators, microwave ovens)
o Telephones/cell phones
o Cameras
o Global Positioning Systems And many others.
3. What is a Micro Processor? - General-purpose
Microprocessor
CPU for Computers
No RAM, ROM, I/O on CPU chip itself
Example Intel’s x86, Motorola’s 680x0
Internship Report P a g e 6 | 30
4. What is a MicroController?
i. It’s a full computer system on a chip, even if its resources are far
more limited than of a desktop personal computer.
ii. Designed for standalone operations.
iii. A microcontroller has a processor and many peripherals integrated
with it on the same chip, like
iv. a flash memory, RAM, I/O ports, serial communication ports, ADC …
Etc.
v. A Timer Module to allow the MCU to perform tasks for certain time
periods.
Internship Report P a g e 7 | 30
vi. A Serial I/O Port to allow data to flow between the MC and other
devices such as a PC or another MCU.
vii. An ADC to allow the MCU to accept analog inputs for processing.
viii. But a microprocessor can’t do all the functions of a computer
system on its own, and needs another
ix. circuits to support it like: I/O devices, RAM, ROM, DMA controllers,
Timers, ADC, LCD drivers.. Etc
5. Microprocessor vs MicroController
Internship Report P a g e 8 | 30
Internship Report P a g e 9 | 30
Internship Report P a g e 10 | 30
6. Pin description of 8051 Microcontrollers
Vcc(pin 40):
– Vcc provides supply voltage to the chip.
– The voltage source is +5V.
GND(pin 20):ground
XTAL1 and XTAL2(pins 19,18)
RST(pin 9):reset
– It is an input pin and is active high(normally low).
The high pulse must be high at least 2 machine cycles.
– It is a power-on reset.
Internship Report P a g e 11 | 30
Upon applying a high pulse to RST, the microcontroller will reset and all values
in registers will be lost.
Reset values of some 8051 registers
/EA(pin 31):external access
– There is no on-chip ROM in 8031 and 8032 .
– The /EA pin is connected to GND to indicate the code is stored externally.
– /PSEN & ALE are used for external ROM.
– For 8051, /EA pin is connected to Vcc.
– “/” means active low.
/PSEN(pin 29):program store enable
– This is an output pin and is connected to the OE pin of the ROM.
ALE(pin 30):address latch enable
– It is an output pin and is active high.
– 8051 port 0 provides both address and data.
– The ALE pin is used for de-multiplexing the address and data by connecting to
the pin of the 74LS373 latch.
I/O port pins
– The four ports P0, P1, P2, and P3.
– Each port uses 8 pins.
– All I/O pins are bi-directional.
7. Popular Microcontrollers
8051 (Intel and others)
80386 EX (Intel)
PIC (Microchip)
68HC05 (Motorola)
Internship Report P a g e 12 | 30
Z8 (Zilog)
8. Three criteria in Choosing a Microcontroller
1. Meeting the computing needs of the task efficiently and cost effectively
o • speed, the amount of ROM and RAM, the number of I/O ports and
timers, size, packaging, power consumption
o • easy to upgrade
o • cost per unit
2. Availability of software development tools
o • assemblers, debuggers, C compilers, emulator, simulator, technical
support
3. Wide availability and reliable sources of the microcontrollers.
9. The necessary tools for a microprocessor/controller
CPU: Central Processing Unit
I/O: Input /Output
Bus: Address bus & Data bus
Memory: RAM & ROM
Timer
Interrupt
Serial Port
Parallel Port
10. Pins of I/O Port
The 8051 has four I/O ports
Internship Report P a g e 13 | 30
o – Port 0 (pins 32-39):P0(P0.0~P0.7)
o – Port 1(pins 1-8) :P1(P1.0~P1.7)
o – Port 2(pins 21-28):P2(P2.0~P2.7)
o – Port 3(pins 10-17):P3(P3.0~P3.7)
o – Each port has 8 pins.
Named P0.X (X=0,1,...,7), P1.X, P2.X, P3.X
Ex:P0.0 is the bit 0(LSB)of P0
Ex:P0.7 is the bit 7(MSB)of P0
These 8 bits form a byte.
Each port can be used as input or output (bi-direction).
11. Hardware Structure of I/O Pin
Each pin of I/O ports
– Internal CPU bus:communicate with CPU
– A D latch store the value of this pin
D latch is controlled by “Write to latch”
Write to latch=1:write data into the D latch
– 2 Tri-state buffer:
TB1: controlled by “Read pin”
Read pin=1:really read the data present at the pin
TB2: controlled by “Read latch”
Read latch=1:read value from internal latch
– A transistor M1 gate
Gate=0: open
Gate=1: close
Internship Report P a g e 14 | 30
A Pin of Port 1
Writing “1” to Output Pin P1.X Writing “0” to Output Pin P1.X
Reading “High” at Input Pin Reading “Low” at Input Pin
12. Interfacing 16×2 LCD with 8051
In this project, we will have brief discussion on how to interface 16×2 LCD module to
AT89C51, which is an 8051 family microcontroller. We use LCD display for the
displaying messages in a more interactive way to operate the system or displaying error
Internship Report P a g e 15 | 30
messages etc. Interfacing 16×2 LCD with 8051 microcontroller is very easy if you
understanding the working of LCD.
Hence, in this project, I will not only give the information of LCD and also provide the
code in C language which is working fine without any errors.
16×2 Liquid Crystal Display which will display the 32 characters at a time in two rows (16
characters in one row). Each character in the display is of size 5×7 pixel matrix. This
matrix differs for different 16×2 LCD modules, if you take JHD162A, this matrix goes to
5×8. There are 16 pins in the LCD module, the pin configuration us given below
PIN NO NAME FUNCTION
1 VSS Ground pin
2 VCC Power supply pin of 5V
Used for adjusting the contrast commonly attached
3 VEE
to the potentiometer.
RS is the register select pin used to write display
data to the LCD (characters), this pin has to be high
4 RS when writing the data to the LCD. During the
initializing sequence and other commands this pin
should low.
Reading and writing data to the LCD for reading the
5 R/W data R/W pin should be high (R/W=1) to write the
data to LCD R/W pin should be low (R/W=0)
Enable pin is for starting or enabling the module. A
6 E high to low pulse of about 450ns pulse is given to
this pin.
7 DB0
8 DB1
9 DB2
10 DB3
DB0-DB7 Data pins for giving data (normal data like
11 DB4 numbers characters or command data) which is
meant to be displayed
12 DB5
13 DB6
14 DB7
Back light of the LCD which should be connected to
15 LED+
Vcc
Back light of LCD which should be connected to
16 LED-
ground.
Internship Report P a g e 16 | 30
Follow these simple steps for displaying a character or data
o E=1; enable pin should be high
o RS=1; Register select should be high
o R/W=0; Read/Write pin should be low.
To send a command to the LCD just follows these steps:
o E=1; enable pin should be high
o RS=0; Register select should be low
o R/W=0; Read/Write pin should be low.
Commands: There are some preset commands which will do a specific task in the LCD.
These commands are very important for displaying data in LCD. The list of commands
given below:
COMMAND FUNCTION
For switching on LCD, blinking the
0F
cursor.
1 Clearing the screen
2 Return home.
4 Decrement cursor
6 Increment cursor
E Display on and also cursor on
Force cursor to beginning of the first
80
line
Force cursor to beginning of second
C0
line
38 Use two lines and 5x7 matrix
83 Cursor line 1 position 3
3C Activate second line
0C3 Jump to second line position 3
0C1 Jump to second line position1
Internship Report P a g e 17 | 30
13. Interfacing 16×2 LCD with 8051 Circuit Diagram
14. Components Required
AT89C51 (8051 Microcontroller)
16X2 LCD Display
11.0592MHz Crystal
2 X 33pF Capacitors
2 X 10 KΩ Resistors
1 KΩ X 8 Resistor Pack
10 KΩ Potentiometer
330Ω Resistor
Internship Report P a g e 18 | 30
Push Button
10μF/16V Capacitor
8051 Programmer
5V Power Supply
Connecting Wires
15. Circuit Explanation
The crystal oscillator, along with two 33pF Capacitors, are connected to XTAL1 and
XTAL2, which will provide the system clock to the microcontroller.
RST Pin is pulled-LOW with the help of a 10KΩ Resistor. With the help of a 10μF
Capacitor and a Push Button, you can reset the 8051 Microcontroller. EA is pulled-HIGH
with the help of a 10KΩ resistor.
The data pins of the LCD are connected to PORT0 (first, the PORT0 pins must be
pulled-HIGH with the help of a 1KΩ Resistor Pack). RS and E are connected to PORT2
pins P2.0 and P2.1.
A 10KΩ Potentiometer is used to adjust the contrast of the LCD.
Programming LCD to 8051
Coming to the programming you should follow these steps:
STEP1: Initialization of LCD.
STEP2: Sending commands to LCD.
STEP3: Writing the data to LCD.
Internship Report P a g e 19 | 30
Initializing LCD
To initialize LCD to the 8051 the following instruction and commands are
to be embed in to the functions
0x38 is used for 8-bit data initialization.
0xoC for making LCD display on and cursor off.
0X01 for clearing the display of the LCD.
0x80 for positioning the cursor at first line .
Sending Commands to the LCD
E=1; enable pin should be high
RS=0; Register select should be low for sending commands
Placing the data on the data registers
R/W=0; Read/Write pin should be low for writing the data.
Writing the Data to the LCD
E=1; enable pin should be high
RS=1; Register select should be high for writing data
Placing the data on the data registers
R/W=0; Read/Write pin should be low for writing the data.
16. Code Embedded
#include<reg51.h
>
#define lcd P0
sbit rs=P2^0;
sbit e=P2^1;
void delay (int);
void cmd (char);
void display (char);
void custom (void);
void string (char *);
void init (void);
Internship Report P a g e 20 | 30
unsigned char custom_char[]= {0x00,0x04,0x0E,0x04,0x15,0x0E,0x04,0x00,
0x00,0x04,0x0E,0x0E,0x0E,0x1F,0x04,0x00,
0x00,0x0A,0x15,0x11,0x11,0x0A,0x04,0x00,
0x0E,0x11,0x11,0x1F,0x1B,0x1B,0x1B,0x1F,
0x0E,0x11,0x10,0x1F,0x1B,0x1B,0x1B,0x1F,
0x00,0x0E,0x15,0x1B,0x0E,0x0E,0x00,0x00,
};
void delay (int d)
{
unsigned char i;
for(;d>0;d--)
{
for(i=250;i>0;i--);
for(i=248;i>0;i--);
}
}
void cmd (char c)
{
lcd=c;
rs=0;
e=1;
delay(5);
e=0;
}
void display (char c)
{
lcd=c;
rs=1;
e=1;
delay(5);
e=0;
}
void custom (void)
{
int k;
cmd(0x40);
for(k=0;k<48;k++)
display(custom_char[k]);
Internship Report P a g e 21 | 30
cmd(0x80);
}
void string (char *p)
{
while(*p)
{
display(*p++);
}
}
void init (void)
{
cmd(0x38);
cmd(0x0c);
cmd(0x01);
cmd(0x80);
}
void main()
{
init();
custom();
string("Electronics Hub ");
cmd(0xc0);
string(" Presents ");
delay(2000);
cmd(0x01);
cmd(0x80);
string(" Custom Chars ");
cmd(0xc0);
string(" on 16x2 LCD ");
delay(2000);
cmd(0x01);
cmd(0x80);
string("ABCDEFGHIJKLMNOP");
cmd(0xc0);
string("1234567890");
cmd(0xca);
display(0);
display(1);
display(2);
Internship Report P a g e 22 | 30
display(3);
display(4);
display(5);
while(1);
}
17. About the Company
Established in 2010 by a team of young expert software professionals, Kaashiv Infotech
Solutions Limited is one of the largest IT majors today in providing educational
institutions integrated modules to manage all their processes online.
Consistently delivering mission, our team has been delivering technically challenging
projects under tight timelines, while also providing exceptional customer service and
support to our clientele. This in turn has led to extremely positive long-term working
Internship Report P a g e 23 | 30
relationships all over. Our detailed project process was created to ensure our projects
are completed on-time, in-budget, and to the clients complete satisfaction.
o Kaashiv Infotech is a services provider company.
o An ISO 9001:2000 Certified Company.
o Registered with MSME (Micro, Small & Medium Enterprises).
o Kaashiv Infotech develops IT solutions, underlined by innovation and
value creation that impact and redefines the businesses processes.
o Kaashiv Infotech takes pride in its philosophy of ‘Customers First’ which
empowers our Employees to create a real value for the customers.
o Our continuous development and training programs ensure that we are
always positioned to provide our valued customers a wide range of high
quality services, using the latest tools and technology.
o We are focused on complete reliability models of project execution and
management.
We offer turnaround guarantees for any project we undertake, backed by
comprehensive management planning and supervision
Internship Report P a g e 24 | 30
We are one of the largest suppliers of automotive electrial parts in
Asia. Our products include auto-electrical parts like starter motor,
alternator, regulator, armature, rotor, stator, LED lamp, bulb, flasher
units, relays, etc for many applications ranging from passenger cars,
bus, tractors, excavators, cranes, heavy industrial equipment, forklifts
to equipment and machinery of the marine industry.
Internship Report P a g e 25 | 30
Our Products
6.1 Mission
Provide cost effect high quality innovative solution & services, powered by state-
of-the-art technologies, anchored on our basic principles of:
• Explore
• Innovate
• Improve
The strong R&D team of Kaashiv Infotech is constantly working to upgrade
existing solutions and develop new products. Kaashiv Infotech is transparent and
accountable to customers, shareholders, partners, and employees and strives to
deliver on commitments and results.
Internship Report P a g e 26 | 30
6.2 Company Values
Kaashiv Infotech respects and seeks to maintain the highest standards of fairness,
equality, integrity, and honesty. Our corporate philosophy is:
Internship Report P a g e 27 | 30
• Total customer satisfaction, continuous improvement and total
involvement.
• Constantly and consistently deliver products and services of highest
quality.
Keep pace with change and continuously strive for innovation while keeping in
step with modern technology and methodology. Our core value centers on total
customer satisfaction and quest towards ensuring good corporate citizenship
Internship Report P a g e 28 | 30
6.3 Company Infrastructure
We have Pofessionally managed Software Development Company servicing clients
all over the India &abroad .Kaashiv Infotech was formed with a clear goal to
provide quality software development services. We are equipped with state of
the art infrastructure to cater to nearly every software development requirement:
• Modern office set-up with state of the art development center
• High speed connectivity to internet gateway
• Latest hardware and licensed software
• Custom built testing software applications
• Adequate communications infrastructure
• Reserve employee resource pool
• Data backup systems and redundant backup servers
Internship Report P a g e 29 | 30
• Redundant Power backups through Generators and Inverters
• Secure access for all employees.
Internship Report P a g e 30 | 30