You are on page 1of 35

I.

Introduction to
Microcontrollers

1.1 What is a microprocessor?


1.1 What is a microprocessor?

The microprocessor is the integration of a


number of useful functions into a single IC
package. These functions are:
 Ability to execute a stored set of
instructions to carry out user defined tasks.
 Ability to be able to access external
memory chips to both read and write data
from and to the memory.
 Ability to interface with I/O devices
Block Diagram of a simple CPU
Why the name Microprocessor?

 splitting the word micro-processor into two


MICROis derived from a Greek word
Micros which means small (in size,
quantity, number and dignity) and
Processor is the logic circuitry that
responds to and processes the basic
instructions.
History of Microprocessors
 was first invented by the scientists Gordan Moore and
Robert Noyce in 1968 (from Fairchild Semiconductor
Company and start up "Intel")
 Marcian Edward "Ted" Hoff, a young scientist at Intel,
was assigned to work with minicomputers and in June,
1968. Join a group of Japanese engineers from a
company called Busicom. They'd approached Intel with a
design for a small calculator.
 Hoff felt that programming through read-only memory
and general-purpose registers could replace the
separate (i.e., discrete) components the Busicom
engineers had requested.
 Frederico Faggin, took him 9 months to turn Hoff's ideas
into hardware.
Development of some of the microprocessors

Intel 4004 4 bit (2300 PMOS transistors) 1971


Intel 8080 8 bit (NMOS)
1974
8085 8 bit
Intel 8088 16 bit
1978
8086 16 bit
Intel 80186 16 bit
1982
80286 16 bit
Intel 80386 32 bit (275000 transistors) 1985
Intel 80486 SX 32 bit
1989
DX 32 bit (built in floating point unit)
Intel 80586 I
1993
MMX
1997
Celeron II 64 bit
1999
III
2000
IV
Z-80 (Zilog) 8 bit 1976
Motorola Power PC 601
32-bit 1993
602
1995
I. Introduction to
Microcontrollers

1.2 What is a microcontroller?


1.2 What is a microcontroller?

 Basically, a device which integrates a


number of the components of a
microprocessor system onto a single chip
 Only need to be supplied power and
clocking
 Microcontroller combines on the same
chip:
 The CPU core
 Memory (both ROM and RAM)
 Some parallel digital I/O
Why the name micro
controller?
 splitting the word micro-controller into two
MICRO is derived from a Greek word
Micros which means small (in size,
quantity, number and dignity) and
Controller is the logic circuitry that does the
control action based on the program
written.
History of Microcontrollers
 The first computer system on a chip optimized for control
applications - microcontroller was the Intel 8048 released
in 1976, with both RAM and ROM on the same chip.
 Development of some popular microcontrollers

Intel 4004 4 bit (2300 PMOS trans, 108 kHz) 1971


Intel 8048 8 bit 1976
Intel 8031 8 bit (ROM-less) .
Intel 8051 8 bit (Mask ROM) 1980
Microchip PIC16C64 8 bit 1985
Motorola 68HC11 8 bit (on chip ADC) .
Intel 80C196 16 bit 1982
Atmel AT89C51 8 bit (Flash memory) .
Microchip PIC 16F877 8 bit (Flash memory + ADC) .
Most microcontrollers will also
combine other devices such as:
 A Timer module to allow the
microcontroller to perform tasks for certain
time periods.
 Serial I/O to allow data to flow between the
microcontroller and other devices such as
a PC or another microcontroller.
 An ADC to allow the microcontroller to
accept analogue input data for processing.
A typical microcontroller; the different sub
units integrated onto the microcontroller
chip.
I. Introduction to
Microcontrollers

1.3 Microprocessors versus


Microcontrollers
1.4 Some differences between
microprocessors and microcontrollers

 MP:
 suited
to processing information in
computer systems

 MC:
 suited
