
ST10R272L - SYNCHRONOUS SERIAL PORT
245/320
When the programming of the control register SSPCON0 is complete, the transfer is started
with a write to transmit buffer SSPTB0, regardless of the type of operation (read or write
operation).
13.2.6 Performing a Write Operation
If the SPRW bit in register SSPCON0 is reset, a write operation is selected. During a write
operation, information is only transferred from the CPU (master) to the slave peripheral. The
transmit buffers SSPTB2...SSPTB0 are written by the CPU with the information data to be
transferred. Writing to SSPTB0 will start the transfer. The following figure shows the basic
waveforms for a write operation of the SSP.
The length of the transfer is determined through which transmit buffers were written to prior
to the transfer. Internal flags, ‘TBx_Full’, are used for this purpose. These flags are set
through a write to the corresponding transmit buffer register. SSPTB0 must be written in any
case in order to start the transfer. Writing only to SSPTB0 will perform an 8-bit transfer of the
content of SSPTB0. When the last bit is shifted out completely, the TB0_Full flag is reset. To
start the next transfer, SSPTB0 must be written through software again, even if the same
information data as for previous transfer should be transferred.
Content of SSPTBx registers are undefined after a write operation.
Figure 100 Write operation waveforms
SSPCLK
SSPCEx
SSPDAT
Bit 23/15/7
Bit 22/14/6
Bit 1
Bit 0
0.5 BT
1 Bit Time
1 BT
0.5 BT 0.5 BT