HT46R068B/HT46R069B
Enhanced A/D Type 8-bit OTP MCU
w
i
r
e
t
t
S
o
B
R
D
(
m
a
t
s
r
e
)
S
B
=
E
1
,
N
S
C
N
E
=
0
i
(
f
p
h
g
u
i
h
l
)
l
e
-
d
S
B
=
E
C
N
E
S
=
N
1
S
S
C
S
K
C
D
/
7
0
D
6
D
D
/
1
D
/
5
2
D
D
/
4
3
D
3
D
D
/
4
D
/
2
5
D
1
D
D
/
6
D
/
0
7
D
S
I
D
D
/
7
0
D
6
D
D
/
1
D
/
5
2
D
4
D
D
/
3
D
/
3
4
D
2
D
D
/
5
D
/
1
6
D
D
/
0
7
D
S
O
D
S
K
C
SPIA Bus Timing
SPIA Operation
All communication is carried out using the 4-line interface for both Master or Slave Mode. The
timing diagram shows the basic operation of the bus.
The CSEN bit in the SBCR register controls the overall function of the SPIA interface. Setting this
bit high, will enable the SPIA interface by allowing the SCSA line to be active, which can then be
used to control the SPIA inteface. If the CSEN bit is low, the SPIA interface will be disabled and
the SCSA line will be in a floating condition and can therefore not be used for control of the SPIA
interface. The SBEN bit in the SBCR register must also be high which will place the SDIA line
in a floating condition and the SDOA line high. If in Master Mode the SCKA line will be either
high or low depending upon the clock polarity configuration option. If in Slave Mode the SCKA
line will be in a floating condition. If SBEN is low then the bus will be disabled and SCSA, SDIA,
SDOA and SCKA will all be in a floating condition.
In the Master Mode the Master will always generate the clock signal. The clock and data
transmission will be initiated after data has been written to the SBDR register. In the Slave Mode,
the clock signal will be received from an external master device for both data transmission or
reception. The following sequences show the order to be followed for data transfer in both Master
and Slave Mode:
● Master Mode:
Step 1
●
Select the clock source using the CKS bit in the SBCR control register.
Step 2
●
Setup the M0 and M1 bits in the SBCR control register to select the Master Mode and the
required Baud rate. Values of 00, 01 or 10 can be selected.
Step 3
●
Setup the CSEN bit and setup the MLS bit to choose if the data is MSB or LSB first, this must
be same as the Slave device.
Step 4
●
●
Setup the SBEN bit in the SBCR control register to enable the SPIA interface.
Step 5
For write operations: write the data to the SBDR register, which will actually place
the data into the TXRX buffer. Then use the SCKA and SCSA lines to output the data.
Rev. 1.00
100
�anꢀaꢁꢂ ꢃꢄꢅ ꢃ011