You are on page 1of 34

BEJ30203 MICROPROCESSOR

AND MICROCONTROLLER

Chapter 1 – Introduction to
Microprocessor and Microcontroller

Dr. Chessda Uttraphan, PhD


Faculty of Electrical and Electronic Engineering
Universiti Tun Hussein Onn Malaysia
Overview of a Processor

RISC and CISC Architecture

Microprocessor Systems

Chapter Outline
Chapter 1: Introduction to Microprocessor vs. Microcontroller
Microprocessor and Microcontroller
Microprocessor Overview

A microprocessor (abbreviated µP) is a programmable digital


electronic component that incorporates the functions of a central
processing unit (CPU) on a single semiconducting integrated circuit
(IC)

© C. Uttraphan
Microprocessor Overview

The microprocessor is one of the unsung heroes of the modern era. Like
the car designer whose vehicle gives the racing driver glory, the
microprocessor makes quite incredible things possible all over the
world. Each year we benefit from faster and more efficient performance
which improves not just computing, but also numerous fields from
retail and industry to agriculture and vehicle safety. This year, the
humble microprocessor celebrates its 51st birthday. Since 1971, it has
become the brain of literally billions of devices - without the
microprocessor they would not have existed.

*Source: Intel
© C. Uttraphan
Evolution of Microprocessor

Busicom Calculator Washing machine


The Unicom 141P calculator The first microchip-controlled
was one of the very first washing machines come onto
devices to feature a the market, showing the
microprocessor. Computing as diverse usages of the new
we know is started here…. technology
1971 1978

1977
Commodore PET
The PET is widely
acknowledged as the first
all-in-one home computer

*Source: Intel
© C. Uttraphan
Evolution of Microprocessor

Arcade mania
Nintendo NES
Namco introduced Pac-
The gaming industry was
Man in the arcade of the
revitalised by consoles such as
US and sparked a huge
Nintendo Entertainment
craze
System

1980 1986

1981
Osborne 1 Laptop
With a 5” screen, and weighing
10.7kg, it really was the ‘great’
grandfather of modern laptops

*Source: Intel
© C. Uttraphan
Evolution of Microprocessor

Computing democratised Blackberry


Business and personal The smartphone revolution
computing exploded with a kicked off when RIM
wide range of desktops, introduce the blackberry 850
laptops and even early tablets

1991 1999

1997
MP3 Player
The way we listen to music was
forever changed in the late 1990s
with the first MP3 player

*Source: Intel
© C. Uttraphan
Evolution of Microprocessor

Apple iPod Netbook


The iPod was released, and Netbooks were introduced as a small
the feature of MP3 as the and lightweight devices for
music format of choice is set completing simple tasks and viewing
in stone media and Internet content on the go

2001 2008

2002
Microsoft Windows Tablet
Almost a decade before the
consumer obsession with tablets,
businesses were using them for
more functional tasks
*Source: Intel
© C. Uttraphan
Evolution of Microprocessor

Apple iPad Digital Signage


Tablet hit the consumer Digital signage is one of the vast number of
mainstream with the new uses for the microprocessor. Intelligent,
launch of the iPad Internet-connected devices are increasingly
found in everyday life, from industry and retail
to agriculture and vehicles

2010 2012

2011
Ultrabook
The evolution of PC takes
another big step as a stylish
Ultrabook devices push forward
mobile, high performance
computing
*Source: Intel
© C. Uttraphan
Evolution of Microprocessor

Artificial Intelligence
The microprocessor is the
core of machine learning!

2021 –

© C. Uttraphan
RISC and CISC Architecture

• There are two types of microprocessor architecture (Instruction Set


Architecture or ISA).

(1) CISC – Complex Instruction Set Computer


(2) RISC – Reduced Instruction Set Computer

• ISA is a medium whereby a processor communicates with the human


programmer (although there are several other formally identified layers in
between the processor and the programmer).

• An instruction is a command given to the processor to perform an action. An


instruction set is the entire collection of instructions for a given processor, and
the term architecture implies a particular way of building the system that
makes the processor.
© C. Uttraphan
RISC and CISC Architecture (Cont..)
CISC RISC
- The original microprocessor ISA - Redesigned ISA that immerged in
the early 1980s
- Instruction can take several clock - Instruction takes less clock cycles.
cycles
- The number of clock cycle to - Most of the instructions take the
execute each instruction can vary same number of clock cycles to
- In other words, complex and execute
variable length instructions - Simple, standardize instructions

- Hardware-centric design - Software-centric design


- The ISA does as much as possible - Less hardware complexity
using hardware circuitry, hence,
complicated and expensive
hardware
- Large number of instructions - Small number of instructions
- Compound addressing modes - Limited addressing modes
© C. Uttraphan
RISC and CISC Architecture (Cont..)

• The RISC philosophy concentrates on reducing the complexity of instructions


performed by the hardware because it is easier to provide greater flexibility and
intelligence in software rather than hardware. Hence, a RISC design places
greater demands on the compiler.
• The CISC relies more on the hardware for instruction functionality, and
consequently the CISC instructions are more complicated.

