MPU ???? - PowerPoint PPT Presentation

About This Presentation
Title:

MPU ????

Description:

Title: Author: Last modified by: shjung Created Date: 4/2/2004 7:54:05 AM Document presentation format: A4 (210x297mm) Company – PowerPoint PPT presentation

Number of Views:171
Avg rating:3.0/5.0
Slides: 29
Provided by: 6649912
Category:
Tags: mpu

less

Transcript and Presenter's Notes

Title: MPU ????


1
3? MPU ????
2
????
?? ????... MPU ????? ?? ???????.
? ? ? ?
????????? ?? ??? ??? ?? ? ????? ????.
? ? ? ?
  • ???????? ??
  • ??????
  • ????
  • ????

3
MPU ?? ??
  • 1) Z-80 ???????? ????
  • MPU? ????? ????(ALU), ????(control),
    ????(register)? ????.
  • ????? ???(Acc), ???? ???(PC), ??? ????
    ????(MAR),
  • ??? ????(IR)?? ???? ??.
  • MPU ??? ???? ??, ??? ??, ?? ???? ?? ??.

4
MPU ?? ??
  • 2) Z-80 Microprocessor(MPU)
  • Z-80 MPU? ?? ??? ?? ??? ?? Address Bus. Data
    Bus, Control Bus?? ????.

5
MPU ?? ??
  • 3) Z-80 Microprocessor ????
  • Z-80 MPU? ?? ??? ?? ??? ?? ??????(general
    purpose register), ??????(special purpose
    register), ???(accumulator), ????(arithmetic
    unit), ????(control unit)? ???? ??? ?????
    ???????(instruction register)? ???(decoder)? ????
    ??.
  • ?? ????? ??? ??? Address Bus. Data Bus, Control
    Bus? ?? ????.

6
MPU ?? ??
  • 3) ?? 8085 ????

7
MPU ?? ??
  • 4) ?? ????(General Purpose Register)
  • Z-80 MPU? ??????? ?? 8?? ????? ???? A????? ?????
    B, C, D, E, H, L ?????? ????. 16??? ??? ??? BC,
    DE, HL? ??? ????. ??? Z-80??? ? ????(main
    register), ?? ????(alternate register)? ??? ??.

alternate register
main register
Accumulator
??? ??? ? 16bit? ??
8
MPU ?? ??
  • 5) ????(AU Arithmetic Unit)
  • ????? ?? ??? ?? ????, ????, ???, ???????,
    ????????
  • ???? ??. ????? ???? Acc(???)? ???? ?? ??? ???
    Acc? ????? ???? ??.

9
MPU ?? ??
  • 5) ????(AU Arithmetic Unit)
  • ????? ???? ??? ??.
  • ?? ?? ?? ?? ??? , -, , ? ???? ??????.
  • ?? ?? ?? ?? ??? AND, OR, XOR, NOT? ???? ??
    ????.
  • ??? ????(shift register) ???? ?? ?? ???? ?????
    ??? ?? ??????.
  • ???(complement) 2? ???? ??? ??? ????.
  • ?? ????(status register) ?? ??? ??? ????
    ???(flag)?? ???? ??????.

10
MPU ?? ??
  • 6) ??????(Special Purpose Register)
  • Z-80 MPU? ?? ????? ?? ??? ?? ???? ???, ??? ???
    ???? ??? ??.

8bit
?? ????(Flag Register) ???? ????(Interrupt
Register) ???? ????(Refresh Register) ?? ????
IX(Index Register IX) ?? ???? IY(Index Register
IY) ?? ???(Stack Pointer) ???? ???(Program
Counter)
F
I
R
IX
IY
SP
PC
16bit
11
MPU ?? ??
  • 6) ??????(Special Purpose Register)

(1) Program counter (PC)
  • ???? ???? ?? ?? ?(?? ???) ???? ???? ???(??
    ?????)? ??? ??? ?? ??? ??. PC? ???? ????? ??? ??.

? ?? CPU? ?? ? memory ?? ? memory ??? ?? ? ? ??
increment ?? ?? ??? ??? ?? ?? ?
8Bit CPU? PC? 16Bit? ????
12
MPU ?? ??
  • 6) ??????(Special Purpose Register)

Program counter ?? ? 1)
  • 8000H ???? ???? ?? ????? ???? ??

? RUN 8000H ???? ?? PC? 8000H? ?? ??(load ??). ?
PC? ?? ? 8000H? ??? 8000H ??? ????( ??? ?? ??).
? ??? ???? ?? 3EH" ? ????? ??? ???? PC? ?? ???
???? ?? ?? 1 ?? ?? 8001H? ??(1 ?? ??)
? PC? ?? ? 8000H? ??? 8000H ????
? PC? ?? ??? ???? ?? ?? 1 ?? ?? 8001H? ??
memory
memory
PC
PC
3E
33
06
02

8000H
8001H
8002H
8003H

LD A,33H
(A?33H)
LD B, 02H
(B?02H)

