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

第七章 可编程接口芯片 PowerPoint PPT Presentation


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

第七章 可编程接口芯片. 可编程接口概术 可编程并行输入/输出接口芯片 8255A 可编程定时/计数器接口芯片 8253. 可编程接口概术 一个简单的具有输入功能和输出功能的可编程接口 电路如下图,它包括一个输入接口,其组成主要是 八位的三态门 ;一个输出接口,其组成主要是 八位的锁存器 ;另外还有八位的 多路转换开关 及控制这个开关的寄存器 FF 。. 数据端口. 控制端口. 命令寄存器. 方式控制字. 控制信息.

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


5967047

  • 8255A

  • 8253


5967047

  • FF


5967047


5967047

FFFF


5967047

  • 8255A I/O

  • 8253 /

  • 8251 I/O

  • 8259A


7 1 8255a

7.1 8255A

8255AIO8086MCS51Z80CPU8255A3CPU


5967047

8255A

A

B

C


8255a

8255A

AB


8255a1

8255A


5967047

18255A824APA7PA0I/OBPB7PB0I/OCPC7PC0I/OPC7PC0


5967047

PA0PA7

PB0PB7

PC0PC7


5967047

2CPU D7D0RESETCPUA0A1


5967047

D0D7

A0

A1

/CS

/WR

/RD

RESET

CPU


5967047

38255AVCCGNDVCC5V; GND


8255 8086cpu

82558086CPU

    • RAMM/IO=0

  • 8I/O82550300H

    (138)


8255a2

8255A

18255A8255A012---


5967047

28255A 8255A8255

8255AABC0


5967047

18255A3ABAB:


5967047

1

D6

D5

D4

D3

D2

D1

D0

PC3~PC0: 1

0 0

A

00 0

01 1

1x 2

B: 1

0

A

1

0

B

0 0

1 1

PC7~PC4: 1

0 0


5967047

2C10

10


5967047

0

D6

D5

D4

D3

D2

D1

D0

1: 1

0: 0

x

x

x

C1/0

PC0

PC1

PC2

PC3

PC4

PC5

PC6

PC7

0

0

0

0

1

1

1

1

0

0

1

1

0

0

1

1

0

1

0

1

0

1

0

1


5967047

38255A12CCI/O


5967047

1


8255a3

8255A

18255A0

  • 0

  • AB

  • C4(PC7PC4) 4(PC3PC0) 44

  • 16

  • 8255A0LED


5967047

  • 8255

    • 18255

    • 2


5967047

8255AAB0AB


5967047

LED


5967047

A:8020H, B:8022H,

C:8024H, :8026H.

10011001B=99H


5967047

a_port equ 8020h

b_port equ 8022h

ctrl_port equ 8026h

mov al,99h8255

mov dx,ctrl_port

out dx , al

mov dx,a_port

in al,dx

and al,0fh4

mov bx,offset tab1

xlat

mov dx,b_port

out dx,al


5967047

28255A1

A

AA

AA

A8255AACPUCPUA


5967047

  • C

    1PC35A PC4 /STB

    PC5 IBFPC3INTR

    2PC67I/O

    3PC02B


5967047

PB7~PB0

PC2

STBB

INTEB

PC1

IBFB

PC0

INTRB

1B

1

1

2

3

B

2

CPU


5967047

1

8255A1

2

3

4

1/STB>A

2IBFCPU

3INTACPU A

4CPUAIBFINTA


5967047

8255A1

ACPUIBFA


5967047

  • 8255ASTBAIBFA


5967047

8255AAB10A8B81CPUB


5967047

1K0K72KA CPU8255A


5967047

3IBFALED 8255A CPUA CPU 4CPULED51


5967047

8255I/O88H8EH (A:88H B:8AH C:8CH :8EH)

mov al,10111001bA1

loop1 in al,8chC

test al,00100000bIBFA(PC5)

jz loop1

in al,88hLED4

out 8ah,alB

jmp loop1


5967047

38255A1

A

AA

A8255AACPUCPUA


5967047

  • C

    1PC3 ,PC6 ,PC7A

    PC3 /INTR

    PC7 /ACKPC5/OBF

    2PC45I/O

    3PC02B


5967047

PB7~PB0

PC2

INTEB

ACKB

PC1

OBFB

CPU

PC0

INTRB

CPU


5967047

1

8255A1

3

1

4

2

1CPUA/OBFA

28255/ACK8255A

3A/OBFA

4INTACPU


5967047

ACPUIBFA


5967047

OBFAACKA OBFA8255AA ACKAA


5967047

8255AA1810,A


5967047

  • CPUA

  • LED LED

  • KACKCPU

1OBFACK


5967047

mov cx,1010

mov bx,offset xxbx

loop1: mov al,[bx]

out 88h,alA

loop2:in al,8ch C

and al,80hOBFA

jz loop2

,; LED2

call delay

LED 4

inc bx

loop loop110


5967047

A8255AACPUCPUA

48255A2

AA

AA

AA


5967047

8255AAB218255ACI/OB0C3I/O


5967047

8255

1

80868255A0BUFF400HASCII


5967047

1D7D0

2STB

3BUSYBUSY

1

2

3


5967047

mov al,10001010B

out ctrl_port,al

mov al,00000001B;/

out ctrl_port,al ;PC0

mov bx,offset buff400ASCII

mov cx,400

again: mov dl,[bx]

call print_data

inc bx

loop again


5967047

print_data proc dl

print1: in al,c_portC

test al, 00010000bbusyPC4

jnz print1 busy(1-)

mov al,dl

out a_port,alA

mov al,00000000bPC0()

out ctrl_port,al

NOP

NOP

mov al,00000001b PC0

out ctrl_port,al

ret

