This presentation is the property of its rightful owner.
Sponsored Links
1 / 116

计算机硬件技术基础 PowerPoint PPT Presentation


  • 75 Views
  • Uploaded on
  • Presentation posted in: General

计算机硬件技术基础. [email protected] 并行通信接口. 概念. CPU 与外设之间的信息传送都是通过接口电路来进行的。 计算机与外部设备、计算机与计算机之间交换信息称之为计算机通信 , 计算机通信可分为两大类: 并行通信 :多位(如 8 位 /16 位 /32 位)数据通过多条数据线同时传送。数据的各位同时由源到达目的地。适合近距离、高速通信。 串行通信 :一位一位数据传送 ( 在一条线上顺序传送 ) ,成本低多位数据通过同一条数据线按位依次传送。串行通信适于长距离、中低速通信。 实现并行通信的接口就是并行接口。. 并行接口的特点.

Download Presentation

计算机硬件技术基础

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


7101139

[email protected]


7101139

  • CPU

  • ,

    • 8/16/32

    • ()


7101139

  • I/O

  • : A/DD/AIEEE-488

  • 816/816


7101139

8255A

  • 8PAPBPCI/O

  • CPUI/O

  • I/O8255A


7101139

PA3

1

40

PA4

PA2

2

39

PA5

PA1

3

38

PA6

PA0

4

37

PA7

RD

5

36

WR

6

35

CS

RESET

7

34

D0

GND

A1

8

33

D1

8255A

D7~D0

A0

9

32

D2

8255A

PA7~PA0

PC7

10

31

D3

A1A0

PC6

11

30

D4

PC5

12

29

D5

RD

PC4

13

28

D6

CS

WR

PB7~PB0

PC0

14

27

D7

PC1

15

26

VCC

RESET

PC2

16

25

PB7

VCC

PC3

17

24

PB6

PC7~PC0

PB0

18

23

PB5

GND

19

22

PB4

PB1

PB2

20

21

PB3

8255A


7101139

8255A

      • D0D7CPU8255A8255ACPU8255ACPU

      • A1A0

      • RD

      • WR

      • RESET8255AABC24


7101139

8255A

    • PA0PA7A/

    • PB0PB7B/

    • PC0PC7C/

  • 24I/OAB/I/OBusyA/DEOCAB8255A8255A


7101139

8255A

  • PC12PCCPU8255APC12


7101139

A

A

8

A

PA0~PA7

A

C

4

D0~D7

PC4~PC7

CS

WR

/

A1

B

C

4

A0

RD

PC0~PC3

RESET

B

B

B

8

PB0~PB7


7101139

8255

88255ACPU

//RDWRCSA1A0

/ABC8255A38port

ABABC


7101139

8255A


7101139

1

D6

D5

D4

D3

D2

D1

D0

A

00=0

01=1

10=2

11=

PA

0=

1=

PC4~7

0=

1=

B

0=0

1=1

PB

0=

1=

PC0~3

0=

1=

8255A

1.

8255A3PAPBPC

8110


7101139

8255A

1

A1 CB0C10110001BB1H

8255A8255A8255A203H

MOV DX203H 8255A

MOV AL0B1H

OUT DXAL


7101139

0

D6

D5

D4

D3

D2

D1

D0

0

000=C0

001=C1

111=C7

1=

0=

8255A

2./

PC

8010.


7101139

8255A

2CPC200000101B05H

8255APCPC2 203H

MOV DX203H 8255A

MOV AL05H PC2=1

OUT DXAL

PC2

MOV DX203H 8255A

MOV AL04H PC2=0

OUT DXAL


7101139

8255A

C

38255APC7 203H

MOV DX203H 8255A

MOV AL00001110B PC7=0

OUT DXAL

NOP

NOP

MOV AL00001111B PC7=1

OUT DXAL


7101139

8255A

3.

8255A38255A

/PC3

D7

/


7101139

1 0 1 0 1 0 1 0

OR0 0 0 0 0 0 0 1

1 0 1 0 1 0 1 1

1 0 1 0 1 0 1 1

AND 1 1 1 1 1 1 1 0

1 0 1 0 1 0 1 0

8255A

4. AB

AB/CAB100


7101139

8255A

4PA7/PA7 PA200H

MOV DX200H PA

IN ALDX A

MOV AHAL

OR AL80H PA7=1

