HT82A851R
Rev. 1.20
18
June 15, 2007
The USR (USB endpoint interrupt status register) register is used to indicate which endpoint is accessed and to select
the serial bus (USB). The endpoint request flags (EP0F, EP1F, EP2F, EP3F, EP4F) are used to indicate which end-
points are accessed. If an endpoint is accessed, the related endpoint request flag will be set to 1 and the USB inter-
rupt will occur (if the USB interrupt is enabled and the stack is not full). When the active endpoint request flag is
serviced, the endpoint request flag has to be cleared to 0 by software.
Bit No.
Label
R/W
Reset
Functions
0
EP0F
R/W
0
When this bit is set to 1 (set by SIE), it indicates that endpoint 0 has
been accessed and a USB interrupt will occur. When the interrupt has
been serviced, this bit should be cleared by software.
1
EP1F
R/W
0
When this bit is set to 1 (set by SIE), it indicates that endpoint 1 has
been accessed and a USB interrupt will occur. When the interrupt has
been serviced, this bit should be cleared by software.
2
EP2F
R/W
0
When this bit is set to 1 (set by SIE), it indicates that endpoint 2 has
been accessed and a USB interrupt will occur. When the interrupt has
been serviced, this bit should be cleared by software.
3
EP3F
R/W
0
When this bit is set to 1 (set by SIE), it indicates that endpoint 3 has
been accessed and a USB interrupt will occur. When the interrupt has
been serviced, this bit should be cleared by software.
4
EP4F
R/W
0
When this bit is set to 1 (set by SIE), it indicates that endpoint 4 has
been accessed and a USB interrupt will occur. When the interrupt has
been serviced, this bit should be cleared by software.
5~7
Undefined bit, read as 0 .
USR (21H) Register
There is a system clock control register implemented to select the clock used in the MCU. This register consists of a
USB clock control bit (USBCKEN), a second suspend mode control bit (SUSP2) and a system clock selection bit
(SYSCLK).
The endpoint selection is determined by EPS2, EPS1 and EPS0.
Bit No.
Label
R/W
Reset
Functions
0~2
EPS0~
EPS2
R/W
0
Accessing endpoint FIFO selection, EPS2, EPS1, EPS0:
000: Select endpoint 0 FIFO
001: Select endpoint 1 FIFO
010: Select endpoint 2 FIFO
011: Select endpoint 3 FIFO
100: Select endpoint 4 FIFO
101: reserved for future expansion, cannot be used
110: reserved for future expansion, cannot be used
111: reserved for future expansion, cannot be used
If the selected endpoints do not exist, the related function will be
absent.
3
USBCKEN
R/W
0
USB clock control bit. When this bit is set to 1 , it indicates that the
USB clock is enabled. Otherwise, the USB clock is turned-off.
4
SUSP2
R/W
0
Thisbitisusedforreducingpowerconsumptioninthesuspendmode.
In normal mode, clear this bit to 0
In the HALT mode, set this bit to 1 to reducing power consumption.
5
f
SYS
16MHz
R/W
0
DefinestheMCUsystemclock-sourcedfromtheexternalOSCorfrom
the PLL output - 16MHz clock.
0: system clock sourced from OSC
1: system clock sourced from the PLL output - 16MHz
6
SYSCLK
R/W
0
Used to specify the system clock oscillator frequency used by MCU.
If a 6MHz crystal oscillator or resonator is used, this bit should be set to
1 .
If a 12MHz crystal oscillator or resonator is used. this bit should be
cleared to 0 .
UCC (22H) Register