Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Сигнальный МП Motorola DSP56002.pdf
Скачиваний:
22
Добавлен:
26.05.2014
Размер:
2 Мб
Скачать
☆

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

SERIAL COMMUNICATION INTERFACE (SCI)

SCI interrupts may be enabled by programming the SCI control registers before any of the SCI pins are programmed as SCI functions. In this case, only one transmit interrupt can be generated because the transmit data register is empty. The timer and timer interrupt will operate as they do when one or more of the SCI pins is programmed as an SCI function.

6.3.1.1Receive Data (RXD)

This input receives byte-oriented serial data and transfers the data to the SCI receive shift register. Asynchronous input data is sampled on the positive edge of the receive clock (1 × SCLK) if SCKP equals zero. See the DSP56002 Technical Data Sheet for detailed timing information. RXD may be programmed as a general-purpose I/O pin (PC0) when the SCI RXD function is not being used.

6.3.1.2Transmit Data (TXD)

This output transmits serial data from the SCI transmit shift register. Data changes on the negative edge of the asynchronous transmit clock (SCLK) if SCKP equals zero. This output is stable on the positive edge of the transmit clock. See the DSP56002 Technical Data Sheet for detailed timing information. TXD may be programmed as a general-purpose I/O pin (PC1) when the SCI TXD function is not being used.

6.3.1.3SCI Serial Clock (SCLK)

This bidirectional pin provides an input or output clock from which the transmit and/or receive baud rate is derived in the asynchronous mode and from which data is transferred in the synchronous mode. SCLK may be programmed as a general-purpose I/O pin (PC2) when the SCI SCLK function is not being used. This pin may be programmed as PC2 when data is being transmitted on TXD since, in the asynchronous mode, the clock need not be transmitted. There is no connection between programming the PC2 pin as SCLK and data coming out the TXD pin because SCLK is independent of SCI data I/O.

6.3.2SCI Programming Model

The resources available in the SCI are described before discussing specific examples of how the SCI is used. The registers comprising the SCI are shown in Figure 6-8 and Figure

6-9. These registers are the SCI control register (SCR), SCI status register (SSR), SCI clock control register (SCCR), SCI receive data registers (SRX), SCI transmit data registers (STX), and the SCI transmit data address register (STXA). The SCI programming model can be viewed as three types of registers: 1) control – SCR and SCCR in Figure

6-8; 2) status – SSR in Figure 6-8; and 3) data transfer – SRX, STX, and STXA in Figure

6-9. The following paragraphs describe each bit in the programming model.

6 - 12 PORT C MOTOROLA

For More Information On This Product, Go to: www.freescale.com

MOTOROLA

More For

Information

.wwwGoto:

PORT

freescale

C

On

This

com.

 

Product,

13 - 6

Freescale Semiconductor, Inc.

 

23

16

15

14

 

13

12

11

10

9

8

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SCKP

 

 

 

TMIE

TIE

RIE

ILIE

TE

RE

WOMS

RWU

WAKE

SBK

SSFTD

WDS2

WDS1

WDS0

 

 

 

 

 

 

 

 

 

STIR

 

 

 

SCICONTROLREGISTER(SCR)

X:$FFF0

 

 

0

 

 

 

 

 

 

(0)

 

(0)

 

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

 

 

(READ/WRITE)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SCI CLOCK POLARITY TIMER INTERRUPT RATE

TIMER INTERRUPT ENABLE TRANSMIT INTERRUPT ENABLE RECEIVE INTERRUPT ENABLE IDLE LINE INTERRUPT ENABLE TRANSMITTER ENABLE

WORD SELECT BITS SCI SHIFT DIRECTION SEND BREAK

WAKEUP MODE SELECT RECEIVER WAKEUP ENABLE WIRED - OR MODE SELECT RECEIVER ENABLE

 

23

 

8

7

6

 

5

4

3

2

1

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R8

FE

PE

OR

IDLE

RDRF

TDRE

TRNE

 

 

 

 

 

 

 

 

 

 

 

 

 

SCISTATUSREGISTER(SSR)

X:$FFF1

 

 

 

 

0

 

 

 

 

 

 

 

 

(0)

(0)

(0)

(0)

(0)

(0)

(1)

 

 

 

(1)

 

 

(READONLY)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RECEIVED BIT 8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FRAMING ERROR FLAG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TRANSMITTER EMPTY

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PARITY ERROR FLAG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TRANSMITTER DATA REGISTER EMPTY

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OVERRUN ERROR FLAG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RECEIVE DATA REGISTER FULL

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IDLE LINE FLAG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

23

16

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TCM

RCM

SCP

COD

CD11

CD10

CD9

CD8

CD7

CD6

CD5

CD4

CD3

CD2

CD1

CD0

 

 

SCICLOCKCONTROL

X:$FFF2

 

 

0

 

 

 

REGISTER(SCCR)

 

 

 

 

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

(0)

 

 

 

 

 

 

 

 

 

(READ/WRITE)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TRANSMIT CLOCK SOURCE BIT

RECEIVE CLOCK SOURCE BIT

CLOCK PRESCALER CLOCK DIVIDER BITS

CLOCK OUTPUT DIVIDER

NOTE: The number in parentheses is the condition of the bit after hardware reset.

Figure 6-8 SCI Programming Model – Control and Status Registers

(SCI) INTERFACE COMMUNICATION SERIAL

Inc Semiconductor, Freescale

 

.

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