SYNCHRONOUS SERIAL INTERFACE (SSI)
6 - 152
PORT C
MOTOROLA
When a word is received, it is put into the circular buffer and loops to wait for another data
word. The data in the circular buffer will be overwritten after three words are received
(does not matter in this application).
;*************************************************
;
SSI and other I/O EQUATES
*
;*************************************************
CRA
EQU
$FFEC
CRB
EQU
$FFED
PCC
EQU
$FFE1
PCD
EQU
$FFE5
SSISR
EQU
$FFEE
RX
EQU
$FFEF
PCDDR
EQU
$FFE3
;*************************************************
;
MAIN PROGRAM
*
;*************************************************
ORG
P:$40
MOVE
#0,R0
;Pointer to data buffer
MOVE
#2,M0
;Length of buffer is 3
MOVEP #$001F,X:CRA
;Set Word Length=8, CLK=5.12/32 MHz.
MOVEP #$1E30,X:CRB
;Enable receiver, Mode=On-Demand,
;gated clock on, synchronous mode,
;Word frame sync selected, frame
;sync and clock are external.
MOVEP #$1F0,X:PCC
;Set PCC for SSI
LOOP
RDF1
JCLR
#7,X:SSISR,RDF1 ;Wait for RDF (receive data register
;Full) go to high.
MOVEP X:RX,X:(R0)+
;Read data from RX into memory.
JMP
LOOP
;Continue sequence forever.
END
Figure 6-86 On-Demand Mode Receive Example Program
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
.
..