English
Language : 

HT48R068B_15 Datasheet, PDF (78/118 Pages) Holtek Semiconductor Inc – Enhanced I/O 8-Bit OTP MCU
HT48R068B/HT48R069B
Enhanced I/O 8-Bit OTP MCU
Bit 0
TRF: SPI Transmit/Receive Complete flag
0: Data is being transferred
1: SPI data transmission is completed
The TRF bit is the Transmit/Receive Complete flag and is set "1" automatically
when an SPI data transmission is completed, but must set to "0" by the application
program. It can be used to generate an interrupt.
SPI Communication
After the SPI interface is enabled by setting the SIMEN bit high, then in the Master Mode, when
data is written to the SIMD register, transmission/reception will begin simultaneously. When the
data transfer is complete, the TRF flag will be set automatically, but must be cleared using the
application program. In the Slave Mode, when the clock signal from the master has been received,
any data in the SIMD register will be transmitted and any data on the SDI pin will be shifted into
the SIMD register. The master should output an SCS signal to enable the slave device before a
clock signal is provided. The slave data to be transferred should be well prepared at the appropriate
moment relative to the SCS signal depending upon the configurations of the CKPOLB bit and CKEG
bit. The accompanying timing diagram shows the relationship between the slave data and SCS signal
for various configurations of the CKPOLB and CKEG bits.
The SPI will continue to function even in the IDLE Mode.
S IM E N = 1 , C S E N = 0 ( E x te r n a l P u ll- H ig h )
SCS
S IM E N , C S E N = 1
S C K (C K P O L B = 1 , C K E G = 0 )
S C K (C K P O L B = 0 , C K E G = 0 )
S C K (C K P O L B = 1 , C K E G = 1 )
S C K (C K P O L B = 0 , C K E G = 1 )
S D O (C K E G = 0 )
S D O (C K E G = 1 )
S D I D a ta C a p tu re
D 7 /D 0 D 6 /D 1 D 5 /D 2 D 4 /D 3 D 3 /D 4 D 2 /D 5 D 1 /D 6 D 0 /D 7
D 7 /D 0 D 6 /D 1 D 5 /D 2 D 4 /D 3 D 3 /D 4 D 2 /D 5 D 1 /D 6 D 0 /D 7
W r ite to S IM D
SPI Master Mode Timing
SCS
S C K (C K P O L B = 1 )
S C K (C K P O L B = 0 )
SDO
S D I D a ta C a p tu re
D 7 /D 0 D 6 /D 1 D 5 /D 2 D 4 /D 3 D 3 /D 4 D 2 /D 5 D 1 /D 6 D 0 /D 7
W r ite to S IM D
( S D O d o e s n o t c h a n g e u n til fir s t S C K e d g e )
SPI Slave Mode Timing - CKEG=0
Rev. 1.30
78
February 05, 2015