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

第 4 章 中断系统、定时器 / 计数器和串行口 PowerPoint PPT Presentation


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

第 4 章 中断系统、定时器 / 计数器和串行口. 4 .1 中断系统 4.2 定时器 / 计数 4.3 串行口. 4.1 中断系统. 一、输入 / 输出方式及中断的概念 1. 输入 / 输出方式 CPU 与外设的信息交换称为输入 / 输出。输入 / 输出方式有三 种。 无条件传送方式. 数据的传送取决于程序执行输入 / 输出指令,而与外设的状态无关。它适合于与 CPU 同步的快速设备或状态已知外设,软、硬件系统简单。如:驱动继电器、驱动数码显示器等。.

Download Presentation

第 4 章 中断系统、定时器 / 计数器和串行口

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


4

4 /

4.1

4.2 /

4.3


4

4.1

/

1./

CPU//

/CPU


4

CPU

CPUCPUCPU


4

2

(1) : CPUCPU

(2) :

(3) :

(4) : CPUCPU

(5) :CPU

(6) :CPU

CPU


89s51

89S51

89S5152


4

TCON

SCON


4

IE


4

IP 89S512

IP1

0


4

89S51


4

1.

CPU


4

2.

  • 1

  • CPUEA=1=1

  • RETIIEIP


4

3.

  • PC

    LCALL

  • 89S51


4

4.

5.

RETI:

(1)

(2) PC

6.

CPU


4

89S51

CPU

1.

2.


4

T4


4

4.2 /

89S5116/T0T1

/T0T1

1.

/T0T1

TH0,TLO.TH1,TL1


2 tmod

2.TMOD

TMOD/


3 tcon

3.TCON


T0 t1

/T0T1

/


4

1.0

T0T1/013

0

C/ =0C/ =1

TH0TF0=1TF0


4

t

t=x

=2x12/fosc

xfoscfosc=12MHz0 T=2012/fosc=8.192ms


4

1 T10

t=5msTR1

0M1M0=00 C/ =0

TR1GATE=0

t=5msx=3192=110001111000B

x511000BTL15TL130

x1100011BTH1TH1=63H

TL1=18H

STARTMOV TMOD#00HT10

MOV TH1#63H

MOV TL1#18H

SETB TR1 T1


4

2.1

T0T1/116

1

10


4

1

t=x

=x12/fosc

fosc=12MHz1

T= 012/fosc=65.536ms


4

2 T01

10000

1M1M0=01C/ =1

GATE=1

10000x=21610000=55536=0D8F0H

x8TL0xTH0

TH0=0D8HTL0=0F0H

STARTMOV TMOD#0DH T01

MOV TH0#0D8H

MOV TL0#0F0H

SETB TR0 TR0=1T0


4

3.2

T0T1/28

2

TH0TL0TF0=1TH0TL0


4

t=x

= x12/fosc

fosc=12MHz2

T= 012/fosc=0.256ms


4

4.3

T13T03

8/T03


4

T5


4

T0P1.0100ms

fosc=12MHz


4

4.3


4

2.

Baud Rate/b/sTds

1011

10/11/=110b/s

Td=9.1ms


4

1.

SCONPCON


2 scon

10

98TB89RB89

2.SCON

SM0SM14


4

SM223


3 pcon

3.PCON

CHMOS

SMOD1


4

0

1.0

1

CPUSBUF

8fosc/12RXD

TXDfosc/12

8TI=1CPU

2

REN=1

fosc/12RXD

TXD

8SBUF

RI=1CPU


1 2 3

123

1.1

1

CPUSBUF

8

TI=1CPU

TXD

2

REN=1RXD

10

RXD8

RI=0SM2=0

8SBUF

RI=1CPU


2 2 3

2.23

1


4

T6


4

11

2T12

20H


  • Login