Controlling and Resetting the Port
9-8
9.3
Controlling and Resetting the Port
The synchronous serial port control register (SSPCR) controls the operation
of the synchronous serial port. To configure the serial port, a total of two writes
to the SSPCR are necessary:
1) Write your choices to the configuration bits and place the port in reset by
writing zeros to SSPCR bits XRST and RRST.
2) Write your choices to the configuration bits and take the port out of reset
by writing ones to bits XRST and RRST.
Note:
Set the DLB bit of the SSPCR to zero to disable digital loopback mode, which
is not normally used in serial transfers. See subsection 9.7.1,
Test Bits, for
a description of digital loopback mode.
Make sure you write your configuration choices to the SSPCR during both
writes.
Figure 9–3 shows the 16-bit memory-mapped SSPCR. Following the figure is
a description of each of the bits.
Figure 9–3. Synchronous Serial Port Control Register (SSPCR)
— I/O-Space Address FFF1h
ÁÁ
ÁÁ
ÁÁÁÁÁ
ÁÁÁÁÁ
15
ÁÁÁÁ
ÁÁÁÁ
14
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
13
ÁÁÁÁÁ
ÁÁÁÁÁ
12
ÁÁÁÁ
ÁÁÁÁ
11
ÁÁÁÁ
ÁÁÁÁ
10
ÁÁÁÁ
ÁÁÁÁ
9
ÁÁÁÁ
ÁÁÁÁ
8
Á
Á
ÁÁ
ÁÁ
ÁÁ
ÁÁÁÁÁ
Á
ÁÁÁ
Á
ÁÁÁÁÁ
FREE
ÁÁÁÁ
ÁÁÁ
Á
ÁÁÁÁ
SOFT
ÁÁÁÁÁÁ
Á
ÁÁÁÁ
Á
ÁÁÁÁÁÁ
TCOMP
ÁÁÁÁÁ
Á
ÁÁÁ
Á
ÁÁÁÁÁ
RFNE
ÁÁÁÁ
Á
ÁÁ
Á
ÁÁÁÁ
FT1
ÁÁÁÁ
Á
ÁÁ
Á
ÁÁÁÁ
FT0
ÁÁÁÁ
Á
ÁÁ
Á
ÁÁÁÁ
FR1
ÁÁÁÁ
Á
ÁÁ
Á
ÁÁÁÁ
FR0
Á
Á
Á
ÁÁ
ÁÁÁÁÁ
R/W–0
ÁÁÁÁ
R/W–0
ÁÁÁÁÁÁ
R–0
ÁÁÁÁÁ
R–0
ÁÁÁÁ
R/W–0
ÁÁÁÁ
R/W–0
ÁÁÁÁ
R/W–0
ÁÁÁÁ
R/W–0
Á
ÁÁ
ÁÁ
ÁÁ
ÁÁÁÁÁ
Á
ÁÁÁ
Á
ÁÁÁÁÁ
7
ÁÁÁÁ
ÁÁÁ
Á
ÁÁÁÁ
6
ÁÁÁÁÁÁ
Á
ÁÁÁÁ
Á
ÁÁÁÁÁÁ
5
ÁÁÁÁÁ
Á
ÁÁÁ
Á
ÁÁÁÁÁ
4
ÁÁÁÁ
Á
ÁÁ
Á
ÁÁÁÁ
3
ÁÁÁÁ
Á
ÁÁ
Á
ÁÁÁÁ
2
ÁÁÁÁ
Á
ÁÁ
Á
ÁÁÁÁ
1
ÁÁÁÁ
Á
ÁÁ
Á
ÁÁÁÁ
0
Á
Á
Á
ÁÁ
ÁÁ
ÁÁÁÁÁ
ÁÁÁÁÁ
OVF
ÁÁÁÁ
ÁÁÁÁ
IN0
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
XRST
ÁÁÁÁÁ
ÁÁÁÁÁ
RRST
ÁÁÁÁ
ÁÁÁÁ
TXM
ÁÁÁÁ
ÁÁÁÁ
MCM
ÁÁÁÁ
ÁÁÁÁ
FSM
ÁÁÁÁ
ÁÁÁÁ
DLB
Á
Á
ÁÁ
ÁÁ
ÁÁÁÁÁ
ÁÁÁÁÁ
R–0
ÁÁÁÁ
ÁÁÁÁ
R–0
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
R/W–1
ÁÁÁÁÁ
ÁÁÁÁÁ
R/W–1
ÁÁÁÁ
ÁÁÁÁ
R/W–0
ÁÁÁÁ
ÁÁÁÁ
R/W–0
ÁÁÁÁ
ÁÁÁÁ
R/W–0
ÁÁÁÁ
ÁÁÁÁ
R/W–0
Á
Á
ÁÁ
ÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Note:
R=Read access; W=Write access; value following dash (–) is value after reset.
Á
Á
Bits 15–14
FREE, SOFT. These bits are special emulation bits that determine the state
of the serial port clock when a breakpoint is encountered in the high-level lan-
guage debugger. If the FREE bit is set to 1, then, upon a breakpoint, the clock
continues to run (that is, free runs) and data is shifted out. In this case, SOFT
is a
don’t care. If FREE = 0, then SOFT takes effect. The effects of FREE and
SOFT are summarized in Table 9–2. At reset, immediate stop mode is se-
lected (FREE = 0 and SOFT = 0).