OUT DXAL PA7

MOV ALAH

OUT DXAL


7101139

8255A

PA7

MOV DX200H A

IN ALDX

MOV AHAL

AND AL7FH PA7=0

OUT DXAL PA7

MOV ALAH

OUT DXAL


7101139

8255A

    • 1.0/

    • 2.1/

    • 3.2


7101139

8255A

  • ABC

    • 08416

    • I/OPAPBPC

10


7101139

4ms

1ms

8255A

18255A8255A0PB1PB28255A90H 91H 92H93H1D1ms

8255A

B0080H

PB1

2ms

PB2


7101139

8255A

MOV AL,80H ;8255AOUT 93H,AL START: MOV AL,02H ;00000010B OUT 91H,AL CALL D1ms MOV AL,06H ;00000110B OUT 91H,AL CALL D1ms MOV AL,00H ;00000000B OUT 91H,AL CALL D1ms MOV AL,04H ;00000100B OUT 91H,AL CALL D1ms JMP START


7101139

8255A

    • I/OCPU

    • PAPBPCC

21/


7101139

8255A

  • 1

  • I/O8255AI/O8255ACPU8255AABC38255ACPU

    • STB8255A

    • IBF8255A

    • INTR8255ACPU


7101139

1B

PB7~0

8

INTE

B

PC2

STBB

PC1

IBFB

RD

RD

&

INTRB

PC0

2

8255A

1A

PA7~0

8

INTE

A

PC4

STBA

PC5

IBFA

&

INTRA

PC3

2

PC6,7

I/O

1


7101139

8255A

  • 1

    • ACKCPU8255A

    • OBFCPUAB

    • INTR8255AACK8255ACPUINTRCPU8255A


7101139

1A

1B

PA7~0

8

PA7~0

8

PC7

PC1

WR

WR

OBFA

OBFB

INTE

A

PC6

ACKA

INTE

A

PC2

ACKB

INTRA

INTRB

&

PC3

&

PC0

2

PC4,5

I/O

8255A

1


7101139

8255A

  • A A8 C5ABC301

    • CPU8255APA7~PA0PC7~PC3

32/


7101139

8255A

    • PA//PA

    • 2CPU

    • 1


7101139

1

PC3

INTRA

8

PA7~0

&

PC7

OBFA

PC6

ACKA

INTE

1

&

PC4

STBA

INTE

2

PC5

WR

IBFA

RD

PC2~0

I/O

3

8255A

2

2A/C5PC3~PC78255AA2

2


7101139

0 1 1 0 1 0 1 0

RD

TD


7101139

1----

  • Bit Rate

    • bps

  • Baud Rate

  • 50 bps9600 bps115200 bps


7101139

2

A

B

A

B

A

B


7101139

CRC(Cyclic Redundancy Check)

3


7101139

1

1101

1CPU

2CRC


7101139

4


7101139

(1)


7101139

58

1

12

01

1+8+1+28


7101139


7101139

1

2

n

1

2

n

1

2

n


7101139

161


7101139

  • ---

  • ---

  • ---

  • ---

  • ---

  • ---


7101139

8251

5678

56781

1

11.52


7101139

8251


7101139

8251

CPU

(1)

CS#8251A

(2)

D7D0

(3)

RD#

WR#

C/D#/

(4)

TXRDY

TXE

RXRDY

SYNDET


7101139

(1)

DTR#

DSR#

RTS#

CTS#

(2)

TXD

RXD


7101139

8251A


7101139


7101139

WR

RD

C/D

CLK

RESET


7101139

8251

(1)

8251A


7101139

8251

(2)

8251A


8251a

8251A

8251A


7101139

8251A


7101139

8251A


7101139

8251A


7101139


7101139


7101139

MOV AL0FAH

OUT 42HAL;

167

2

MOVAL37H

OUT42HAL;


7101139

MOVAL38H

OUT42HAL;2

7

MOVAL16H

OUT42HAL

OUT42HAL;16H

MOV AL97H

OUT 42HAL;


7101139

    • RS232-C

    • RS422/RS485

    • 20mA

    • /

  • ModulatingDemodulating

  • MODEM


Rs 232c

RS-232C

  • EIA

    • 19621969

    • 19871EIA-232D

  • DTEDCE

    • DTE

    • DCE


7101139

RS-232C

DTE

DCE

DCE

DTE

RS-232C