to control of I/O devices requiring
a minimum component count
1.4.1 Instruction sets:

 MP
 processing intensive
 powerful addressing modes
 instructions to perform complex
operations & manipulate large volumes
of data
 processing capability of MCs never
approaches those of MPs
 large instructions -- e.g., 80X86 7-byte
long instructions
… Instruction sets:

 MC
 cater to control of inputs and outputs
 instructions to set/clear bits
 boolean operations (AND, OR, XOR,
NOT, jump if a bit is set/cleared), etc.
 Extremely compact instructions, many
implemented in one byte

(Control program must often fit in the small,


on-chip ROM)
1.4.2 Hardware & Instruction set
support:
 MP:
 usually require external circuitry to do
similar things (e.g, 8255 PPI, 8254 PIT,
8259 PIC)
 MC:
 built-in I/O operations, event timing,
enabling & setting up priority levels for
interrupts caused by external stimuli
1.4.3 Bus widths:

 MP:
 very wide
 large memory address spaces (>4
Gbytes)
 lots of data (Data bus: 32, 64, 128 bits
wide)
 MC:
 narrow
 relatively small memory address spaces
(typically kBytes)
 less data (Data bus typically 8, 16 bits
wide)
1.4.4 Clock rates:

 MP
 very fast (> 1 GHz)

 MC
 Relatively slow (typically 10-20 MHz)
since most I/O devices being controlled
are relatively slow
1.4.5 Cost:

 MP
 expensive (often > $100)

 MCs
 cheap (often $1 - $10)
II. Computer
Architectures

Von Neumann vs. Harvard


1.0 Von Neumann vs. Harvard
 Princeton (Von Neumann) Architecture
 All memory space on same bus
 Every location has unique address
 So instructions and data treated the
same way
 Possible bottleneck between
instruction and data fetches
 Overcome with instruction prefetching
(overlapping, pipelining) and/or
Instruction/Data caches
1.0 Von Neumann vs. Harvard
 ..Princeton (Von Neumann) Architecture
 Simplifies processor design -- one
memory interface
 More reliable -- fewer things can fail
 Also RAM can be used for both data and
instruction storage
 Greater flexibility in design of software
(esp. real-time OS)
 PC (80X86/Pentium) uses this
architecture
1.0 Von Neumann vs. Harvard
 Harvard Architecture
 Code and data storage areas (address
spaces) on separate buses
 Potentially more efficient
 Instructions execute in fewer
cycles
 Greater instruction parallelism is
possible
 Instructions and data fetched
simultaneously (new instruction fetches
can occur during prior instruction
execution)
 Example: Microchip's PIC microcontroller
Pipelining
 is a technique used to increase the
instruction throughput (the number of
instructions that can be executed in a unit of
time).
CISC vs. RISC

 CISC (Complex Instruction Set Computers)


 Tend to have many instruction in
instruction set
 Can carry out complex operations
 (many used very infrequently)

 Many are very long (many bits)


 And require many clock cycles
 System/360, VAX, PDP-11, Motorola 68000
family, and Intel x86 architecture based
processors.
CISC vs. RISC

 RISC (Reduced Instruction Set Computer)


 Few instructions
 Simple instructions
 Short (few bits) and fast
 Often orthogonal instruction sets
 Can read/write/use all registers in same
way
 Allows for great power and flexibility

 Example: Alpha, ARC, ARM, AVR, MIPS,


PA-RISC, PIC, Power Architecture
(including PowerPC), SuperH, and SPARC
Microcoded versus Hardwired
processors
 Microcoded
 Processor within a processor
 Signals required to execute instructions
"fetched" from internal "Control ROM"
memory
 Allows for great flexibility in instruction
set
 Easier to design
 Slower than hardwired
Microcoded versus Hardwired
processors
 Hardwired

 Signals required to execute instruction


generated by logic gates (combinational
circuitry)
 The "control matrix"

 Faster
 Less flexible

You might also like