print_datA endp

/STB

(PC0)


5967047

2

8


5967047

8

1


5967047

ai0bicidei1>ifi8bg8


5967047

a_port equ 80h8255A

b_port equ 82h

c_port equ 84h

ctrl_port equ 86h

datasegment

tab1db 3FH,06H,5BH,4FH,,

dispbuffdb 2,0,0,7,1,0,1,5

dataends


5967047

dispbuff

displayproc ..

mov bx,offset tab1

mov si,offset dispbuffa

mov cx,8

mov ah,80h1000 0000B

disp1:mov al,[si]b

xlat

out a_port,al

mov al,ahc al=1000 0000B

out b_port,alcall delay5msd5ms

shr ah,1e

inc si

loop disp1

ret

displayendp


5967047

3

I/O


5967047

a

b0

c1

b

1

d10ms

e i0dh

f i01ah

g

h0dl

ii1f

ikey_num


5967047

I/O


5967047


5967047


5967047

a

b0

c1

b

1

d10ms

e0j

f

g0

h0i

ikey_num (i, j)


7 2 8253

7. 2 8253

    • CPUCPU

    • /


7 2 82531

7. 2 8253

INTEL8253825331616553562MHz


5967047

8253


5967047

1

0

1

2


5967047

2

CLK

CLK1.

GATE

OUT


8253 8086

82538086

1

2


5967047

8253

8253825382534/


Sc 1 sc 0

SC1 SC0

0 0

0

0 1

1

1 0

2

1 1

<>SC1SC0


Rl l rl 0

RL1 RL0

1 1

16

0 0

0 1

1 0

<>/RLlRL0


5967047

    • 8253CPU

    • GATE

      • (16)CPUCPU

    • 0000XXXXB

88 1000H 0F00H


5967047

STB

H

L


M 2 m 1 m 0

M2 M1 M0

0 0 0

0

0 0 1

1

X 1 0

2

X 1 1

3

1 0 0

4

1 0 1

5

<>M2M1M0


5967047

BCD

0

1

BCD

<>BCD


5967047

8253

10

0

aGATE1

bOUT0

c0OUT01

a

b

c


5967047

INT

8086

8004

MOV AL,10011010B8255A

OUT 8255AL

MOV AL,00H 8255A/,PC00

OUT 8255AL

MOV AL,30H 82530

OUT 8253AL

MOV AL40H82530(4)

OUT 0AL 4=14400s=3840H s

MOV AL38H

OUT 0AL

MOV AL,00000001B 8255/PC01

OUT 8255AL


5967047

1

21

aGATEGATE

bOUT

c0OUT

d

a

d

c

b


5967047

T3T1, T2


5967047

3 2

2

aGATE1CLK

b1CLK0OUT2CLK

c0


5967047

a

c

b


5967047

43

23


5967047

    • OUT

    • GATEOUT

    • nn2OUT 0OUT

  • 0

    • NOUTNCLK11

    • NNCLK[(N+1)/2][(N-1)/2]


5967047

8253030OUT01.19MHz/216 =18.2Hz036H

8253lRAM212H181.19M/1866.1kHz15.13s154H

8253236A4H11901.19MHz/11901kHz20B6H


5967047

8253030OUT01.19MHz/216 =18.2Hz036H

8253lRAM212H181.19M/1866.1kHz15.13s154H

8253236A4H11901.19MHz/11901kHz20B6H


5967047

4

  • :CPU

  • :STB,STB

  • CPU8253CPU

  • 4OUTCPU0OUT


5967047

  • 4

    • GATE1OUT

    • 0OUTCLKOUT

    • OUT1CLK

GATEGATE1


5967047

882530 ,CPU

4


5967047

5

    • OUT;

    • ;

    • GATE(5);

    • 0OUTCLKOUT(OUT1CLK )


5967047

  • 0GATE

8 ,82530 ,CPU8


5967047

8253

  • 8253OUTGATE


5967047

  • 825323

    • OUT23

    • GATE


5967047

  • 0145

    • CPUGATE04

    • CPUGATEGATE

      15


5967047

OUT0145


5967047

8253

11MHz82530.50.5825380H86H


5967047

1

82531MHz11Hz1N


5967047

825365536N1000000

2


5967047

3

113023 02BCD13BCD


5967047

4

mov al,00110101b0

out 86h,al

mov al,000

out 80h,al

mov al,10h

out 80h,al

mov al,01110110b1

out 86h,al

mov al,0e8h103E8H=1000BCD

out 82h,al

mov al,03h

out 82h,al


5967047

2825380H86H825588H 8EH

1

82538255


5967047

8255

PC0

8253

OUT0

1KHz

CLK0

GATE0

+5V


5967047

2

8253CLK1KHz1S

N1/0.001=1000D=03E8H

3

4


5967047

MOV AL,10011011BABC

OUT 8255_CTRL,AL

DELAY1SPROC

MOV AL,00110001B00

16BCD

OUT 8253_CTRL,AL

MOV AL,0

OUT COUNTER0,AL

MOV AL,10H

OUT COUNTER0,AL

AGAIN:IN AL,8255_C OUT1

TEST AL,01

JZ AGAIN

RET

DELAY1SENDP


5967047

3825380H86H 825588H 8EH

1

82538255


5967047

8255

PC0

8253

OUT0

1KHz

CLK0

GATE0

+5V

OUT1

1MHz

CLK1

GATE1

+5V


5967047

2

8253CLK1KHz1S

Nfclk/fout


5967047

3

00 1s

13

4


5967047

4

PC100001KHz


5967047

1

01KHz10100000GATE11KHz


5967047

2

11KHz

3

00041GATE0OUTOUT00


5967047

3

N010000=2710H

4


  • Login