3E
33
06
02

8000H
8001H
8002H
8003H

LD A,33H
(A?33H)
LD B, 02H
(B?02H)

8000H
8001H
? RUN 8000H Load ??
8000H
Increment
13
MPU ?? ??
  • 6) ??????(Special Purpose Register)

Program counter ?? ? 2)
  • JUMP???? ?? Jump address load JUMP 5000H
    (5000H ??? ??)

PC
5000H
? JUMP 5000H Load ??
5000H
Program counter ?? ? 3)
  • Subroutine Call? ?? subroutine ???? load

memory
PC
CD
00
30


8000H
8001H
8002H
8003H

CALL 3000H




3000H
? CALL 3000H Load ??
14
MPU ?? ??
  • 6) ??????(Special Purpose Register)

(2) ?? ???(SP Stack Pointer)
  • ?? ???? 16?? ?? ?????? ???? ??? ????? ?????? ???
    ??? ??? ??? ??.

? Register ??(Data)? ?? ?? ??? ?? ? LIFO(Last
Input First Out) ?? ? Pointer? ???? ???? ?? ?
Subroutine CALL ???? ?? ?? PC ??, ?? ?? ?
Interrupt? ?? PC ?? ?? ??, ?? ?? ? PUSH, POP
???? ?? ?? Data ?? ?? ??
Stack Pointer (??? ??? ??? ???? ??)
Memory
Stack ?? (???? ???? ??? ??)
CPU





Stack Pointer
16bit
??
????
15
MPU ?? ??
  • 6) ??????(Special Purpose Register)
  • ?? ???? LIFO (Last In First Out) ???? ??? ????
    ?? ???? ??)??? ?? ??.
  • ?? ???? ???? ???? ???? ????.

DATA 3
DATA 3
DATA 2
FEFC FEFD FEFE FFFF
FEFC FEFD FEFE FFFF
DATA 2
Stack Pointer
DATA 1
Stack Pointer
DATA 1
16
MPU ?? ??
  • 6) ??????(Special Purpose Register)

?) BC,DE ????? ??? PUSH, POP ???? SP ? ??????
???? ??
? ??? SP? FF00H ??? ????.
Memory(stack??)
CPU
SP????






FF00H
FEFFH
FEFEH
FEFDH
FEFCH
FEFBH
SP
FF00H
AF BC DE
12 34
56 78
9A BC
? PUSH BC
Memory(stack??)
CPU
SP????

56
78



FF00H
FEFFH
FEFEH
FEFDH
FEFCH
FEFBH
SP
FEFEH
AF BC DE
12 34
56 78
9A BC
17
MPU ?? ??
  • 6) ??????(Special Purpose Register)

Memory(stack??)
CPU
? PUSH DE
SP????

56
78
9A
BC

FF00H
FEFFH
FEFEH
FEFDH
FEFCH
FEFBH
SP
FEFCH
AF BC DE
12 34
56 78
9A BC
? POP DE
Memory(stack??)
CPU
SP????

56
78



FF00H
FEFFH
FEFEH
FEFDH
FEFCH
FEFBH
SP
FEFEH
AF BC DE
12 34

9A BC
18
MPU ?? ??
  • 6) ??????(Special Purpose Register)

Memory(stack??)
CPU
? POP BC
SP????






FF00H
FEFFH
FEFEH
FEFDH
FEFCH
FEFBH
SP
FF00H
AF BC DE
12 34
56 78
9A BC
19
MPU ?? ??
  • 6) ??????(Special Purpose Register)

(3) ?? ????(Index Register)
  • ??? address ?? ??? ??? ??? ????
  • ????? ??? ? ???? ????
  • 16bit Index register IX, IY

ex) ?? IX????? 9000H? ???? ?? ?? LD
A,(IX 3) ???? ???? ?? ??? ?? 9003H??? ????
?? 78H? Acc? ????
Memory
CPU
12
34
56
78
9A
BC
9000H
9001H
9002H
9003H
9004H
9005H
AF BC DE
78


?
IX
9000H
IX(9000H) 3H 9003H
Index ? ?? ? ?? ??(effective address)
20
MPU ?? ??
  • 6) ??????(Special Purpose Register)

(4) ?? ???? (Status register or Flag register)
  • ?? ????? ?? ?????? ?? ?? ??? ????? ??????.
  • ?? ????? 8?? ????? ?? ??? ?? ???? ??? ??.

B7 B6 B5 B4 B3 B2 B1
B0
Carry(???? ???) Add/Subtract(??0,
??1) Parity/Overflow Half carry(nibble ??
????) Zero(?? 01, not zero 0 Sign(?? 0,
-1)
21
MPU ?? ??
  • 6) ??????(Special Purpose Register)

