Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Микроконтроллер Motorola 68HC11.pdf
Скачиваний:
37
Добавлен:
26.05.2014
Размер:
985.62 Кб
Скачать

RDRF — Receive Data Register Full Flag

This flag is set if a received character is ready to be read from SCDR. Clear the RDRF flag by reading SCSR with RDRF set and then reading SCDR.

0 = SCDR empty

1 = SCDR full

IDLE — Idle Line Detected Flag

This flag is set if the RxD line is idle. Once cleared, IDLE is not set again until the RxD line has been active and becomes idle again. The IDLE flag is inhibited when RWU = 1. Clear IDLE by reading SCSR with IDLE set and then reading SCDR.

0 = RxD line is active

1 = RxD line is idle

OR — Overrun Error Flag

OR is set if a new character is received before a previously received character is read from SCDR. Clear the OR flag by reading SCSR with OR set and then reading SCDR.

0 = No overrun

1 = Overrun detected

NF — Noise Error Flag

7

NF is set if majority sample logic detects anything other than a unanimous decision.

Clear NF by reading SCSR with NF set and then reading SCDR.

 

0 =

Unanimous decision

 

1 =

Noise detected

 

FE — Framing Error

FE is set when a zero is detected where a stop bit was expected. Clear the FE flag by reading SCSR with FE set and then reading SCDR.

0 = Stop bit detected

1 = Zero detected

Bit 0 — Not implemented

Always reads zero.

7.6.5 Baud Rate Register

Use this register to select different baud rates for the SCI system. The SCP[1:0]

(SCP[2:0] in MC68HC(7)11E20) bits function as a prescaler for the SCR[2:0] bits. Together, these five bits provide multiple baud rate combinations for a given crystal frequency. Normally, this register is written once during initialization. The prescaler is set to its fastest rate by default out of reset, and can be changed at any time. Refer to Table 7-1 and Table 7-2 for normal baud rate selections.

BAUD — Baud Rate

 

 

 

 

 

 

$102B

 

Bit 7

6

5

4

3

2

1

Bit 0

 

 

 

 

 

 

 

 

 

 

 

TCLR

SCP2

SCP1

SCP0

RCKB

SCR2

SCR1

SCR0

 

RESET:

 

 

 

 

 

 

 

 

 

0

0

0

0

0

U

U

U

 

M68HC11 E SERIES

SERIAL COMMUNICATIONS INTERFACE

 

MOTOROLA

TECHNICAL DATA

 

 

 

 

 

 

7-9

TCLR — Clear Baud Rate Counters (Test)

SCP[2:0] — SCI Baud Rate Prescaler Selects

Note that SCP2 applies to MC68HC(7)11E20 only. When SCP2 = 1, SCP[1:0] must equal zeros. Any other values for SCP[1:0] are not decoded in the prescaler and the results are unpredictable. Refer to the SCI baud rate generator block diagrams.

Table 7-1 Baud Rate Prescaler Selects

 

Prescaler Selects

Divide Internal

 

Crystal Frequency (MHz)

 

 

SCP2

SCP1

SCP0

Clock By

4.0

4.9152

8.0

8.3886

12.0

 

 

 

 

 

 

 

 

 

 

 

0

0

0

1

62500

76800

125000

131072

187500

 

 

 

 

 

 

 

 

 

 

 

0

0

1

3

20833

25600

41667

43691

62500

 

 

 

 

 

 

 

 

 

 

 

0

1

0

4

15625

19200

31250

32768

46875

 

 

 

 

 

 

 

 

 

 

 

0

1

1

13

4800

5907

9600

10082

14423

 

 

 

 

 

 

 

 

 

 

 

1

0

0

39

1602

1969

3205

3361

4808

 

 

 

 

 

 

 

 

 

 

7

1

0

1

 

 

Do Not Use

 

 

 

 

 

 

 

 

 

 

 

1

1

0

 

 

