Professional Documents
Culture Documents
8051 Chap1 Introduction PDF
8051 Chap1 Introduction PDF
8051 Chap1 Introduction PDF
Microprocessing Systems
Lê Chí Thông
Ref. I. Scott Mackenzie, The 8051 Microcontroller
Objectives
sites.google.com/site/chithong 1
ĐH Bách Khoa TP.HCM Lê Chí Thông
Textbooks
Chapter 1
Introduction to Microcontrollers
sites.google.com/site/chithong 2
ĐH Bách Khoa TP.HCM Lê Chí Thông
These are …
embedded systems
Microprocessors
Control Unit
• Integrated ALU and CU (CU)
Data Bus
Many chips on mother’s board
CPU
General- Serial
Purpose RAM ROM I/O Timer Port
Micro- Port
processor
Address Bus
General-Purpose Microprocessor
Ref. I. Scott Mackenzie Lê Chí Thông System 6
sites.google.com/site/chithong 3
ĐH Bách Khoa TP.HCM Lê Chí Thông
Architecture of computers
Architecture of CPU
PC-
Program counter
sites.google.com/site/chithong 4
ĐH Bách Khoa TP.HCM Lê Chí Thông
Utilities
Booster loader,
BIOS
Keyboard, monitor
Other hardwires
sites.google.com/site/chithong 5
ĐH Bách Khoa TP.HCM Lê Chí Thông
Microcontrollers
• Integrates CPU, RAM, ROM, I/O ports, … on a
single chip
• Sometimes called a "computer on a chip"
• Typically used in embedded applications
• Example: Motorola’s 6811, Intel’s 8051, Zilog’s Z8
and PIC 16X
Microcontroller
Ref. I. Scott Mackenzie Lê Chí Thông 12
sites.google.com/site/chithong 6
ĐH Bách Khoa TP.HCM Lê Chí Thông
Microcontroller Architectures
Memory
0
Address Bus
Program
CPU Data Bus + Data Von Neumann
2n
Architecture
Memory
0
Address Bus
Program
CPU Fetch Bus Harvard
Address Bus 0
Architecture
Data Bus Data
Embedded System
• Embedded system: the processor is embedded into
that application.
• An embedded product usually uses a microcontroller
to do one task only.
• In an embedded system, there is only one application
software that is typically burned into ROM
sites.google.com/site/chithong 7
ĐH Bách Khoa TP.HCM Lê Chí Thông
Embedded System
Sensor conditioning
Output interfaces
sensor
actuator
sensor Microcontroller
(uC)
indicator
sensor
(Number)r = ( i=n-1
Ai r + i ) ( j=-1
Aj r j )
i=0 j=-m
(Integer Portion) + (Fraction Portion)
Ref. I. Scott Mackenzie Lê Chí Thông 16
sites.google.com/site/chithong 8
ĐH Bách Khoa TP.HCM Lê Chí Thông
4 0 7 . 6 2 5
102 101 100 . 10-1 10-2 10-3
4x102 0x101 7x100 . 6x10-1 2x10-2 5x10-3
400 0 7 . 0.6 0.02 0.005
sites.google.com/site/chithong 9
ĐH Bách Khoa TP.HCM Lê Chí Thông
5 A 0 . 4 D 1
162 161 160 . 16-1 16-2 16-3
5x162 10x161 0x160 . 4x16-1 13x16-2 1x16-3
1280 160 0 . 0.25 0.0508 0.0002
8 :2 = 4 remainder 0
4 :2 = 2 remainder 0
2 :2 = 1 remainder 0
1 :2= 0 remainder 1
1 0 0 0 . 1 0 1 B
sites.google.com/site/chithong 10
ĐH Bách Khoa TP.HCM Lê Chí Thông
1480 : 16 = 92 remainder 8
92 : 16 = 5 remainder 12
5 : 16 = 0 remainder 5
5 C 8 . 6 E H
2 C 9 . E 8 H
0 01011001001.11101000 B
sites.google.com/site/chithong 11
ĐH Bách Khoa TP.HCM Lê Chí Thông
ASCII Code
b6 b5 b 4
000 001 010 011 100 101 110 111
b3b2b1b0 Hex 0 1 2 3 4 5 6 7
sites.google.com/site/chithong 12
ĐH Bách Khoa TP.HCM Lê Chí Thông
a b a OR b a b a XOR b
0 0 0 0 0 0
0 1 1 0 1 1
1 0 1 1 0 1
1 1 1 1 1 0
sites.google.com/site/chithong 13
ĐH Bách Khoa TP.HCM Lê Chí Thông
sites.google.com/site/chithong 14
ĐH Bách Khoa TP.HCM Lê Chí Thông
Shifting
sites.google.com/site/chithong 15
ĐH Bách Khoa TP.HCM Lê Chí Thông
Rotating
Application of Shifts
sites.google.com/site/chithong 16
ĐH Bách Khoa TP.HCM Lê Chí Thông
Multiplication Tricks
Memory
• A computer system
0000 3F
component that allows
the storage and retrieval 0001 2C
of data 0002 41
• Main memory is usually 0003 FF
called RAM 0004 00
• Memory is usually 0005 1E
organized as a table of
bytes or words Addresses Data values
are usually are usually
shown in bytes
hexadecimal
Ref. I. Scott Mackenzie Lê Chí Thông 34
sites.google.com/site/chithong 17
ĐH Bách Khoa TP.HCM Lê Chí Thông
sites.google.com/site/chithong 18
ĐH Bách Khoa TP.HCM Lê Chí Thông
References
sites.google.com/site/chithong 19