? Carry bit ALU?? ???? carry? ???? 1? set
carry? ??? 0 ?? ?? ??.
? ???? (??) ADD A,B A? A B
1111 1001 (F9H) Acc
0001 0100 (14H) B
Carry 1? 0000 1101 (1 0DH) Acc
? ???? (??) SUB A,B A? A- B
0010 1001 (29H) Acc
- 0011 0100 (44H) - B
Carry 1? 1101 0101 (D5H) Acc
?? ?? ??? ?? 0?? set??.
22
MPU ?? ??
  • 6) ??????(Special Purpose Register)

? Add/Subtract bit ?? ??? ?? 0?? ??, ?? ??? ??
??? 1? ?? ??
(3) Parity/Overflow
ADD operation 0 SUB operation
1
? Parity/Overflow bit ????(ADD, SUB?) ???? ????
Overflow bit? ??
????(AND, OR?) ??? ?? ? Parity bit? ??
(?) Overflow ???? Overflow ????? ? ?? ?? ?? ?
?? ? ??? ??? ??? Overflow ? ??? ??? ????.
??(SUB)?? ??? ??? over flow? ???? ???.
() (-) (-)
() (-)
Overflow ?? (-) Overflow ?? () Overflow ?? ()
23
MPU ?? ??
  • 6) ??????(Special Purpose Register)

Overflow ????
As(?? ????) Bs(??? ????) Cout Cn1(????) V(???????) ??
0 0 0 0 0 ??????
0 0 1 0 1 ??????
0 1 0 0 0 ??????(AgtB)
0 1 1 1 0 ??????(AltB)
1 0 0 0 0 ??????(AltB)
1 0 1 1 0 ??????(AgtB)
1 1 0 1 1 ??????
1 1 1 1 0 ??????
24
MPU ?? ??
  • 6) ??????(Special Purpose Register)

???? ?? ?? ????.
Overflow ??
0 000 0000 0111 0100 (0074H)
0 000 0000 0010 0100 (0024H)
0 000 0000 1001 1000 (0098H)
0 111 0100 (74H)
0 010 0100 (24H)
Overflow ?? 1 001 1000 (-18H)
(?) Parity ???? Parity bit? ???? ?? ?? ??? ??
? ???? ???? ???? ?? ???? ????.
?? Odd parity? ???? ??? ???? ?? Acc?
???? 1? ? ?? ??? ???? parity bit?
1? set?? ??? 1? ??? ? ??? ??? ??.
?? Even parity? ???? ??? ???? ?? Acc? ???? 1? ?
?? ??? ???? 1 ? set?? ??? ??? ??? ??.
25
MPU ?? ??
  • 6) ??????(Special Purpose Register)

? ???? ? ???? ?? ?? ? ??? A ?? ??? ????? 1?
??? ???? parity bit? 1? ???? ?? ??
??? ??. ??? parity bit generator ? ??. ?
??? ??? B? ????. ? ??? B ?? ??? ????? 1? ???
??? ?? ????? ??? ??? ?? parity bit? 0?
??. ? ?? ??? ????? 1? ??? ??? ?? ??? ????? ??
parity bit? 1? ????? ???? ??? ??????
????. ??? parity bit detector(???)? ??.
26
MPU ?? ??
  • 6) ??????(Special Purpose Register)

? Half carry bit (nibble ?? ????) ALU?? ???? ??
4?? ???? ?????? ???? H bit ? 1?
?? ??
0001 1100 (1CH)
0001 0100 (14H)
0011 0000 (30H)
? Zero bit ALU?? ???? zero ?? Z bit? 1? ????
??? 0?? ??
Z bit? 1? ??
Z bit? 0? ??
0001 0100 (14H)
- 0001 0100 (14H)
0000 0000 (00H)
0001 0100 (14H)
- 0000 0100 (04H)
0001 0000 (10H)
Not zero
27
MPU ?? ??
  • 6) ??????(Special Purpose Register)

? Sign bit ALU?? ???? ? ?? ??? 1 ?? ??, 0
?? ??? ??. ?? ????? ? ?? ??? sign
bit(????)??.
0 001 1100 (1CH)
0 001 0100 (14H)
0 011 0000 (30H)
???? MSB? 0?? ??, ???? MSB? 1? ??.
? ?? ??(MSB,(Sign bit))
(5) Interrupt Vector Register
Interrupt Vector Register? 8bit register?? Page
address??? ??, ????? ??? ??? ?? register
??.(Interrupt?? ??)
(6) Memory Refresh Register
Dynamic RAM? ??? ? ??? ?? ???? ?? ???? ??? ??
??. ??? 2ms ?? ??? refresh ?? ??.(????? ??)
28
MPU ?? ??
  • 7) ???? (Control Unit)

????? ??? ????(IRInstruction Register)? ???
???(Decoder)? ???? ??? memory? ???? ?? ??????
???? ??(fetch) ? ?? ???? ??? ?? ?? ???? ?? ????
????.
???? IR(Instruction Register)? ???? fetch? ??
latch?? ???. Latch? ???? ??? ???? ???? ???? ????.
??? ???? ?? ????? ??????? ???? ????.
Write a Comment
User Comments (0)
About PowerShow.com