© C. Uttraphan
RISC and CISC Architecture (Cont..)

RISC Philosophy
• Instructions - RISC processors have a reduced number of instruction classes.
These classes provide simple operations that can each execute in a single cycle.
The compiler or programmer synthesizes complicated operations (for example,
a divide operation) by combining several simple instructions. The CISC relies
more on the hardware for instruction functionality, and consequently the CISC
instructions are more complicated.
• Pipelines - The processing of instructions is broken down into smaller units that
can be executed in parallel by pipelines. Ideally the pipeline advances by one
step on each cycle for maximum throughput. Instructions can be decoded in
one pipeline stage. There is no need for an instruction to be executed by a mini-
program called microcode as on CISC processors.

© C. Uttraphan
RISC and CISC Architecture (Cont..)

RISC Philosophy
• Registers - RISC machines have a large general-purpose register set. Any
register can contain either data or an address. Registers act as the fast local
memory store for all data processing operations. In contrast, CISC processors
have dedicated registers for specific purposes.
• Load-store architecture - The processor operates on data held in registers.
Separate load and store instructions transfer data between the register bank
and external memory. Memory accesses are costly, so separating memory
accesses from data processing provides an advantage because you can use
data items held in the register bank multiple times without needing multiple
memory accesses. In contrast, with a CISC design the data processing
operations can act on memory directly.

© C. Uttraphan
Microprocessor Systems

Basic microprocessor system consist of a Central processing unit (CPU),


memory (RAM and ROM), input/output (I/O) unit.

Address bus

ROM RAM I/O I/O


CPU interface devices

Data bus Control


bus

© C. Uttraphan
Microprocessor System (Cont..)
Device Function

CPU Master CONTROLLER to execute (process) info stored in memory.


Memory 2 types of memory (Primary memory)

RAM (Random Access Memory) ROM (Read Only Memory)

• Read/write process • Read only


• Temporary storage of program • Information in ROM is
• The data lost when the permanent (cannot be changed
computer is turned off (volatile by the user)
memory). • Not lost when the power is
turned off (Non-volatile
memory).

I/O Ex: keyboard and video monitor

© C. Uttraphan
Microprocessor System (Cont..)

▪ A program stored in memory provides


instructions to the CPU to perform an action (ex.
Control robot, adding data)
▪ CPU fetch these instructions from memory and
execute it.
▪ To perform the actions of fetch and execute, all
CPU are equipped with resources as follows:

© C. Uttraphan
Microprocessor System (Cont..)
Registers
• Used to store data temporarily.
• Can be 8-bit, 16-bit, 32-bit and 64-bit registers (depending on the CPU. The
bigger the better but increase the CPU cost).
ALU (Arithmetic Logic Unit)
• Perform arithmetic functions – add, subtract, multiply and divide Logic function:
AND, OR, NOT
Program counter
• To point to the address of the next instruction to be executed.

Instruction decoder
• Interpret the instruction fetched into the CPU. Storing the meaning of each
instruction and what steps the CPU should taken upon receiving a given
instruction.
© C. Uttraphan
Microprocessor System (Cont..)

CPU connected to memory and I/O through bus.

Address bus: → single direction (1 way) bus


→ transfer the address data
code to memory or devices
Data bus: → bidirectional (2 ways) bus
→ transfer data to/ from the CPU
Control bus: → Control all the activities of the
elements

© C. Uttraphan
Microcontroller

• Integrated chip that contains CPU, RAM,


some form of ROM, I/O ports, and
timers

• Designed for a very


specific task to control a
particular system
• Reduce production cost

© C. Uttraphan
Microcontroller (Cont…)

© C. Uttraphan
Microprocessor vs Microcontroller

Microcontroller Microprocessor
Devices Microchip’s PIC’s Intel’s x86 family (8086,
series, Atmel’s AVR 80286, 80386, 80486 &
series, ARM M Series the Pentium) or
(Motorola’s PowerPC
family), ARM A Series
Components Internal CPU, RAM, External RAM, ROM, and
ROM, I/O ports and I/O ports
timers
Application Perform specific Perform more tasks that
function: A small set of related to general
signal processing requirements: calculations
functions for digital of software, personal
signal processor computer
© C. Uttraphan
Microprocessor vs Microcontroller (Cont..)

CPU / μP
μC
CPU / μP DATA BUS

Register ALU Register ALU


Serial
RAM ROM I/O Timer COM

Control Unit

Control Unit ADDRESS BUS

CONTROL BUS

© C. Uttraphan
ARM® Processor core

ARM® is the industry's leading


supplier of microprocessor
technology, offering the widest
range of microprocessor cores
to address the performance,
power and cost requirements
for almost all application
markets.

© C. Uttraphan
ARM® Processor core

▪ Combining a vibrant ecosystem with over 1000 partners delivering silicon,


development tools and software, more than 30 billion processors sold with
more than 16M sold every day.
▪ ARM founded in November 1990
▪ Advanced RISC Machines

