Panasonic MN101C00 Cell Phone User Manual


 
Chapter 5 Serial Functions
94
5-2 Synchronous Serial Interface
5-2-1 Overview
A serial interface begins operation when data is written to the shift buffer. A bit
counter is incremented at each 1-bit transfer. The transfer is complete when the
counter overflows.
Bit transfers of an arbitrary 1 to 8 bits can be performed. The transfer bit count must
be set before performing the transfer.
5-2-2 Setup and Operation
Transmission
(1) Select the synchronous serial interface by setting the SC0CMD flag of the
serial interface 0 control register (SC0CTR) to "0."
(2) Select the transfer bit count with the SC0LNG2 to 0 flags of the serial
interface 0 mode register 0 (SC0MD0). The transfer bit count can be
set as 1 to 8 bits.
(3) Specify whether the start condition is enabled or disabled with the SC0STE
flag of the SC0MD0 register.
(4) Specify the first bit to be transferred (MSB first or LSB first) with the
SC0DIR flag of the SC0MD0 register.
(5) Select the valid edge of the clock signal with the SC0CE1 to 0 flags of the
SC0MD0 register.
(6) When the clock source is an internal clock:
Select the clock source with the SC0CK1 to 0 flags of serial interface 0
mode register 1 (SC0MD1).
Set the SC0CKM flag of the SC0MD1 register specify whether or not the
clock source frequency will be divided by 8.
Select serial clock operation by setting the SC0SBTS flag of the serial
interface 0 mode register 3 (SC0MD3) to "1."
Set the SC0SBTM flag of the SC0MD3 register.
Set bit 0 of the port 0 direction control register (P0DIR) to the output
mode.
Set bit 0 of the port 0 pull-up resistor control register (P0PLU).
Synchronous Serial Interface
[ Section 5-2-3, "Serial
Interface Transfer Timing"]