Microcontroller & 8051
Microcontroller & 8051
Memory organization
3
Microcontroller Architectures
Microcontroller architecture refers to the internal hardware
organization of a microcontroller
4
Some Microcontroller Producers
Texas Instruments
Microchip
Silicon Labs
Intel Corporation
Analog Devices
Atmel Corporation
Dallas Semiconductor
Fujitsu Semiconductor Europe
National Semiconductor
STMicroelectronics
ZiLog
Freescale Semiconductor
Infineon Technologies
5
The 8051 Microcontroller—A Brief History
In 1980, Intel introduced the 8051, relevant today after more
than two decades
First device in the MCS-51® family of 8-bit microcontrollers
In addition to Intel there are other second source suppliers
of the ICs, who make microcontrollers that are compatible
with the 8051 architecture.
In recent years some companies have incorporated many
different and additional features into 8051
In 2000, Silicon Laboratories introduced a field
programmable, mixed-signal chip (C8051F020) based on
the 8051 core CPU
6
Is 8-bit Still Relevant?
“n-bit” – the “n” refers to the data bus width of the CPU, and
is the maximum width of data it can handle at a time
PCs with 64-bit microprocessors are becoming common
Over 55% of all processors sold per year are 8-bit
processors, which comes to over 3 billion of them per year!*
8-bit microcontrollers are sufficient and cost-effective for
many embedded applications
More and more advanced features and peripherals are
added to 8-bit processors by various vendors
8-bit MCUs are well-suited for low-power applications that
use batteries
7
Example System: RC Car
Antenna Antenna
Front Electric
Forward RF RF Receiver Microcontroller
Microcontroller Motor (Left/Right)
Transmitter
Reverse
8
Block Diagram of the Original 8051
/INT0 /INT1 T0 T1
Other
interrupts
8051 CPU
From Crystal
Oscillator or RC ALE /PSEN P3 P2 P1 P0 TxD RxD
network (Address/data)
9
Harvard and von Neumann Architectures
Harvard Architecture—a type of computer architecture
where the instructions (program code) and data are stored
in separate memory spaces
Example: Intel 8051 architecture
10
MCU Fetch-Execute Cycle
Fetch operation—retrieves
an instruction from the Program
Counter
location in code memory (PC)
pointed to by the program
counter (PC)
+
F
Execute operation— Code Memory
e
t
executes the instruction c
that was fetched during the h
11
8051 and 8052
The feature set of the 8052 is the superset of the 8051
12
C8051F020 Data Memory (RAM)
Internal Data Memory space is
divided into three sections
Lower 128
Upper 128
Special function register (SFR)
13
Lower 128—Register Banks and RAM
General
Purpose RAM
(80 bytes)
Bit-addressable
Area (16 bytes)
Register Banks
(8 bytes per
bank; 4 banks)
14
Special Function Registers (SFRs)
15
Summary of SFRs
Accumulator (ACC) and B register
ACC (also referred to as A) is used implicitly by several instructions
B is used implicitly in multiply and divide operations
These registers are the input/output of the arithmetic and logic unit (ALU)
Stack pointer—SP
Data pointer—DPTR (DPH and DPL)
16-bit register used to access external code or data memory