
C165H
High-Speed Synchronous Serial Interface
Data Sheet
293
2001-04-19
PRELMNARY
the pin control logic (see block diagram). Transmission and reception of serial data is
synchronized and takes place at the same time, ie. the same number of transmitted bits
is also received. Transmit data is written into the Transmit Buffer SSCTB. It is moved to
the shift register as soon as this is empty. An SSC-master (SSCMS=’1’) immediately
begins transmitting, while an SSC-slave (SSCMS=’0’) will wait for an active shift clock.
When the transfer starts, the busy flag SSCBSY is set and a transmit interrupt request
(SSCTIR) will be generated to indicate that SSCTB may be reloaded again. When the
programmed number of bits (2...16) has been transferred, the contents of the shift
register are moved to the Receive Buffer SSCRB and a receive interrupt request
-EXCERPT-
SSCCON (FFB2
H
/ D9
H
)
15
14
SFR
Reset Value: 0000
H
3
2
Note:
The target of an access to SSCCON (control bits or flags) is determined by the
state of SSCEN prior to the access, ie. writing C057
H
to SSCCON in programming
mode (SSCEN=’0’) will initialize the SSC (SSCEN was ‘0’) and then turn it on
(SSCEN=’1’).
When writing to SSCCON, make sure that reserved locations receive zeros.
Bit
Function (Operating Mode, SSCEN =
‘
1
’
)
SSCBC
SSC Bit Count Field
Shift counter is updated with every shifted bit.
Do not write to!!!
SSCTE
SSC Transmit Error Flag
1 :
Transfer starts with the slave
’
s transmit buffer not being updated
SSCRE
SSC Receive Error Flag
1 :
Reception completed before the receive buffer was read
SSCPE
SSC Phase Error Flag
1 :
Received data changes around sampling clock edge
SSCBE
SSC Baudrate Error Flag
1 :
More than factor 2 or 0.5 between Slave
’
s actual and expected
baudrate
SSCBSY
SSC Busy Flag
Set while a transfer is in progress.
Do not write to!!!
SSCMS
SSC Master Select Bit
0 :
1 :
Slave Mode. Operate on shift clock received via SCLK.
Master Mode. Generate shift clock and output it via SCLK.
SSCEN
SSC Enable Bit =
‘
1
’
Transmission and reception enabled. Access to status flags and M/S control.
5
4
1
0
11
10
9
8
7
6
13
12
-
-
r
rw
rw
-
-
rw
rw
-
rw
-
rw
rw
SSC
BE
SSC
EN=1
SSC
MS
SSC
PE
SSC
RE
SSC
TE
-
SSC
BSY
-
-
-
SSCBC