English
Language : 

HT66FB30_12 Datasheet, PDF (14/26 Pages) Holtek Semiconductor Inc – Enhanced A/D Flash Type 8-Bit MCU
HT66FB30/HT66FB40/HT66FB50/HT66FB60
Multi-chip Programming Considerations
To use the USB function, several important steps must
be implemented to ensure that the SPI to USB chip op-
erates normally:
· The SPI pin-remapping function must be properly
configured when the SPI functional pins of the
microcontroller are used to control the SPI to USB
chip and for transmission and reception.
To ensure proper setup between the MCU Master SPI
interface to the SPI to USB chip Slave SPI, the SIM
pin-remapping settings for PCK and PINT in the MCU
PRM0 register should be setup as shown in the follow-
ing table.
¨ HT66FB30 PRM0 Register -
PCK and PINT pin-remap setup
Bit
Name
Setting Value
1
SIMPS0
1
0
PCKPS
1
¨ HT66FB40/HT66FB50 PRM0 Register -
PCK and PINT pin-remap setup
Bit
2
1
0
Name
SIMPS1 SIMPS0 PCKPS
Setting Value
0
1
1
¨ HT66FB60 PRM0 Register -
PCK and PINT pin-remap setup
Bit
2
1
0
Name
SIMPS1 SIMPS0 PCKPS
Setting Value
1
1
1
· The PCK control bit is set to 1 to enable the PCK out-
put as the clock source for the USB external clock in-
put with various PCK output frequencies determined
by the PCKP1 and PCKP0 bits in the SIMC0 Register.
¨ PCK output frequency selection bits PCKP1~
PCKP0 in the SIMC0 Register
Bit
Name
Setting Value
1
0
PCKP1
PCKP0
11, 10, 01 or 00
00: PCK output frequency is fSYS
01: PCK output frequency is fSYS/4
10: PCK output frequency is fSYS/8
11: PCK output frequency is TM0 CCRP match
frequency/2
¨ PCK output enable control bit PCKEN in the SIMC0
Register
Bit
Name
Setting Value
4
PCKEN
1
0: Disable PCK output
1: Enable PCK output
After the above setup conditions have been imple-
mented, the MCU can enable the SIM interface by set-
ting the SIMEN bit high. The MCU can then begin
communication with external USB connected appli-
ances using its SPI interface. The detailed functional
descriptions of the MCU Master SPI are provided within
the Serial Interface Module section of the relevant MCU
datasheet.
· The SIM operating mode control bits SIM2~SIM0 in
the SIMC0 register have to be configured to enable
the SIM to operate in the SPI master mode with a dif-
ferent SPI clock frequency.
¨ SIM operating mode control bits SIM2~SIM0 in the
SIMC0 Register
Bit
2
1
0
Name
SIMPS1 SIMPS0 PCKPS
Setting Value
1
1
1
000: SPI master mode; SPI clock is fSYS/4
001: SPI master mode; SPI clock is fSYS/16
010: SPI master mode; SPI clock is fSYS/64
011: SPI master mode; SPI clock is fTBC
100: SPI master mode; SPI clock is TM0 CCRP
match frequency/2
101~111: must not be used
Rev. 1.30
14
December 12, 2012