Download - Microprocessor Week1: Introduction
MICROPROCESSOR INTRODUCTIONArkhom JODTANGCivil Aviation Training Center
2
Computer System
CPUHard drive
(Program)
Memory (RAM) Port
3
Computer System
Image from http://www.computer-laptop-tuning.de/preise-leistungen/
4
MicroprocessorContents Microprocessor is a
digital electronic device use for process the mathematics calculation, Logic Operation, Store. Microprocessor is manufacture in the form of Integrated circuit (IC) chip.
5
Microcontroller MCS51
Image from http://www.mikroe.com/chapters/view/65/
6
Microcontroller MCS51
Image from http://www.mikroe.com/chapters/view/65/
7
Microcomputer System and Microcontroller comparison
Microcomputer System MicrocontrollerProcessor ALUMemory (RAM) Memory (Internal RAM)Operating system (Hard drive) Program memory (Flash ROM)Peripheral Devices Port
8
For subject Microprocessor and Application
Required knowledge
9
Number SystemDecimal Binary Hexadecimal0 0000 0000 01 0000 0001 12 0000 0010 23 34 45 56 67 78 89 0000 1001 910 0000 1010 A11 0000 1011 B12 0000 1100 C13 0000 1101 D14 0000 1110 E15 0000 1111 F16 0001 0000 10
Microprocessor
10
Hexadecimal Binary: :
0 E 0 0 0 0 1 1 1 00 F 0 0 0 0 1 1 1 11 0 0 0 0 1 0 0 0 01 1 0 0 0 1 0 0 0 1
: :
Hexadecimal Binary Decimal0 0 0 0 0 0 0 0 0 01 0 0 0 0 0 0 0 1 12 0 0 0 0 0 0 1 0 2: : :: : :
7 D 0 1 1 1 1 1 0 1 1257 E 0 1 1 1 1 1 1 0 1267 F 0 1 1 1 1 1 1 1 1278 0 1 0 0 0 0 0 0 0 1288 1 1 0 0 0 0 0 0 1 129
: : :: : :
F E 1 1 1 1 1 1 1 0 254F F 1 1 1 1 1 1 1 1 255
Hexadecimal Binary: :
1 8 0 0 0 1 1 0 0 01 9 0 0 0 1 1 0 0 11 A 0 0 0 1 1 0 1 01 B 0 0 0 1 1 0 1 1
: : 8 Bits = 1 Byte
May 2, 2023
11
Digital Quantity Bit (1 bit) Nibble (4 bits) Byte (8 bits)
Word size 8 bits ( MCS-51) 32 bits ( X86 ) 64 bits ( X64 )
Word Size MCS-51 is 8-bits word size computer
1 1 0 1 0 0 1 1
D 3
Binary
Hexadecimal
8 Bits = 1 Byte
13
Additional
5 01008 100
12 +
Decimal
7 75
+ 998
+ 10011101
1100
+ +
0101
Binary
1
Additional digit1
Additional digit1
1 1
14
Additional
C9+ +
5
Binary
1
0100 4
10011101
9+ +
D
Binary Hexadecimal110
0100101011
Hexadecimal
Additional digit (bit)x
15
Subtraction
16
Multiplication
3 0 E8 F F2 x
Decimal
6 76
x 991
x 0 97 E
F Fx x
0 1
Hexadecimal
F E
Additional Byte X X
5 8
Additional Number
17
Division
18 Subject perspective view
19
MCS-51 Family Microcontroller Operation Concept Digital System (Every thing is NUMBER) Cell Memory concept Read Program from Program Memory Operate Use Data Memory as tools for operation
20
Program memory and Data memory
Central Processing Unit
(CPU)
Address bus
Data bus
Address bus
Data bus
Program Memory (ROM) Data Memory(RAM)
Computer System
21
Single chip computer system
22
Sample Circuit
http://www.botskool.com/tutorials/electronics/8051/input-output-instructions-8051-assembly-language
23
Sample Circuit With some device
24
Sample MCS-51 Application
May 2, 2023MCS51 Instruction
25
Developing
Save / Load
Build
Assembly file (.asm)
Hex file
Emulator
Circuit Simulator
Microcontroller Board
Assembly Editor
26
27
28
29
Assembly InstructionContain 2 parts Mnemonics'
MOV ADD MUL INC XCH …
Operands ACC, B, #5DH R0 (00h), R1 (01h), … R7, 34h, FFh P1, PSW, T1, IE
MOV A, R0MOV P1,#0FH
ADD A,#2DJB P3.1, Label1
30
Basic Assembly Instruction Copy value for some memory cell
MOV A, #54H MOV A, P2 MOV P3.1, C
Increase / Decrease INC R1 DEC Acc
Exchange value between two cells XCH A, R2
Program Control (Jumping) JMP LabelName
31
Applications Display to LED
Single LED 7-segments Matrix LED Display
Drive small load Driving Relay Servomotor Stepper motor LCD Display Communication with other digital devices
32
MCS-51 System board
33
Subject Measurement
34
Instructor A. Arkhom JODTANG Office: Building 10 2nd floor Contact: Facebook
Arkhom JODTANG Group: A.Arkhom+ATAE3 Group: A.Arkhom+ATAI3