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

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

SERIAL COMMUNICATION INTERFACE (SCI)

ORG

P:0

;Reset vector

JMP

$40

;

ORG

P:$18

;SCI transmit interrupt vector

MOVEP

Y:(R0)+,X:$FFF4

;Transmit low byte of data

ORG

P:$40

 

MOVEP

#0,X:$FFFE

;Clear BCR

MOVE

#$100,R0

;Data ROM start address

MOVE

#$FF,M0

;Size of data ROM - Wraps around at $200

MOVEC

#6,OMR

;Change operating mode to enable data ROM

MOVEP

#$C000,X:$FFFF

;Interrupt priority register

MOVEP

#$1200,X:$FFF0

;8-bit synchronous mode

MOVEP

#7,X:$FFE1

;Port C control register – enable SCI

MOVEC

#0,SR

;Unmask interrupts

LAB0 JMP

LAB0

;Wait in loop for interrupts

Figure 6-20 SCI Synchronous Transmit

pointers, operating mode register, and the IPR.

The SCI is then configured and the interrupts are unmasked, which starts the data transfer. The jump-to-self instruction (LAB0 JMP LAB0) is used to wait while interrupts transfer the data.

The program shown in Figure 6-21 is the program for receiving data from the program presented in Figure 6-20. The program sets the reset vector to run the program after hardware reset, puts the MOVEP instruction to store the data in a circular buffer starting at $100 at the SCI receive interrupt vector location, puts another MOVEP instruction at the SCI receive interrupt vector location, sets the memory wait states to zero, and configures the memory pointers and IPR. The SCI is then configured and the interrupts are unmasked, which starts the data transfer. The jump-to-self instruction (LAB0 JMP LAB0) is used to wait while interrupts transfer the data.

6.3.7Asynchronous Data

Asynchronous data uses a data format with embedded word sync, which allows an unsynchronized data clock to be synchronized with the word if the clock rate and number of bits per word is known. Thus, the clock can be generated by the receiver rather than requiring a separate clock signal. The transmitter and receiver both use an internal clock that is 16 × the data rate to allow the SCI to synchronize the data. The data format requires that each data byte have an additional start bit and stop bit. In addition, two of the word formats have a parity bit. The multidrop mode used when SCIs are on a common

6 - 44 PORT C MOTOROLA

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

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