
HT82J30R/HT82J30A
Rev. 1.00
22
December 20, 2006
Clock polarity= rising (SCK) or falling (SCK): 1 or 0 (mask option).
Modes
Operations
Master
1.
2.
3.
4.
Select CKS and select M1, M0 = 00,01,10
Select CSEN, MLS (the same as the slave)
Set SBEN
Writing data to SBDR
step5
(SIOinternaloperation
buffer
data transferred, data in TXRX buffer is latched into SBDR)
Check WCOL; WCOL= 1
clear WCOL and go to step 4; WCOL= 0
Check TRF or waiting for SBI (serial bus interrupt)
Read data from SBDR
Clear TRF
Go to step 4
data is stored in TXRX buffer
datastoredinTXRXbuffer,andSDIdataisshiftedintoTXRX
output SCK (and SCS) signals
go to
5.
6.
7.
8.
9.
go to step 6
Slave
1.
2.
3.
4.
CKS don t care and select M1, M0= 11
Select CSEN, MLS (the same as the master)
Set SBEN
WritingdatatoSBDR
SCK
go to step 5
bufferandSDIdataisshiftedintoTXRXbuffer
into SBDR)
Check WCOL; WCOL= 1
Check TRF or wait for SBI (serial bus interrupt)
Read data from SBDR
Clear TRF
Go to step 4
dataisstoredinTXRXbuffer
(SIO internal operations
waitingformasterclocksignal(andSCS):
SCK (SCS) received
datatransferred,datainTXRXbufferislatched
output data in TXRX
5.
6.
7.
8.
9.
clear WCOL, go to step 4; WCOL= 0
go to step 6
Operation of Serial Interface
WCOL: master/slave mode, set while writing to SBDR
when data is transferring (transmitting or receiving) and
this writing will then be ignored. WCOL function can be
enabled/disabled by mask option. WCOL is set by SIO
and cleared by users.
Data transmission and reception are still working when
the MCU enters the HALT mode.
CPOL is used to select the clock polarity of SCK. It is a
mask option.
MLS: MSB or LSB first selection.
CSEN: chip select function enable/disable, CSEN=1
SCS signal function is active. Master should output SCS
signal before SCL signal is set and slave data transfer-
ring should be disabled (or enabled) before (after) SCS
signal is received. CSEN= 0, SCS signal is not needed,
SCS pin (master and slave) should be floating. CSEN
has 2 options: CSEN mask option is used to enable/dis-
able software CSEN function. If CSEN mask option is
disabled, the software CSEN is always disabled. If
CSEN mask option is enabled, software CSEN function
can be used.
SBEN= 1
SCS= floating (CSEN= 0); SDI= floating; SDO= 1; mas-
ter SCK= output 1/0 (dependent on CPOLmask option),
slave SCK= floating.
serial bus standby; SCS (CSEN= 1) = 1;
SBEN= 0
SDI=SCK= floating in master mode, SDI=SDO=SCK=
floating, SCS=1 in slave mode.
serial bus disabled; SCS=SDO=1,
TRF is set by SIO and cleared by users. When data
transfer (transmission and reception) is completed, TRF
is set to generate SBI (serial bus interrupt).