RS-232C


Rs 232c1

RS-232C

  • 232C25

  • 99

  • 232C


Rs 232c2

RS-232C

  • TxD

  • RxD

  • RTS

    • RTS

  • CTS

    • CTSRTS

      RTSCTS


Rs 232c3

RS-232C

  • DTR

  • DSR

    • DTRDSR

  • GND

  • CDDCD

  • RI


Rs 232c4

RS-232C

  • TxC

  • RxC


Rs 232c5

RS-232C

  • 232CEIA

    • 0 3V15V

    • 13V15V

    • 12V15V

  • TTL

    • 12.4V5V

    • 00V0.8V


7101139

/


7101139

/

      • CPU

      • /8253CPU/


7101139

/

  • /8253

    • 10

    • 1


7101139

/

  • CPU


7101139

/


7101139

/

  • CLK

  • GATE

    • GATE=0

    • GATE=1

  • OUT

    • /


7101139

/

  • 0OUT


7101139

/

  • 8253

    • 16CR

    • CE

    • OL

    • /


7101139

CLK1

CLK0

CLK2

0

D7~D0

GATE1

GATE0

GATE2

OUT1

OUT0

OUT2

RD

/

1

WR

A0

A1

CS

2

/


7101139

/

  • ()


7101139

/

  • /8253

    • A0 A13

    • RDCPU

    • WRCPU

    • CSRD/WR


7101139

/

  • ()/


7101139

VCC

+5V

GND

CLK1

CLK2

CLK0

GATE0

GATE1

GATE2

(CR)

D0 ~D7

OUT2

OUT1

OUT0

8

8

8

8

8

8

(CE)

RD

RD

(OL)

WR

WR

1

READY

IO / M

2

CS

A1A0

/


7101139

/

  • :


7101139

D6

D5

D4

D2

D1

D0

D3

D7

/

D0(BCD)

0

1 BCD

D7D6(SC1 SC0 )

0 0 0

0 1 1

1 0 2

1 1

D5D4(RW1 RW0 )

0 0

0 1 /8

1 0 /8

1 1

D3D2D1(M2M1M0)

0 0 0 0

0 0 1 1

1 0 2

1 1 3

1 0 0 4

1 0 1 5

/

SC1SC0=1182538254


7101139

/

8253

  • 10

  • OUT0OUT

  • nn+1 OUT

  • GATE=1CEGATEOUT

  • GATE=0GATE=1n OUTn


7101139

CLK

WR

n=4

GATE

4

3

2

1

0

OUT

INTR

/

10

  • CWOUT=0

  • OUT=1

  • OUTN+1CLK

  • GATE=0

  • OUT


7101139

/

21

  • OUTGATEOUT0

  • 0OUT

  • NOUTN

  • GATE

  • GATE

  • GATE


7101139

CLK

WR

n=5

GATE

5

4

3

5

4

3

2

1

OUT

/

21

  • OUT=1

  • GATEOUT=0

  • OUT=1

  • N

  • GATE


7101139

/

32

  • OUT1OUT

  • OUT

  • NNN-11

  • GATE=1GATE=0GATE

  • GATE=1N-1OUT

  • GATE=1OUT

  • 1GATE


7101139

CLK

WR

n=3

GATE

3

2

1

0

OUT

3

2

1

0

/

32

  • OUT=1

  • CLK

  • 1OUT=0

  • CLKOUT=1

  • GATE=0GATE


7101139

/

  • 43

  • OUTOUT0

  • GATE=1GATE=0OUTGATE0OUTGATE

  • GATE=1

  • GATE


7101139

/

* 2NCLK

* CLK20OUT

*1CLK20 OUT3CLK20OUT

*GATE

*


7101139

/

  • 54

  • OUT0

  • NN

  • GATE=1GATE=00


7101139

/

* OUT=1

* CLK

* 0OUT=0

* CLKOUT=1

*

* OUTN+1CLK

* GATE=0

*


7101139

/

  • 65

  • OUTGATE0OUT

  • NGATENOUT

  • GATE

  • GATE


7101139

/

* OUT=1

* GATE

* 0OUT=0

* CLKOUT=1

*

* OUTN+1CLK

* GATE

* GATEGATE


7101139

/

8253

1. OUT

0

2.

023415


7101139

/

N


7101139

/

3. -----GATECLK0234GATE1235 GATE


7101139

