Вы находитесь на странице: 1из 35

SUMMER TRAINING

PRESENTATION ON EMBEDDED
SYSTEM
SUBMITTED
TO:
MR.RAJESH MALIK
H.O.D.(ECE)
SUBMITTED BY:
MANDEEP KUMAR
ROLL NO. 3410919
B.TECH 7TH SEM(ECE)

EMTECH Foundation is an ISO 9001:2008 certified


ABOUT
EMTECH FOUNDATION
training and Consultancy Company offering various
courses for budding electronics engineers working
professionals to upgrade their technical skills to find a
best working place in current competitive market
scenario.
They are now authorized training partner with Microchip
Technology Inc., USA in India.
Microchip Technology Inc., USA is worlds #1 company in
8-bit microcontrollers category and leading provider of
microcontroller, Analog and FLASH-IP solutions.
They are authorized training partner with Robhatah
Robotic Solution Pte. Ltd., Singapore.
It offers Training on Embedded Systems & Robotics
Design, Electronics Projects Design & Linux Device
Driver Programming, Programming of ARM & pic
Microcontrollers.

INTRODUCTION TO EMBEDDED
Embedded system means the processor is
SYSTEM
embedded into that application.
An

embedded system is a computer system


designed to
perform one or a few
dedicated often with real-time computing
constraint.
The

embedded system is a combination of


computer hardware, software, additional
electrical & mechanical parts.
Hardwar
e

Interface

Software

AN EMBEDDED SYSTEM
Input
Sour
ce
Code

O
U
T
P
U
T

-----------------------Software

Hardware

INPUT
SOURCES

Sensors
RF signal
Analog/Digital
signals
Mouse
Keyboard
Keypads
Optocoupler

OUTPUT
DEVICES
LED
Seven

segment

display
Buzzer
LCD
Printer
Relay
Motor

EMBEDDED SYSTEM
HARDWARE
Embedded
hardware is used for processing of
&system
COMPONENTS
input to produce output in task specific fashion.
I/P Device/Interfacing
Devices/ Driver Circuits
Power
Supply
Reset
Circuit
Oscilla
tor

Timers/
Counters
Program
Memory

Interrupt
Controller

Processe
r

Parallel
Ports

Data
Memory
Serial
Ports

O/P Device/Interfacing
Devices/ Driver Circuits

Applicat
ion
Specific
Circuits

EMBEDDED SYSTEM
Embedded system
software is used for editing,
SOFTWARE

compiling codes as well as simulating them using


an inbuilt simulator.
Machine
language

Java

Software

Assembly
language

Embedde
d C,
C++

CHARECTERISTICS OF
Energy
EMBEDDED
SYSTEM

MUST BE
DEPENDABLE
Reliable

Maintaina

ble
Available
Safety
Security

MUST BE
efficient.
EFFICIENT
Code-size
efficient.
Run-time
efficient.
Weight
efficient.
Cost efficient.

DEDICATED TOWARDS A CERTAIN


APPLICATION
MANY EMBEDDED SYSTEM MUST MEET REAL ItCONSTRAINTS
means embedded system must react to
TIME
stimuli within the time interval

APPLICATIONS OF
Rocket and Satellite
MP3 Players
EMBEDDED
SYSTEM
control
Mobile Phones
GPS

Receivers
Printers
Medical Equipments
ATMs
Rocket and Satellite
control
Energy production
control

Energy

production

control
Air traffic control
Avionics and missiles
Automobiles
Television
House hold appliances
Air traffic control

EMBEDDED PRESENCE IN
Communica
INDUSTRY

tion
Lighting

Healthcare
Technology

MICROCONTROLLERS
A

microcontroller is a functional computer


system-on-a-chip. It contains a processor, memory
and programmable input/output peripherals.
Microcontrollers

include an integrated CPU,


memory (a small amount of RAM, program
memory, or both) and peripherals capable of input
and output.
In

1971, the first microcontroller was invented


by two engineers at Texas Instruments, according
to the Smithsonian Institution. The
microcontroller was used internally in calculator.
Types

64-bit.

of microcontroller:- 8-bit, 16-bit, 32-bit,

MICROPROCESSORS
A

microprocessor is a single chip semi


conductor device also which is a computer on
chip, but not a complete computer.
Its

CPU contains an ALU, a program counter,


a stack pointer, some working register, a
clock timing circuit and interrupt circuit on a
single chip.
To

