Embedded System
By Engr. Enrico Manalo
Outline
Definition of Embedded
Systems
Examples of Embedded System
Essentials in Embedded
System
Classifications of Embedded
System
Different Brands of a
Microcontroller
What is Embedded System ?
Embedded system
is a system whose principal
function is not computational,
but which is controlled by a
computer embedded within it.
What is Embedded System ?
An Embedded System is one that has
computer hardware with software embedded
in it as one of its important components.
SOFTWARE
PROGRAM
#include <16f876a.h>
#use delay (clock=20000000)
#byte PORTB=6
main()
{
set_tris_b(0);
portb=255; //decimal
delay_ms(1000);
portb=0x55; //hexadecimal
delay_ms(1000);
portb=0b10101010; //binary
delay_ms(500);
}
Embedded System
Embedded System
Embedded System
Embedded System
Embedded System
Embedded System
Embedded System
What is Microprocessor ?
The Microprocessor is a
processor on one silicon
chip.
What is Microcomputer ?
Microcomputer is a computer
that uses a Microprocessor
MICROCOMPUTER HARDWARE
A Microprocessor
A Large Memory
(Primary and Secondary)
(RAM, ROM and caches)
Input Units
(Keyboard, Mouse, Scanner, etc.)
Output Units
(Monitor, printer, etc.)
Networking Units
(Ethernet Card, Drivers, etc.)
I/O Units
(Modem, Fax cum Modem, etc.)
What is Microcontroller ?
A Microcontroller is a
programmable digital
processor with necessary
peripherals.
Microprocessor vs Microcontroller
CLASSIFICATIONS OF EMBEDDED SYSTEM
1. Small Scale Embedded System
2. Medium Scale Embedded System
3. Sophisticated Embedded System
SMALL SCALE EMBEDDED SYSTEM
Single 8 bit or 16bit Microcontroller.
Little hardware and software complexity.
They may even be battery operated.
Usually C or assembly is used for
developing these system.
The need to limit power dissipation when
system is running
continuously.
MEDIUM SCALE EMBEDDED SYSTEM
Single or few 16 or 32 bit microcontrollers
or Digital Signal Processors (DSP) or
Reduced Instructions
Set Computers (RISC).
Both hardware and software complexity
SOPHISTICATED EMBEDDED SYSTEM
Enormous hardware and software complexity
Which may need scalable processor or
configurable processor and programming logic
arrays.
Constrained by the processing speed available
in their hardware units.
COMPONENTS OF EMBEDDED SYSTEM
Hardware
Processor, Timers, Interrupt controller, I/O Devices,
Memories, Ports,etc.
Application Software
Which may perform concurrently the series of tasks or
multiple tasks.
Real Time Operating System (RTOS)
RTOS defines the way the system work. Which
supervise the application software. It sets the rules
during the execution of the application program. A
small scale embedded system may not need an
RTOS.
PROCESSOR
A Processor is the heart of the
Embedded System.
For an embedded system designer
knowledge of microprocessor and
microcontroller is a must.
Processor technology
General-purpose processors
Programmable device used in a
variety of applications
Also known as microprocessor
Application-specific processors
Programmable processor optimized for a particular class of
applications having common characteristics
Compromise between general-purpose and single-purpose
processors
Single-purpose processors
Digital circuit designed to execute exactly one Program
a.k.a. coprocessor, accelerator or peripheral
MICROCONTROLLER
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.
VARIOUS MICROCONTROLLERS
INTEL
8031,8032,8051,8052,8751,8752
PIC
8-bit PIC16, PIC18,
16-bit DSPIC33 / PIC24, PIC16C7x
Motorola
MC68HC11
Atmel
AT328
EMBEDDED PROCESSOR
Special microprocessors & microcontrollers
often called, Embedded processors.
An embedded processor is used when fast
processing fast context-switching & atomic
ALU operations are needed.
Examples : ARM 7, INTEL i960, AMD 29050.
DIGITAL SIGNAL PROCESSOR
DSP as a GPP is a single chip VLSI unit.
It includes the computational capabilities of
microprocessor and multiply & accumulate units (MAC).
DSP has large number of applications such as image
processing, audio, video & telecommunication
processing systems.
It is used when signal processing functions are to be
processed fast.
Examples : TMS320Cxx, SHARC, Motorola 5600xx
Demonstration Using PIC Microcontroller
What is PIC ?
PIC stands for Peripheral
Interface Controller given by
Microchip Technology to
identify its single-chip
microcontrollers.
PIC Characteristics
RISC CPUs
8-bit
16-bit
Number of I/O pins: 4-70
Memory types and sizes:
Flash; OTP
0.5k 256k
PIC Characteristics
All PICs require oscillators to execute
instructions:
Internal* (low speeds, up to 8 MHz)
External (high speeds, up to 40 MHz)
Instructions are executed at least at
oscillator speed (4
clocks/instruction)
(*Note: not all PICs have internal
oscillators)
PIC Characteristics
A/D converters and C/C modules
All PICs have between 0 and 16 A/D
converters with 8/10-bit resolution
8-16 bit Timers/Counters
Comparator Modules (0-2)
PIC Characteristics
PORT FUNCTION
ALL PORTS IN A PIC MICROCONTROLLER
ARE BIDIRECTIONAL PORTS
INITIALIZE PORT BY SETTING ( LOGIC 1 )
THOSE PORT TO MAKE IT AS OUTPUT
INITIALIZED PORT BY CLEARING ( LOGIC 0
)
THOSE PORT TO MAKE IT AS INPUT
PIC Architecture
PIC Memory Map
PIC 16F648A Pin Assignments
PIC Instruction Sets
PIC Instruction Sets
PROGRAMMING A MICROCONTROLLER
C Source File
Assembly
Language File
C Compiler/Linker
Assembler/Linker
Device Programmer
PROGRAMMING PIC MICROCONTROLLER
PROGRAMMING TOOLS FOR
PIC MICROCONTROLLER
MPLAB IDE (Software)
Free software used to develop PIC programs
PIC BURNER ( Hardware )
Hardware to transfer HEX file in PIC IC
Programming PIC IC
Getting Started with PIC Programming
Download an MPLAB IDE
@ http://microchip.com
This is the program you download to your PC to get
started with writing your first program
Integrated Development Environment
Free integrated software tool set for developing
and troubleshooting programs for embedded
applications using PICs
Easily integrates with 3rd party software such as
high level language compilers
Programming PIC IC
Getting Started with PIC Programming
Programmer which you can burn or
write your program in a PIC IC
Example PIC circuit diagram
LED Blinking
Port B ( RB7 - RB0 ) is used as output
To Initialized PORT B as an OUTPUT, TrisB must
be cleared ( setting the value of TrisB to zero )
Write your main Program
The objective is to alternate the turning ON/OFF the light a
data that corresponds to this action is necessary.
Writing a Delay Program
In order to view the LED blinking a delay is necessary,
because microcontroller execute instruction of about
microseconds
Delay
Delay
STEPS IN PIC PROGRAMMING
1. Write your program using MPLAB
-IDE
2. Compile your program
3. Transfer your program using PIC
burner
4. Insert your PIC in your circuit board
5.
Debug your program, if never works
6.
Repeat again the Steps until you
meet the
Required output.
Learn by Doing
Excel Thru Experimentation
Lead by Example
Thank You!!!