English
Language : 

AT90USB646-MU Datasheet, PDF (256/456 Pages) ATMEL Corporation – 8-bit Atmel Microcontroller with 64/128Kbytes of ISP Flash and USB Controller
22.11 ID detection
The ID pin transition is detected thanks to the following architecture:
Figure 22-17. ID detection input block diagram.
UID
VDD
Internal pull up
1
0
UIMOD
UHWCON.7
UIDE
UHWCON.6
ID
USBSTA.1
The ID pin can be used to detect the USB mode (Peripheral or Host) or software selected. This
allows the UID pin to be used has general purpose I/O even when USB interface is enable.
When the UID pin is selected, by default, (no A-plug or B-plug), the macro is in the Peripheral
mode (internal pull-up). The IDTI interrupt is triggered when a A-plug (Host) is plugged or
unplugged. The interrupt is not triggered when a B-plug (Periph) is plugged or unplugged.
ID detection is independent of USB global interface enable.
22.12 Registers description
22.12.1 USB general registers
Bit
7
6
5
4
3
2
1
0
UIMOD UIDE
UVCONE
UVREGE UHWCON
Read/write
R/W
R/W
R
R/W
R
R
R
R/W
Initial value
1
0
0
0
0
0
0
0
• 7 – UIMOD: USB Mode bit
This bit has no effect when the UIDE bit is set (external UID pin activated). Set to enable the
USB device mode. Clear to enable the USB host mode
• 6 – UIDE: UID pin Enable
Set to enable the USB mode selection (peripheral/host) through the UID pin. Clear to enable the
USB mode selection (peripheral/host) with UIMOD bit register.
UIDE should be modified only when the USB interface is disabled (USBE bit cleared).
• 5 – Reserved
The value read from this bit is always 0. Do not set this bit.
• 4 – UVCONE: UVCON pin Enable
Set to enable the UVCON pin control. Clear to disable the UVCON pin control. This bit should be
set only when the USB interface is enable.
256 AT90USB64/128
7593L–AVR–09/12