2. What is an EmbeddedSystem?
Application-specific systems which contain hardware and
software tailored for a particular task and are generally part of
a larger system.
Characteristics
Are dedicated to a particular application.
Include processors dedicated to specific functions.
Represent a subset of reactive (responsive to external inputs)
systems.
Contain real-time constraints.
3. EmbeddedSystems Applications
Aerospace Navigation systems, automatic landing systems, flight
attitude controls, engine controls, space exploration
(e.g.. The mars pathfinder)
Automotive Fuel injection control, passenger environmental
controls, anti-locking braking systems, air bag controls,
GPS mapping, cruise control
Children's toys Video games, MindStone system
Communication Satellites, network routers, switches, hubs
4. Computer Peripherals Printers, scanners, keyboards, displays, modems,
hard disk drives, CD-ROM drives, USB
Home Dishwashers, microwave ovens, VCR’s, DVD,
televisions, stereos, fire/security alarm systems,
lawn sprinkler controls, thermostats, digital
cameras, clock radios, cell phones
Industrial Elevator controls, surveillance systems, robots
Instrumentation Data collection, oscilloscopes, signal generators,
signal analyzers, power supplies
EmbeddedSystems Applications
5. Medical CT, One touch glucose meter, almost all medical
facility
Office Automation FAX machines, copiers, telephones,
Personal PDA’s, pagers, cell phones, video games, Ipod, MP3
players
EmbeddedSystems Applications
6. Essential Components
Essential components :-
- Microcontroller / DSP core
- Sensors
- Converter ( A-D and D-A )
- Actuators
- Memory (on-chip and off-chip )
- Communication path with interfacing environment
7. Why do we need to learn Microcontrollers ?
• Its not an exaggeration if I say that ,today there is no
electronic gadget on the earth which is designed without
a Microcontroller. Ex: communication devices, digital
entertainment, portable devices etc…
Not believable ??? See the next slide
8. • Personal information products: Cell phone, pager, watch, pocket
recorder, calculator
• Laptop components: mouse, keyboard, modem, fax card, sound
card, battery charger
• Home appliances: door lock, alarm clock, thermostat, air
conditioner, TV remote, VCR, small refrigerator, exercise
equipment, washer/dryer, microwave oven
• Industrial equipment: Temperature/pressure controllers,
Counters, timers, RPM Controllers
• Toys: video games, cars, dolls, etc.
9. So, A good designer should always know
what type of controller he/she is using ,their
architecture, advantages , disadvantages , ways
to reduce production costs and product
reliability etc….
10. Then What is a Microcontroller ?
• A smaller computer
• On-chip RAM, ROM, I/O ports...
• Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC
16X
RAM ROM
I/O
Port
Timer
Serial
COM
Port
CPU
A single chip
Microcontroller
11. How is it different from a
Microprocessor ??
CPU for Computers
No RAM, ROM, I/O on CPU chip itself
Example:Intel’s x86, Motorola’s 680x0
CPU
General-
Purpose
Micro-
processor
RAM ROM I/O
Port
Timer
Serial
COM
Port
Data Bus
Address Bus
12. Microprocessor
CPU is stand-alone, RAM,
ROM, I/O, timer are separate
designer can decide on the
amount of ROM, RAM and
I/O ports.
expansive
versatility
general-purpose
Microcontroller
• CPU, RAM, ROM, I/O and
timer are all on a single chip
• fix amount of on-chip ROM,
RAM, I/O ports
• Highly bit addressable
• for applications in which cost,
power and space are critical
• single-purpose
Microprocessor vs. Microcontroller
13. EVOLUTION
Flashback !!!!
In the year 1976, Motorola created a Microprocessor chip called 6801
which replaced its brother 6800 with certain add-on chips to make
a computer. This paved the way for the new revolution in the history
of chip design and gave birth to a new entity called
MICROCONTROLLER.
The INTEL bagged the credit of producing the first Microcontroller
8048 with a CPU and 1K bytes of EPROM, 64 Bytes of RAM an 8-Bit
Timer and 27 I/O pins in 1976.
14. Evolution contd…
• Then followed the most popular controller 8051 in the year 1980
with 4K bytes of ROM,128 Bytes of RAM , a serial port, two 16-bit
Timers , and 32 I/O pins.
• The 8051 family has many additions and improvements over the
years and remains a most soughtafter tool for todays circuit
designers.
• The same INTEL introduced a 16 bit controller 8096 in the year
1982
15. • Later INTEL introduced 80c196 series of 16-bit
microcontrollers for mainly industrial applications
• Microchip, another company has introduced a
microcontroller PIC 16C64 an 8-bit in the year 1985.
• 32-bit microcontrollers have been developed by IBM and
Motorola-MPC 505 is a 32-bit RISC controller of Motorola
• The 403 GA is a 32 -bit RISC embedded controller of IBM
16. ARM Controllers
• In recent times ARM company (Advanced Risc machines) has
developed and introduced 32 bit controllers which are highend
application devices,especially communication devices like mobiles ,
ipods etc..(Refer www.arm.com)
21. Important Features of 8051
• 4K bytes ROM
• 128 bytes RAM
• Four 8-bit I/O ports
• Two 16-bit timers
• Serial interface
• 64K external code memory space
• 64K data memory space
22. “Original” 8051 Microcontroller
Oscillator
and timing
4096 Bytes
Program Memory
(ROM)
128 Bytes
Data Memory
(RAM)
Two 16 Bit
Timer/Event
Counters
8051
CPU
64 K Byte Bus
Expansion
Control
Programmable
I/O
Programmable
Serial Port Full
Duplex UART
Synchronous Shifter
Internal data bus
External interrupts
subsystem interrupts
Control Parallel ports
Address Data Bus
I/O pins
Serial Input
Serial Output
23. Pin Description of the 8051
• The 8051 is a 40 pin
device, but out of these 40
pins, 32 are used for I/O.
• 24 of these are dual
purpose, i.e. they can
operate as I/O or a control
line or as part of address
or date bus.
24. Inside Architecture of 8051
24
CPU
On-chip
RAM
On-chip
ROM for
program
code
4 I/O Ports
Timer 0
Serial
Port
Inside the 8051 Microcontroller Block Diagram
OSC
Interrupt
Control
External interrupts
Timer 1
Timer/Counter
Bus
Control
TxD RxDP0 P1 P2 P3
Address/Data
Counter
Inputs
26. Three criteria in Choosing a Microcontroller
Meeting the computing needs of the task efficiently and cost
effectively.
• Speed, the amount of ROM and RAM, the number of I/O
ports and timers, size, packaging, power consumption.
• Easy to upgrade.
• Cost per unit.
Availability of software development tools.
• Assemblers, debuggers, C compilers, emulator, simulator,
technical support.
Wide availability and reliable sources of the microcontrollers.
26
32. Advantages
It is a ‘mid-level’, with ‘high-level’ features (such as
support for functions and modules), and ‘low-level’
features (such as good access to hardware via pointers)
C is the most common Embedded language 85%, of
embedded applications are coded in C.
It directly manipulates the hardware and memory
addresses.
Cx51 Cross compiler supports all of the ANSI Standard C
directives.
32
33. Data Types
Data types Bits Bytes Value range
• Bit 1 0 to 1
• Signed char 8 1 -128 to +127
• Unsigned char 8 1 0 to 255
• Signed short 16 2 -32768 to +32767
• Unsigned short 16 2 0 to 65535
• Signed int 16 2 -32768 to +32767
• Unsigned int 16 2 0 to 65535
• Signed long 32 4 -2147483648 to 2147483647
• Unsigned long 32 4 0 to 4294967295
• Float 32 4 ±1.175494E-38 to
±3.402823E+38
• sbit 1 0 to 1
• sfr 8 1 0 to 255
33
34. 8051 Memory Areas
• The 8051 architecture supports a number of
physically separate memory areas for program and data.
Each memory area offers certain advantages and
disadvantages.
Program Memory code
Internal Data memory bdata, data, idata
External Data memory xdata, pdata
34
35. 35
code: Program memory (64 Kbytes); accessed by opcode
MOVC A, @A+DPTR.
data: Directly addressable internal data memory; fastest
access to full internal address space (256 bytes).
idata: Indirectly addressable internal data memory; accessed
across the internal address space (128 bytes).
bdata: Bit-addressable internal data memory; allows mixed bit
and byte access (16 bytes).
xdata: External data memory (64 Kbytes); accessed by opcode
MOVX @DPTR.
pdata: Paged (256 bytes) external data memory; accessed by
opcode . MOVX @Rn.
Explicitly declaredMemorytypes
36. 36
Memory models
The memory model determines which default memory type to
use for automatic variables, and declarations with no explicit
memory type specifier.
If the memory type specifier is omitted in a variable
declaration, the default or implicit memory type is
automatically selected.
Automatic variables which cannot be located in registers are
also stored in the default memory area.
The default memory type is determined by the SMALL,
COMPACT and LARGE compiler control directives.
37. Small Model: Internal RAM128 bytes
All variables, by default, reside in the internal data memory
of the 8051 system.
It is the same as if they were declared explicitly using the
data memory --type specifier.
Variable access is very efficient. Stack size is critical because
the real stack size depends upon the nesting depth of the
various functions.
Using this memory model, the number of global variables
must be kept to a minimum to allow. However the amount of
space required for the stack must be kept in mind.
37
38. Compact Model: RAM256bytes off-chip
All variables, by default, reside in one page of external
data memory.
It is as if they were explicitly declared using the pdata
memory type specifier. This memory model can
accommodate a maximum of 256 bytes of variables. The
limitation is due to the addressing scheme used, which is
indirect through registers R0 and R1 (@R0, @R1.
38
39. Compact Model: RAM256bytes off-chip
The compact model is rarely used for an entire
program, but more
usual in combination with the SMALL switch
reserved for interrupt routines.
COMPACT is especially useful for programs with
a large number of
medium speed 8 bit variables.
39
40. Large Model: Total RAMup to 64KB
In this model, all variables, by default, reside in external
data memory (up to 64 Kbytes).
It is the same as if they were explicitly declared using the
xdata memory type specifier.
Memory access through this data pointer is inefficient,
especially on variables with a length of two or more bytes.
This type of data access mechanism generates more code
than the small or compact models, Permits slow access to a
very large memory space .
40
43. What is a Keypad ?
Collection of keys interfaced to
the microcontroller
Arranged in the form of two
dimensional matrix
Matrix arrangement used for
minimizing the number of port
lines
Junction of each row and
column forms the key