SYNCHRONOUS SERIAL INTERFACE (SSI)
6 - 144
PORT C
MOTOROLA
;*************************************************
;
Init SSI Interrupt
*
;*************************************************
ANDI
#$FC,MR
;Unmask interrupts.
MOVEP
#$01F8,X:PCC
;Turn on SSI port.
JMP
*
;Wait for interrupt.
;*************************************************
;
MAIN INTERRUPT ROUTINE
*
;*************************************************
RCV
JSET
#0,X:SSISR, RIGHT ;Test SCO flag.
LEFT
MOVEP
X:RX,X:(RO)+
;If SCO clear, receive data
RTI
;into left buffer (R0).
RIGHT
MOVEP
X:RX,X:(R1)+
;If SCO set, receive data
RTI
;into right buffer (R1).
END
Figure 6-79 Network Mode Receive Example Program (Sheet 2 of 2)
6.4.7.3.2
Network Mode Receive
The receive enable will occur only after detection of a new data frame with RE set. The
first data word is shifted into the receive shift register and is transferred to the RX, which
sets RDF if a frame sync was received (i.e., this is the start of a new frame). Setting RDF
will cause a receive interrupt to occur if the receiver interrupt is enabled (RIE=1).
The second data word (second time slot in the frame) begins shifting in immediately after
the transfer of the first data word to the RX. The DSP program has to read the data from
RX (which clears RDF) before the second data word is completely received (ready to
transfer to RX), or a receive overrun error will occur (ROE=1), and the data in the receiver
shift register will not be transferred and will be lost.
If RE is cleared and set again by the DSP program, the receiver will be disabled after re-
ceiving the current time slot in progress until the next frame sync (first time slot). This
mechanism allows the DSP programmer to ignore data in the last portion of a data frame.
Note: The optional frame sync output and clock output signals are not affected, even if
the transmitter and/or receiver are disabled. TE and RE do not disable bit clock and
frame sync generation.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..