Pavi
Pavi
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS & COMMUNICATION ENGINEERING
Submitted by
PATNANA KALYANI
22NT5A0430
The results embodied in this INTERNSHIP report have not been submitted to
any other University or Institute for the award of any Degree or Diploma.
Dr. Kausar Jahan M.Tech, Ph. D Dr. B. Jeevan Rao M.Tech., Ph.d
EXTERNAL SIGNATURE
INTERNSHIP COMPLETION CERTIFICATE
DECLARATION
i
ACKNOWLEDGEMENT
This work could not have been fruitful without the continuous guidance and
support from numerous people.
I thank the Almighty for giving me the strength and patience to work through
all these years.
ii
ABSTRACT
iii
CONTENTS
3
2 Embedded Systems Examples
3 General-purpose Microprocessor 4
4-6
4 Basics of Microcontroller
7 Popular Microcontrollers 10
12
Circuit explaianation 17-20
13 21
iv
LIST OF FIGURES
1 embedded system 1
11 hardware structure 16
12 :LCD display 18
v
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.
Fig1:embedded system
1
Fig2:watch moving using microprocessor your microoven
2
2.Embedded Systems Examples
o Telephones/cell phones
o Cameras
3
Fig4:embedded system examples
4
Fig5:general purpose micro processor system
4.MICRO CONTROLLER
i. It’s a full computer system on a chip, even if its resources are far more
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.
5
vi. A Serial I/O Port to allow data to flow between the MC and other
vii. An ADC to allow the MCU to accept analog inputs for processing.
ix. circuits to support it like: I/O devices, RAM, ROM, DMA controllers,
2.Microprocessor vs MicroController
6
Fig7:differnce between micro controller and micro processor
7
Fig9:schematic internal architecture of a micro controller
8
Vcc(pin 40):
GND(pin 20):ground
RST(pin 9):reset
– It is a power-on reset.
Upon applying a high pulse to RST, the microcontroller will reset and all
externally.
9
– It is an output pin and is active high.
– The ALE pin is used for de-multiplexing the address and data by
4.Popular Microcontrollers
8051 (Intel and others)
80386 EX (Intel)
PIC (Microchip)
68HC05 (Motorola)
Z8 (Zilog)
effectively
o • easy to upgrade
10
2. Availability of software development tools
technical support
Timer
Interrupt
Serial Port
Parallel Port
11
Named P0.X (X=0,1,...,7), P1.X, P2.X, P3.X
A Pin of Port 1
Writing “1” to Output Pin P1.X Writing “0” to Output Pin P1.X
12
Reading “High” at Input Pin Reading “Low” at Input Pin
fig11:hardware structure
– 2 Tri-state buffer:
– A transistor M1 gate
Gate=0: open
Gate=1: close
13
9.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
error messages etc. Interfacing 16×2 LCD with 8051 microcontroller is very easy if
Hence, in this project, I will not only give the information of LCD and also provide
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
14
9 DB2
10 DB3
DB0-DB7 Data pins for giving data (normal
11 DB4 data like 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
15 LED+ connected to Vcc
Back light of LCD which should be connected
16 LED- to ground.
Table1:Interfacing 16×2 LCD with 805
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
COMMAND FUNCTION
For switching on LCD, blinking
0F the cursor.
1 Clearing the screen
2 Return home.
4 Decrement cursor
6 Increment cursor
E Display on and also cursor on
80 Force cursor to beginning of the
15
first line
Force cursor to beginning of
C0 second 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
Table2:functions
Diagram
16
11.Components Required
12.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 .
Fig13:lcd display
17
Programming LCD to 8051
Initializing LCD
13.Code Embedded
#include<reg51.
h>
#define lcd P0
sbit rs=P2^0;
sbit e=P2^1;
18
void delay (int);
void cmd (char);
void display (char);
void custom (void);
void string (char *);
void init (void);
19
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]);
cmd(0x80);
}
20
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);
display(3);
display(4);
display(5);
while(1);
}
21
CONCLUSION
22
INTERNAL ASSESSMENT STATEMENT
Name of the
Student: Program of
Study: Year of
Study: Group:
Register No/H.T. No:
Name of the
College: University:
Name of the
Student: Program of
Study:
Year of Study:
Group:
Register No/H.T. No:
Name of the
College: University:
25