Do Not Use

 

 

 

 

 

 

 

 

 

 

 

1

1

1

 

 

Do Not Use

 

 

 

 

 

 

 

 

 

 

 

RCKB — SCI Baud Rate Clock Check (Test)

SCR[2:0] — SCI Baud Rate Selects

Selects receiver and transmitter bit rate based on output from baud rate prescaler stage. Refer to the SCI baud rate generator block diagrams.

Table 7-2 Baud Rate Selects

 

Divide

 

 

Highest Baud Rate

 

 

SCR[2:0]

Prescaler

 

(Prescaler Output from Previous Table)

 

 

By

131072

76800

 

32768

 

19200

4800

 

 

 

 

 

 

 

 

 

0 0 0

1

131072

76800

 

32768

 

19200

4800

 

 

 

 

 

 

 

 

 

0 0 1

2

65536

38400

 

16384

 

9600

2400

 

 

 

 

 

 

 

 

 

0 1 0

4

32768

19200

 

8192

 

4800

1200

 

 

 

 

 

 

 

 

 

0 1 1

8

16384

9600

 

4096

 

2400

600

 

 

 

 

 

 

 

 

 

1 0 0

16

8192

4800

 

2048

 

1200

300

 

 

 

 

 

 

 

 

 

1 0 1

32

4096

2400

 

1024

 

600

150

 

 

 

 

 

 

 

 

 

1 1 0

64

2048

1200

 

512

 

300

75

 

 

 

 

 

 

 

 

 

1 1 1

128

1024

600

 

256

 

150

 

 

 

 

 

 

 

 

 

The prescaler bits, SCP[2:0], determine the highest baud rate, and the SCR[2:0] bits select an additional binary submultiple ( 1, 2, 4, through 128) of this highest baud rate. The result of these two dividers in series is the 16X receiver baud rate clock. The SCR[2:0] bits are not affected by reset and can be changed at any time, although they should not be changed when any SCI transfer is in progress.

Figure 7-3 and Figure 7-4 illustrate the SCI baud rate timing chain. The prescaler select bits determine the highest baud rate. The rate select bits determine additional divide by two stages to arrive at the receiver timing (RT) clock rate. The baud rate clock is the result of dividing the RT clock by 16.

MOTOROLA

SERIAL COMMUNICATIONS INTERFACE

M68HC11 E SERIES

7-10

 

TECHNICAL DATA

EXTAL

OSCILLATOR

 

INTERNAL BUS CLOCK (PH2)

 

AND

 

 

 

 

CLOCK GENERATOR

3

4

13

XTAL

(

 

4)

 

 

 

 

 

 

 

 

 

SCP[1:0]

 

 

 

 

 

 

 

 

 

0:0

0:1

1:0

1:1

 

 

 

E

 

 

 

 

 

 

AS

SCR[2:0]

 

 

 

 

 

 

 

 

 

 

 

 

0:0:0

 

 

 

 

 

2

0:0:1

 

 

 

 

 

2

0:1:0

 

 

 

 

 

2

0:1:1

 

 

 

 

 

 

 

16

 

 

 

 

2

1:0:0

 

 

 

 

 

 

 

SCI

 

 

 

 

2

1:0:1

TRANSMIT

 

 

 

 

BAUD RATE

 

 

 

 

 

(1X)

 

 

 

 

2

1:1:0

 

 

 

 

 

2

1:1:1

SCI

 

 

 

 

 

 

 

 

 

 

 

 

RECEIVE

 

 

 

 

 

 

BAUD RATE

 

 

 

 

 

(16X)

 

7

SCI BAUD GENERATOR

Figure 7-3 SCI Baud Rate Generator Block Diagram

M68HC11 E SERIES

SERIAL COMMUNICATIONS INTERFACE

MOTOROLA

TECHNICAL DATA

 

7-11

Соседние файлы в предмете Радиоприемные устройства