CMT2380F17
Rev0.1 | 254/347
www.cmostek.com
20.4
Daisy-Chain Connection
If SPI0 is defined in slave mode, it can be connected in a daisy-chain configuration. The first slave output
is connected to the second slave input, the second slave output is connected to the third slave input, and so
on. The final slave output is connected to the master input. Each slave sends out, during a second group of
clock pulses, an exact copy of what was received during the first group of clock pulses. The whole chain acts
as one large communication shift register. The daisy-chain feature only requires a single Slave Select line
(nSS) from the master device.
Figure 20
–9. SPI single master multiple slaves configuration
20.4.1
Configuring the Daisy-Chain
How to Configure SPI Slave in Daisy-Chain
Configure SPCON to define the data mode and select SPI0 in slave mode.
Set SPI0M0 (AUXR7.4) to enable SPI0 in Daisy-Chain mode.
Service SPIF to get daisy-chain communication.
。
20.5
SPI Register
The following special function registers are related to the SPI operation:
SPCON
:
SPI Control Register
SFR Page
= 0~F
SFR Address = 0x85
Bit
7
6
5
4
3
2
1
0
Name
SSIG
SPEN
DORD
MSTR
CPOL
CPHA
SPR1
SPR0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset Value
0
0
0
0
0
1
0
0
Bit 7: SSIG, nSS is ignored.
0: The nSS pin decides whether the device is a master or slave. 1: MSTR decides whether the device is a
master or slave.
Bit 6: SPEN, SPI enable.
0: The SPI interface is disabled and all SPI pins will be general-purpose I/O ports. 1: The SPI is enabled.
Bit 5: DORD, SPI data order.
0: The MSB of the data byte is transmitted first. 1: The LSB of the data byte is transmitted first.
Bit 4: MSTR, Master/Slave mode select 0: Selects slave SPI mode.
1: Selects master SPI mode.
Summary of Contents for CMT2380F17
Page 27: ...CMT2380F17 Rev0 1 27 347 www cmostek com 1 25 Phase Noise...
Page 177: ...CMT2380F17 Rev0 1 177 347 www cmostek com Figure 17 3 PCA Interrupt System...
Page 246: ...CMT2380F17 Rev0 1 246 347 www cmostek com SnMIPS S0MI S1MI 1 P3 3 P4 7...