PEB 20534
Multi Function Port (MFP)
Semiconductor Group 121 Data Sheet 09.98
After performing all necessary initializations of the SSC, the serial interfaces can be
enabled. For a master device, the alternate clock line will now go to its programmed
polarity . The alternat e data l ine w ill go to eithe r ’0’ o r ’1’, until the fi rst tran sfer w ill s tart.
After a transfer the alternate data line will always remain at the logic level of the last
transmitted data bit.
When the serial interface is enabled, the master device can initiate the first data transfer
by writing the transmit data into register SSCTB. This value is copied into the shift
register (which is assumed to be empty at this time), and the selected first bit of the
transmit data will be placed onto the MTSR line on the next clock from the baudrate
generator (transmission only starts, if SSCEN=’1’). Depending on the selected clock
phase, a clock pulse will also be generated on the MSCLK line. With the opposite clock
edge the master at the same time latches and shifts in the data detected at its input line
MRST. This ’ex changes’ the trans mit data with th e receive data . Since the cloc k line is
connected to all slaves, their shift registers will be shifted synchronously with the
master's shift register, shifting out the data contained in the registers, and shifting in the
data detected at the input line. After the preprogrammed number of clock pulses (via the
data wi dth selection) th e data transmitted by the mast er is contained in all slaves ’ shift
registers, while the master's shift register holds the data of the selected slave. In the
master and all slaves the content of the shift register is copied into the receive buffer
SSCRB and the receive interrupt flag SSCRXI is set.
A slave devic e will imme diately output the selecte d first bit (MSB or LSB of the tran sfer
data) at pin MRST, when the content of the transmit buffer is copied into the slave's shift
register. It will not wait for the next clock from the baudrate generator, as the master
does. The reason is that, depending on the selected clock phase, the first clock edge
generated by the master may already be used to clock in the first data bit. Hence the
slave's first data bit must already be valid at this time.
Note: On the SSC always a transmission and a reception takes place at the same time,
regardless wheth er valid data has been tran smitted or receiv ed. This is diffe rent,
e.g., from asynchronous reception on ASC0.
The initialization of the MSCLK pin on th e ma ste r requi res s om e attention i n ord er to
avoid undesired clock transitions, which may disturb the other receivers. The state of the
internal alternate output lines is '1' as long as the SSC is disabled. This alternate output
signal is ANDed with the respective port line output latch. Enabling the SSC with an idle-
low clock (SSCPO=’0’) will drive the alternate data output and (via the AND) the port pin
MSCLK immediately low. To avoid this, use the following sequence:
• select the clock idle level (SSCPO=’x’),
• load the port output latch with the desired clock idle level (GPDATA.p=’x’),
• switch the pin to output (GPDIR.p=’1’),
• enable the SSC (SSCEN=’1’), and
• if SSCPO=’0’: enable alternate data output (GPDATA.p=’1’).