
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.
Содержание CMT2380F17
Страница 27: ...CMT2380F17 Rev0 1 27 347 www cmostek com 1 25 Phase Noise...
Страница 111: ...CMT2380F17 Rev0 1 111 347 www cmostek com INT2IS 1 0 Selected Port Pin of nINT2 00 P4 4 01 P3 0 10 P1 1 11 P1 6...
Страница 131: ...CMT2380F17 Rev0 1 131 347 www cmostek com Figure 16 1 Timer 0 Mode 0 Structure Figure15 2 Timer 1 Mode 0 Structure...
Страница 161: ...CMT2380F17 Rev0 1 161 347 www cmostek com Figure 16 32 Split Timer 3 Mode 1 Structure AR with Ex INT...
Страница 177: ...CMT2380F17 Rev0 1 177 347 www cmostek com Figure 17 3 PCA Interrupt System...
Страница 239: ...CMT2380F17 Rev0 1 239 347 www cmostek com Figure 19 5 8 bit Timer Mode Configuration for S1BRG S1TME 1...
Страница 246: ...CMT2380F17 Rev0 1 246 347 www cmostek com SnMIPS S0MI S1MI 1 P3 3 P4 7...
Страница 289: ...CMT2380F17 Rev0 1 289 347 www cmostek com...