3. Introduction
●The microprocessor also known as the central processing
unit, is the brain of all computers and many household and
electronic devices. Multiple microprocessors, working
together, are the "hearts" ofdatacenters, super-computers,
communications products, and other digital devices.
4. History
●Fairchild Semiconductors (founded in 1957) invented the first IC
in 1959.
●In 1968, Robert Noyce, Gordan Moore, Andrew Grove
resigned from Fairchild Semiconductors.
●They founded their own company Intel (Integrated Electronics).
●The first microprocessor invented wasof 4-bit, after that 8-
bit,16-bit,.32-bit &64-bit are founded
11. Microprocessor Architecture
●The MPUcommunicates with Memory and I/O using the
System Bus
●Address bus
●Unidirectional
●Memoryand I/O Addresses
●Data bus
●Bidirectional
●TransfersBinaryData and Instructions
●Control lines
●Read and Write timingsignals
330_01
12. Microprocessor – Basic concept
CPU
contains
CCU
ALU
data registers
and
pointer registers
ADDRESS BUS
32-bit / 64-bit wide
CONTROL BUS
Timing signals, ready signals,
interrupts etc
DATA BUS – bidirectional
8-bit / 16-bit / 32-bit / 128-bit
Microprocessor, by-itself, completely useless – must have external peripherals to
Interact with outside world
15. History of Microcontroller
●First used in 1975(Intel 8048)
●The introduction of EEPROMin 1993, allowed
microcontrollersto be electricallyerased
●The same year,Atmel introduced the first microcontroller using
Flash memory.
18. Basic Features of Microcontroller
●Processor reset
●Device clocking
●Central processor
●Programand V
ariable Memory(RAM)
●I/O pins
●Instruction cycle timers
19. More Sophisticated Features
●Built-in monitor/ debugger program
●Interrupt capability
●Analog I/ O (PWMand variable dc I/ O
●Serial I/ O (synchronous, asynchronous)
●Parallel I/O (including direct interface to amaster processor
●External memoryinterface
21. Basic microcontroller architecture (2/3)
●Memory
●RAM
●ROM
●Store data and code
●CPU
●Mathematical and logical operation
●Memoryunitsare called Register
22. Basic microcontroller architecture (3/3)
• BUS
– Group of8,16 or more wires
– Three type, addressbus, data busand control bus
• Input-output unit
– port A, port B, port C … …
– Input, output and bidirectional ports
• Serial communication
• Timer unit
• Watchdog
– Automatic reset to prevent stall
• Analogto Digital Converter (ADC)
23. Processor Architecture
●CISC
➢Large amount of instructions each carrying out adifferent
permutation ofthe same operation
➢Functionality of the instructions is more dependent
upon the processor’sdesigner.
●RISC
➢Fundamental set ofinstructions
➢More control for users to design their own operations
31. Memory
●The memory in a computer system stores the data and
instructions of the programs.
Adress
decoder Storage
Area
Adress
bus
Data
bus
Other signals
(Vcc,Gnd, CS,
etc.)
33. I/O Space
- Memory Mapped I/O Versus Programmed I/O
●Programmed I/O
Specialinstructions such asIN and OUT are used to transfer
data between aCPU register and an external device.
●MemoryMapped I/O
Standard instructionsare used to transfer data between aCPU
register and an external device.
I/O ports appear as memoryaddresses.
35. Instruction support for interrupts
●Processors provide two instructions, enable priority
interrupt (EPI) and for disable priority interrupt (DPI).
●These are atomic instructions that are used for many
purposes, suchasbuffering, within interrupt handlers, and
for parameter passing.
36. Internal CPU handling of interrupts
Step 1: finish the currently executing macroinstruction. Step 2: save the contents of the
program counter to the interrupt return location. Step 3: load the address held in the
interrupt handler location into the program counter. Resume the fetch and execute
sequence.
Single interrupt support
37. Internal CPU handling of interrupts
Step 1: complete the currently executing instruction. Step 2: save the contents of PC to
interrupt return location i. Step 3: load the address held in interrupt handler location i into the
PC. Resume the fetch-execute cycle.
Multiple interrupt support
38. Interruptible instructions
●In rare instances individuation macroinstruction may need to be
interruptible.
●This might be the case where the instruction takes agreat deal of
time to complete. E.g. amemory to memory instruction that
moves large amounts ofdata.
●In most cases, such an instruction should be interruptible between
blocksto reduce interrupt latency. However, interrupting this
particular instruction could cause data integrity problems.
39. Advantages of Microcontroller over
Microprocessor
●Pin count down
●Design time down, Board layout size down
●Upgrade path easier – matching between peripherals for speed
●Cost down – bulk purchases
●Reliability up
●Common software / hardware design environment available
from manufacturer
40. Issues when using microcontroller
● Twotypesofm
em
ory–speedissueswhenusing
●On-chip – fast, easyto access, “almostlikearegister”, limited amount ofon-chip
memory available
●Off-chip – slower
●Use on-chip memory in a“cache”mode (copy off-chip data to on-chip when
processingdata, then copyback)
● External com
ponentsstill there
●E.g. VideoCODECs – need to use DMA– Direct MemoryAccess – so that the
controller can get on with the “processing”and let something else worry about
movingdatain and out ofthe chip
● Real tim
eenvironm
ent
●Event driven – can’t WAITfor adevice to become ready, can’t POLLto see if
device is ready, interrupt handling is key
● All these resources are “power hungry”and compete for resources (data busses
etc) – special features
41. Difference between
microprocessor & microcontroller
Microprocessor Microcontroller
Contains ALU, general purpose register, stack
pointer, programme counter, clock timing &
interrupt circuit
It hastoo manyinstructionsto move the data
between CPU &memory
It hasone or two bit handlinginstruction
Access time for memory &I/O devices ismore
Microprocessor based systemrequires more
hardware
More flexible in design point of view
It hassingle memory map for data&code
Less number ofpins are malfunctioned
Contains the circuitary of microprocessor &in
addition it hasbuilt in ROM, I/ O devices,
timer &counter
It hasone or two instruction to move the data
between CPU &memory
It hasmanybit handlinginstruction
Less accesstime for built in memory&I/O
devices
Microcontroller based systemrequires less
hardware, reducingPCBsize &increasing the
reliability
Less flexible in design point of view
It has separate memory map for data &code
More number of pinsare malfunctioned