make complete micro computer, one must


add memory usually ROM and RAM, memory
decoder, an oscillator and a number of serial
and parallel ports.

DIFFERENCE B/W
MICROPROCESSOR &
MICROCONTROLLER
Microprocessor
Microcontroller
1. Contains no on chip RAM, ROM, I/O,
TIMER, Serial port .

1. Contains on chip RAM, ROM, I/O,


TIMER, Serial port .

2. Used in General Purpose


applications
3. Dont provide data storage facility.

2. Used in Specific Purpose


applications
3. Provides data storage facility.

4. Rapid movements of code and data


between external memory & MP.

4. Rapid movements of code and data


within MC
5. The structure of uC is as given
below

5. The structure of uP is as given


below
Data Bus

CPU

RAM

ROM

CPU
General
purpose
uP

RAM

ROM

Address Bus

I/O

TIMER

SERIAL
COM
PORT

I/O

TIMER

SERIAL
COM
PORT

PIC MICROCONTROLLER
PICis a family ofmodified Harvard architecture
microcontrollersmade byMicrochip Technology,
derived from the PIC1650originally developed by
General Instrument's Microelectronics Division. The
name PIC initially referred to "Peripheral Interface
Controller".

Why we use PIC microcontroller?

PICs are popular with both industrial developers and


hobbyists alike due to their low cost, wide availability,
large user base, extensive collection of application
notes, availability of low cost or free development
tools, and serial programming (and re-programming
with flash memory) capability. They are also commonly
used in educational programming.

I worked on PIC 16F877A 8-bit microcontroller.

The

basic building block of PIC 16F877A is based on


Harvard architecture. This microcontroller also has
many advanced features as mentioned in the previous
post. Here you can see the basic internal architecture
and memory organisation of PIC16F877A.

HARVARD
ARCHITECTU
RE
Uses two separate memory space for program and
instructions and data.`

REGISTER FILE CONCEPT

All of data memory is part of the register

file, so any location in data memory may be


operated o`n directly.
All peripherals are mapped into data

memory as a series of registers

PIC BLOCK DIAGRAM


PROGRAM
MEMORY

Non-Volatile
(Flash)

Holds program
instructions
that tell CPU
what to do

Oscillator

PIC16 Core
Working
STATUS
OPTION

ALU

CPU
The Brains
Performs all instruction,
logic, and mathematical
processing

DATA
MEMORY

Volatile

(SRAM)
Holds data
under the
control of
instructions

FLASH PROGRAM MEMORY


PROGRAM
MEMORY

14-BITS WIDE
Page 0

Stores

code)

