Microprocessor Week1: Introduction

34
MICROPROCESSOR INTRODUCTION Arkhom JODTANG Civil Aviation Training Center

Transcript of Microprocessor Week1: Introduction

Page 1: Microprocessor Week1: Introduction

MICROPROCESSOR INTRODUCTIONArkhom JODTANGCivil Aviation Training Center

Page 2: Microprocessor Week1: Introduction

2

Computer System

CPUHard drive

(Program)

Memory (RAM) Port

Page 3: Microprocessor Week1: Introduction

3

Computer System

Image from http://www.computer-laptop-tuning.de/preise-leistungen/

Page 4: Microprocessor Week1: Introduction

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.

Page 5: Microprocessor Week1: Introduction

5

Microcontroller MCS51

Image from http://www.mikroe.com/chapters/view/65/

Page 6: Microprocessor Week1: Introduction

6

Microcontroller MCS51

Image from http://www.mikroe.com/chapters/view/65/

Page 7: Microprocessor Week1: Introduction

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

Page 8: Microprocessor Week1: Introduction

8

For subject Microprocessor and Application

Required knowledge

Page 9: Microprocessor Week1: Introduction

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

Page 10: Microprocessor Week1: Introduction

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

Page 11: Microprocessor Week1: Introduction

11

Digital Quantity Bit (1 bit) Nibble (4 bits) Byte (8 bits)

Word size 8 bits ( MCS-51) 32 bits ( X86 ) 64 bits ( X64 )

Page 12: Microprocessor Week1: Introduction

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

Page 13: Microprocessor Week1: Introduction

13

Additional

5 01008 100

12 +

Decimal

7 75

+ 998

+ 10011101

1100

+ +

0101

Binary

1

Additional digit1

Additional digit1

1 1

Page 14: Microprocessor Week1: Introduction

14

Additional

C9+ +

5

Binary

1

0100 4

10011101

9+ +

D

Binary Hexadecimal110

0100101011

Hexadecimal

Additional digit (bit)x

Page 15: Microprocessor Week1: Introduction

15

Subtraction

Page 16: Microprocessor Week1: Introduction

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

Page 17: Microprocessor Week1: Introduction

17

Division

Page 18: Microprocessor Week1: Introduction

18 Subject perspective view

Page 19: Microprocessor Week1: Introduction

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

Page 20: Microprocessor Week1: Introduction

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

Page 21: Microprocessor Week1: Introduction

21

Single chip computer system

Page 22: Microprocessor Week1: Introduction

22

Sample Circuit

http://www.botskool.com/tutorials/electronics/8051/input-output-instructions-8051-assembly-language

Page 23: Microprocessor Week1: Introduction

23

Sample Circuit With some device

Page 24: Microprocessor Week1: Introduction

24

Sample MCS-51 Application

Page 25: Microprocessor Week1: Introduction

May 2, 2023MCS51 Instruction

25

Developing

Save / Load

Build

Assembly file (.asm)

Hex file

Emulator

Circuit Simulator

Microcontroller Board

Assembly Editor

Page 26: Microprocessor Week1: Introduction

26

Page 27: Microprocessor Week1: Introduction

27

Page 28: Microprocessor Week1: Introduction

28

Page 29: Microprocessor Week1: Introduction

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

Page 30: Microprocessor Week1: Introduction

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

Page 31: Microprocessor Week1: Introduction

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

Page 32: Microprocessor Week1: Introduction

32

MCS-51 System board

Page 33: Microprocessor Week1: Introduction

33

Subject Measurement

Page 34: Microprocessor Week1: Introduction

34

Instructor A. Arkhom JODTANG Office: Building 10 2nd floor Contact: Facebook

Arkhom JODTANG Group: A.Arkhom+ATAE3 Group: A.Arkhom+ATAI3