Embedded System Introduction
Embedded System Introduction
Embedded System Introduction
2
Microcontrollers and Embedded System
3
What is a Microcontroller?
4
Microprocessor Vs Microcontroller
A microwave oven just does not need that much computing power.
Microcontroller-based systems are generally smaller, more reliable,
and cheaper. They are ideal for the types of applications described
above where cost and unit size are very important considerations. In
such applications it is almost always desirable to produce circuits that
require the smallest number of integrated circuits, that require the
smallest amount of physical space, require the least amount of
energy, and cost as little as possible.
5
Microcontroll
Ext int
er
interrupt
CPU
Data Bus (Bi directional)
Control Lines
OSC
6
Microcontroll
Ext int
er
interrupt
Timer0
Timer1
ROM RAM
CPU
7
Simple comparison: Pentium vs. 8051
FEATURE 8051 PENTIUM COMMENT
Clock Speed 12Mhz. typical 1,000 MHz. 8051 internally divides
but 60MHz. ICs (1GHz.) clock by 12 so for 12MHz.
available clock effective clock rate is
just 1MHz.
Address bus 16 bits 32 bits 8051 can address 216, or
64Kbytes of memory.
Pentium can address 232, or
4 GigaBytes of memory.
Data bus 8 bits 64 bits Pentium’s wide bus allows
very fast data transfers.
ALU width 8 bits 32 bits But - Pentium has multiple
32 bit ALUs – along with
floating-point units.
Applications Domestic Personal
appliances, Computers
Peripherals, And other high
automotive etc. performance areas.
Power Small fraction of a Tens of watts Pentium runs hot as power
consumption watt consumption increases
with frequency.
8
Cost of chip About RS.52/- About 6000/-
Microcontroller Manufacturing Companies
9
Port Organization of MCS51
Port 1
Port 0
P1.0 – P1.7
P0.0 – P0.7
P1 P0
Port 3
Port 2
P3.0 – P3.7
P2.0 – P2.7
P3 P2
10
Port Assignments
12
A Circuit using 89c51
40
+5V
Pin 40 +vcc
9 20 Gnd
89c51 31
9 Reset
18 OSC1
19 OSC2
31 Ext Acces
18
19 GND
20
13
Burglar alarm system hardware
+ 5 volts
8051 Chip
10 kOhms
P3.0 P1.0 a a
P3.1 P1.1 b
f b
P3.2 P1.2 c g
PORT 1 (P1)
PORT 3 (P3)
P3.3 P1.3 d
c
P3.4 P1.4 e e
.5 P1.5 f
d
.6 P1.6 g
.7 P1.7
+ volts
Internal Memory
7 6 5 4 3 2 1 0
SFRs
Zone
Zone
Zone
Zone
B0h
1
2
3
4
90h
I-RAM
14
Input circuit Output circuit
+ 5 volts a
f b
g
input x e c
d
normally closed
Switches are
15
ALARM_1 Program flow chart
Initialise I/O
ports P1 and P3
Read port P3
YES
Are all
P3 inputs at 0
NO
Sound alarm
Bell
16
ALARM_1 Program source code
17
Hardware circuit with timing diagram for sound
+ volts
Clock
12 MHz.
Loudspeaker
P1.0
Port 1
8051 SETB P1.0 SETB P1.0 SETB P1.0
RESET T = 2 msecs.
f = 1/T = 1 / 0.002
= 500 Hz.
18
Interactive Vehicle Tracking System
19
At the data points
GPS & GPRS based RF transmitter and receivers (RF System) are
connected to a computers
20
Server
Block diagram of data locker
Receiver Memory
D i s p l a y
GPS & GPRS
Micro
Controller
Transmitter
sensors
Start/stop alarm
Load
Fuel
21
Block diagram of data point
Server
Receiver
Pump
Pump link
circuit 22
Advantages
23
24