/

4.

CLK

5.0

001450FFFF/999923


7101139

/

5

  • CLK

  • OUT

  • 8253OUT

  • 82534510

  • 825332


7101139

/

8253

  • 82538253


7101139

/

8253

1.A1A0=11

2. D7D6

8880

8880

1688


7101139

/

    • CE

    • CLKGATE

      • 04GATE

      • 15GATE

      • 23

    • 1


7101139

D7

D6

D5

D4

D3

D2

D1

D0

0

0

1

1

0

0

1

1

/

8253

8253

1.

2.8253

3.

4.8253

1 8253

015080H0F8~0FBH.

(1)

00110011B

1

0

BCD

8

8


7101139

/

8253

8253

1.

2.8253

3.

4.8253

(2)A1A0110FBH

(3)880H.

(4)850H.

(5)0A1A0000F8H


7101139

/

8253

8253

1.

2.8253

3.

4.8253

MOV AL ,33H

OUT 0FBH,AL ;

MOV AL ,80H

OUT 0F8H,AL ;8

MOV AL ,50H

OUT 0F8H,AL ;8


7101139

3. 8253

00

11

011

1

/

8253

2032KHz2.5MHzBCD

1. 825380H81H82H83H

2. TC = 2.5MHz/2KHz=1250

4.

MOV AL37H

OUT 83HAL

MOV AL50H

OUT 80HAL

MOV AL12H

OUT 80HAL


7101139

0

0

1

1

0

0

1

1

/

8253

38253F8H~FBH01BCD5080

1.

2.880

3.850

8253

MOV AL33H

OUT 0FBHAL

MOV AL80H

OUT 0F8HAL

MOV AL50H

OUT 0F8HAL

MOV AL03H 0

OUT 0FBHAL

IN AL0F8H 8

MOV CLAL CL

IN AL0F8H 8

MOV CHAL CH


7101139

48253

74LS138

CLK0

CLK1

CLK2

A9

A8

1MHz

G1

A7

A6

GATE0

OUT0

5V

A4

A3

A0

C

BA

2KHz

GATE1

OUT1

8086

CPU

A5

M/IO

1ms

GATE2

OUT2

A1

A0

RD

WR

A2

A1

RD

WR

Y4

G2A

G2B

D7D0

D7D0

CS

/

8253


7101139

/

48253

102KHz

211ms

3226

8253310H31MHz

03GATE0+5VN0=1MHz/2KHz=500

11GATE1OUT1N1=1ms/0.001ms=1000

25GATE2N2=26


7101139

/

1

MOV DX316H

MOV AL 01110011B

OUT DXAL

MOV DX312H

MOV AL00H

OUT DXAL

MOV AL10H

OUT DXAL

0

MOV DX316H

MOV AL 00110111B

OUT DXAL

MOV DX310H

MOV AL00H

OUT DXAL

MOV AL05H

OUT DXAL

2

MOV DX316H

MOV AL 10011011B

OUT DXAL

MOV DX314H

MOV AL26H

OUT DXAL


7101139

+5V

GATE0

GATE1

D7-D0

WR

RD

A1

A0

CS

WR

RD

A2

A1

D8-D15

2MHz

CLK0

OUT0

CLK1

OUT1

M/ IO

A0-A7

/

58253LEDLED1010

8253CPU8D8D15825381H83H85H87H

OUT11:1 825313

2MHz16

0 .5s65536=32.768ms

0400Hz500010.05Hz8000


7101139

/

1

MOV AL 01110111B

OUT 87AL

MOV AL00H

OUT 83AL

MOV AL80H

OUT 83AL

0

MOV AL 00110101B

OUT 87AL

MOV AL00H

OUT 81AL

MOV AL50H

OUT 81AL


7101139

+5V

+5V

D7-D0

OUT0

WR

RD

A1

A0

CS

+5V

INTR

WR

RD

A2

A1

GATE1

CLK1

M/IO

AB

/

68253500CPU

8253 F0H F2H F4H F6H

825310BCD


7101139

/

1

MOV AL 01110001B

OUT 0F6H AL

MOV AL 99H

OUT 0F2H AL

MOV AL 04H

OUT 0F2H AL

1

MOV AL 01000000B

OUT 0F6H AL

IN AL 0F2H

MOV AH AL

IN AL 0F2H

XCHG AH AL

1GATE

2


  • Login