▪ Company headquarters in Cambridge, UK


▪ Processor design centers in Cambridge, Austin, and Sophia Antipolis
▪ Sales, support, and engineering offices all over the world

▪ Best known for its range of RISC processor cores designs


▪ Other products – fabric IP, software tools, models, cell libraries - to help partners
develop and ship ARM-based SoCs

▪ ARM does not manufacture silicon

© C. Uttraphan
ARM Offices Worldwide

© C. Uttraphan
ARM Partners

© C. Uttraphan
ARM Profile
▪ Application profile (Cortex-A)
▪ Memory management support (MMU)
▪ Highest performance at low power
▪ Influenced by multi-tasking OS system requirements
▪ TrustZone and Jazelle-RCT for a safe, extensible system
▪ e.g. Cortex-A5, Cortex-A9, Cortex-A76, Cortex-A78

▪ Real-time profile (Cortex-R)


▪ Protected memory (MPU)
▪ Low latency and predictability ‘real-time’ needs
▪ Evolutionary path for traditional embedded business
▪ e.g. Cortex-R4

▪ Microcontroller profile (Cortex-M)


▪ Lowest gate count entry point
▪ Deterministic and predictable behavior a key priority
▪ Deeply embedded use
▪ e.g. Cortex-M3 © C. Uttraphan
ARM Profile
Cortex-A Series Processors
High Performance Processors
▪ Optimized for Open Operating Systems –(Linux, Android…)
▪ Offers Single and Multicore Architectures
64-bit 32-bit
▪ Multimedia Processing Ability
Year Core Year Core
▪ Advanced Floating Point Execution Ability
2012 Cortex-A53 2005 Cortex-A8
2012 Cortex-A57 2007 Cortex-A9
Example: 2015 Cortex-A35 2009 Cortex-A5
▪ Smartphones 2015 Cortex-A72 2010 Cortex-A15
▪ Smartbooks and Netbooks 2016 Cortex-A34 2011 Cortex-A7
▪ Ebooks/E-Readers 2016 Cortex-A73 2013 Cortex-A12
▪ Digital TV/Signage/Set Top Boxes 2017 Cortex-A55 2014 Cortex-A17
▪ Gaming 2017 Cortex-A75 2016 Cortex-A32
▪ Kiosks/Point of Sale/User Interfaces 2018 Cortex-A76
2018 Cortex-A65AE
▪ Industrial Automation
2018 Cortex-A76AE
▪ Medical/Healthcare/Fitness
2019 Cortex-A77
▪ Printers 2020 Cortex-A78
© C. Uttraphan
ARM Profile
Cortex-R Series Processors
Cortex-R, R for Real-time, used with a need for low power, timing critical, robust
industrial/automotive grade processing with built in redundancies for safety.

Application includes:
▪ Industrial Automation
▪ Safe PLCs (Programmable Logic Controllers)
▪ Power Generation/Distribution
▪ Medical/Health
64-bit 32-bit
▪ Motor Controls Year Core Year Core
2020 Cortex-R82(F) 2011 Cortex-R4(F)
2011 Cortex-R5(F)
2011 Cortex-R7(F)
2016 Cortex-R8(F)
2016 Cortex-R52(F)

© C. Uttraphan
ARM Profile
Cortex-M Series Processors
High Performance 32-Bit computing. Balances reduced power
consumption, processing power and cost effectiveness to compete
directly with and upgrade from legacy 8-bit and 16-bit microcontrollers.
32-bit
▪ Small Footprints Year Core
▪ Low Power/Sleep Optimized 2004 Cortex-M3
▪ Clock Speeds 16 – 180Mhz 2007 Cortex-M1
▪ Operating Temps from Consumer to Industrial/Automotive 2009 Cortex-M0
Grade 2010 Cortex-M4
▪ Various Connectivity options including Automotive CAN bus 2012 Cortex-M0+
available.
2014 Cortex-M7
2016 Cortex-M23
Applications include: 2016 Cortex-M33
▪ Microcontrollers 2018 Cortex-M35P
▪ Smart Sensing 2020 Cortex-M55
▪ Mixed Signals
▪ Automotive Sensors/Systems
© C. Uttraphan
ARM Processors (Application)

© C. Uttraphan
Exercise

1. Explain the differences between the RISC and CISC microprocessors.


2. ARM processor has how many profiles?
3. Explain the differences between microprocessor and microcontroller.
4. Using the smallest data size possible, either a byte, a halfword (16 bits), or a
word (32 bits), convert the following values into two’s complement
representations:
a. -18304 b. -20 c. 144 d. -128 e. -129
5. Indicate whether each value could be represented by a byte, a halfword, or a
word-length two’s complement representation:
a. -32765 b. 254 c. -1000000 d. -128
6. If the hexadecimal value 0xFFE3 is a two’s complement, halfword value, what
would it be in base ten? What if it were a word-length value (i.e., 32 bits long)?
© C. Uttraphan

You might also like