the instructions (your

Tells the CPU what to do


The

Page 1

amount of Program
Memory is device specific
All

Page 2

Instructions are 14-bits wide

1 instruction = 1 Program Memory


Address
Divided

Page 3

into pages

FLASH PROGRAM MEMORY


PROGRAM
MEMORY
0000h
07FFh

Page 0

0800h
0FFFh

Page 1

With a 14 bit instruction, only 11 bits


can be used to specify a program
memory address in a single cycle

GOTO Instruction in Program Memory


13 12 11 1
0

1000h

Opcode
17FFh

Page 2

1800h
1FFFh

Page 3

211 = 2048 addresses

RAM DATA MEMORY


Divided

into BANKs

# of banks
is device dependent (4 banks max)

Data Memory

8-bits Wide
SFR

groups of Registers:
Special Function
Registers (SFR)
Control CPU and Peripheral
functions

General Purpose
Registers (GPR)
Store user defined variables

GPR

DATA MEMORY BANKS


000h

Special
Function
Registers

Note
Data
Memory
Addresse General
Purpose
Registers
s

07Fh

Bank
0

080h

Special
Function
Registers

100h Special

Function
Registers

180h Special

Function
Registers

General
Purpose
Registers

General
Purpose
Registers

General
Purpose
Registers

Accesses
Accesses
70h
7Fh
0FFh 70h 7Fh

Accesses
Accesses
70h
7Fh
17Fh 70h 7Fh

Accesses
Accesses
70h
7Fh
1FFh 70h 7Fh

Bank
1

Bank
2

Bank
3

128
Byte
s

DATA MEMORY SFR'S


Bank 0

Bank 1

Bank 2

Bank 3

000

INDF
INDF

080

INDF
INDF

100

INDF
INDF

180

INDF
INDF

001

TMR0
TMR0

081

OPTION_REG
OPTION_REG

101

TMR0
TMR0

181

OPTION_REG
OPTION_REG

002

PCL
PCL

082

PCL
PCL

102

PCL
PCL

182

PCL
PCL

003

STATUS
STATUS

083

STATUS
STATUS

103

STATUS
STATUS

183

STATUS
STATUS

004

FSR
FSR

084

FSR
FSR

104

FSR
FSR

184

FSR
FSR

005

PORTA
PORTA

085

TRISA
TRISA

105

006

PORTB
PORTB

086

TRISB
TRISB

106

007

PORTC
PORTC

087

TRISC
TRISC

107

187

008

PORTD
PORTD

088

TRISD
TRISD

108

188

009

PORTE
PORTE

089

TRISE
TRISE

109

189

00A

PCLATH
PCLATH

08A

PCLATH
PCLATH

10A

PCLATH
PCLATH

18A

PCLATH
PCLATH

00B

INTCON
INTCON

08B

INTCON
INTCON

10B

INTCON
INTCON

18B

INTCON
INTCON

00C

PIR1
PIR1

08C

PIE1
PIE1

10C

EEDATA
EEDATA

18C

EECON1
EECON1

00D

PIR2
PIR2

08D

PIE2
PIE2

10D

EEADR
EEADR

18D

EECON2
EECON2

185
PORTB
PORTB

186

TRISB
TRISB

STATUS REGISTER
bit 0

IRP

RP1

RP0

Reset Status
Bits
Power Down

TO

RP0
PD (SLEEP instr executed?)
Out
TO Time
(WDT Timeout?)

PD

DC

ALU Status Bits


RP0
C Carry
(Byte Overflow?)
Carry
DC Digit
(Nibble (4 bit) Overflow?)

Zero
(Is the ALU Result 0s?)

STATUS REGISTER
bit 7

IRP

bit 0

RP1 RP0

Data Memory
bank select bit
(Indirect Addressing)

IRP
0
RP0
1

BANKS 0 & 1
BANKS 1 & 2

TO

PD

DC

Data Memory
bank select
bits
(Direct Addressing)

RP1
RP1
0
0
1
1

RP0
RP0
0
1
0
1

BANK0
BANK1
BANK2
BANK3

PIC 16 INSTRUCTION SET


35

single word instructions

Byte
Byte Oriented
Oriented Operations
Operations
addwf
f,d
addwf
f,d Add
Add W
W and
and ff
andwf
f,d
andwf
f,d AND
AND W
W with
with ff
clrf
Clear
clrf ff
Clear ff
clrw
Clear
clrw -Clear W
W
comff,d
Complement
comff,d
Complement ff
decf
Decrement
decf f,d
f,d
Decrement ff
decfsz
f,d
decfsz
f,d Decrement
Decrement f,
f, Skip
Skip ifif 00
incf
Increment
incf f,d
f,d
Increment ff
incfsz
f,d
incfsz
f,d Increment
Increment f,
f, Skip
Skip ifif 00
iorwff,d
Inclusive
iorwff,d
Inclusive OR
OR W
W with
with ff
movff,d
Move
movff,d
Move ff
movwf
ff
Move
movwf
Move W
W to
to ff
nop
No
nop -No Operation
Operation
rlf
Rotate
rlf f,d
f,d
Rotate Left
Left ff through
through Carry
Carry
rrf
Rotate
rrf f,d
f,d
Rotate Right
Right ff through
through Carry
Carry
subwf
f,d
subwf
f,d Subtract
Subtract W
W from
from ff
swapf
f,d
swapf
f,d Swap
Swap nibbles
nibbles in
in ff
xorwf
f,d
xorwf
f,d Exclusive
Exclusive OR
OR W
W with
with ff

Bit
Bit Oriented
Oriented Operations
Operations
bcf
Bit
bcf f,b
f,b
Bit Clear
Clear ff
bsf
Bit
bsf f,b
f,b
Bit Set
Set ff
btfsc
Bit
btfscf,b
f,b
Bit Test
Test f,
f, Skip
Skip ifif Clear
Clear
btfss
Bit
btfssf,b
f,b
Bit Test
Test f,
f, Skip
Skip ifif Set
Set
Literal
Literal and
and Control
Control Operations
Operations
addlw
kk
Add
addlw
Add literal
literal and
and W
W
andlw
kk
AND
andlw
AND literal
literal with
with W
W
call
Call
Call subroutine
subroutine
call kk
Clear
clrwdt
-Clear Watchdog
Watchdog Timer
Timer
clrwdt
goto
Go
goto kk
Go to
to address
address
iorlw
Inclusive
iorlwkk
Inclusive OR
OR literal
literal with
with W
W
movlw
kk
Move
movlw
Move literal
literal to
to W
W
retfie
-Return
retfie
Return from
from interrupt
interrupt
retlwk
Return
retlwk
Return with
with literal
literal in
in W
W
return
-Return
return
Return from
from Subroutine
Subroutine
sleep
-Go
sleep
Go into
into standby
standby mode
mode
Subtract
sublw
kk
Subtract W
W from
from literal
literal
sublw
xorlw
kk
Exclusive
xorlw
Exclusive OR
OR literal
literal with
with W
W

PIC FAMILY PERIF`ERALS

I/O Ports
Timers (0, 1, 2)
Counters
Interrupts
Analog-to-Digital
Converter
USART
I2C and SPI Serial
Interface

Program

Interrupt

Interrupt Service Routine

Program

PORTX AND TRISX


Every PORT (A, B,REGISTORS
C, D, E) will have a corresponding
direction register TRISx

PORTB Register
RB7
RB7 RB6
RB6 RB5
RB5 RB4
RB4 RB3
RB3 RB2
RB2 RB1
RB1 RB0
RB0

Data
Configures Data
Direction

PORTB Tri-State Register (TRISB)


TRISB7
TRISB7TRISB6
TRISB6TRISB5
TRISB5TRISB4
TRISB4TRISB3
TRISB3TRISB2
TRISB2TRISB1
TRISB1TRISB0
TRISB0

1 = corresponding PORTB pin is an INPUT


0 = corresponding PORTB pin is an OUTPUT

PIC

ARCHITECTURE

ARCHITECTURE
PIC 16F877A EXPLANATION
having 40 pins.
Oscillator

13th & 14th


Reset
PIC

ckt. Is connected to the OSC1 & OSC2 i.e.


pin.

ckt. is connected to the MCLR i.e. 1st pin of PIC.

contains 4 PORTS.
PORT A, PORT B, PORT C, PORT D.
PORT A is analog Port.
PORT B, PORT C, PORT D are digital ports and these
ports can
be treated as input port or output
port.

SOFTWARES USED
SOFTWARE
MPLAB

IDE (v8.10)

MPLAB IDE (Integrated Development Environment) is


used for editing, compiling codes as well as simulating
them using an inbuilt simulator.

COMPILER
HI-TECH C compilers
Information gathered from a global view of the program,
can be used to provide better detection of potential errors
in the users code, and to better optimize the output.
HI-TECH C compilers can deliver denser code, improve
RAM utilization and reduce interrupt latency.

SIMULATOR

PROTEUS 7.7

What is Proteus 7.7?

Proteus

is a software that is used to develop PCB


with a feature of simulation also.
It contains all the desired tools that are required
for the development of PCB from concept to
complete design.
PROTEUS contains a debugger that makes our
design error free.

HOME AUTOMATION
USING GSM SYSTEM

Home

INTRODUCTION

automation is the residential extension of


"building automation". It is automation of the home,
housework or household activity. Home automation
may include centralized control of lighting, HVAC
(heating, ventilation and air conditioning),
appliances, and other systems, to provide improved
convenience, comfort, energy efficiency and
security.

OBJECTI
Home Automation savesVE
money by lowering your

monthly utilities bills with the remote & scheduled


control of light, appliances, sprinklers and your air
conditioning.

BLOCK DIAGRAM

APPLICATIONS
Check up on the babysitter while at work, or your
home while on vacation, through an Internetconnected video camera.
Adjust the thermostat while you lie in bed, or from a
cell phone on your way home from work.
Heat the hot tub or turn on the oven on the way home
from work through the cell phone.
Eliminate the need to walk around the house turning
off lights before exiting the home or going to sleep,
turn off all house lights with the touch of a single
button.
Set a series of events for your morning routine,
designate the thermostat to warm the room, have
lights gradually increase intensity, ensure the coffee
begins brewing and the television turns on.

Reliability

ADVANTAGES
Convenience.
Very

easy installation.
Savings.

DISADVANTAGES

Equipment

and installation costs


System crashes due to any damage in the
interconnection
Human errors
Reliability

Вам также может понравиться