Chapter 11
Serial Interface 0
XI - 28
Operation
Setup Procedure
Description
(6)
Set the SC0STE flag of the SC0MD0 register to
"0" to disable start condition.
(7)
Set the SC0DIR flag of the SC0MD0 register to
"0" to set MSB as a transfer first bit.
(8)
Set the SC0CE1 flag of the SC0MD0 register to
"1" to set the transmission data output edge
"rising" and the received data input edge "falling".
(9)
Set the SC0BRKE flag of the SC0MD2 register to
"0" to select "serial data transmission".
(10) No need at synchronous serial communication.
(11) Set the SC0CMD flag of the SC0MD1 register to
"0" to select "synchronous serial".
(12) Set the SC0MST flag of the SC0MD1 register to
"1" to select clock master (inside clock).
Set the SC0CKM flag to "1" to select "divide by 8"
for source clock.
(13) Set the SC0SBOS, SC0SBIS, SC0SBTS flag of
the SC0MD1 register to "1" to set SBO pin "serial
data output", SBI pin "serial data input", and
SBT pin "serial clock I/O".
Set the SC0IOM flag "0" to set serial data input
from SBI pin.
(14) Set the interrupt level by the SC0TLV1-0 flag of
the serial 0 transmission interrupt control register
(SC0TICR). (Set level 2.)
(6)
Select the start condition.
SC0MD0 (x'3F90')
bp3
: SC0STE
= 0
(7)
Select the first bit to be transfered.
SC0MD0 (x'3F90')
bp4
: SC0DIR
= 0
(8)
Select the transfer edge.
SC0MD0 (x'3F90')
bp7
: SC0CE1 = 1
(9)
Set the SC0MD2 register
Control the output data.
SC0MD2 (x'3F92')
bp0
: SC0BRKE = 0
(10) Set other mode registers.
SC0MD2 (x'3F92')
bp7-3
(11) Set the SC0MD1 register.
Select the communication type.
SC0MD1 (x'3F91')
bp0
: SC0CMD = 0
(12) Select the transfer clock.
SC0MD1 (x'3F91')
bp2
: SC0MST = 1
bp3
: SC0CKM = 1
(13) Control the pin function.
SC0MD1 (x'3F91')
bp4
: SC0SBOS = 1
bp5
: SC0SBIS = 1
bp6
: SC0SBTS = 1
bp7
: SC0IOM
= 0
(14) Set the interrupt level.
SC0TICR (x'3FF6')
bp7-6
: SC0TLV1-0= 10