
EM78M612
Universal Serial Bus Microcontroller Series
This specification may change without further notice
.
2004/4/28 V1.1
26
8.3.2 Wakeup by Port Change Function
Each of the GPIO pins in Port 6 and Port 7 can wakeup the MCU through signal change
from input pin. This function is used to wake-up the MCU automatically from sleep mode. It
also supports the remote wake-up function for USB application.
Any of the Individual pins of Port 6 and Port 7 can be defined to wakeup the MCU by setting
their respective bits, R8 and R9.
8.4 USB Application
EM78M612 is specially designed for USB device application and has many powerful
functions that help the firmware to free itself from complex situation in various aspects of
USB application.
8.4.1 Auto-Detect PS/2 or USB Mode
When the EM78M612 is connected to the bus, it will auto-detect and identify which type of
bus (USB or PS/2) it is connected to. The conditions that influence auto-detect function are
described below
:
1. After a Power-on reset, the initial value of IOCA [0,1] is 0b00. Thus the operation
mode is “Detect mode” and the D+ and D- I/O pins are internal pulled high by 200K
Ohm to V
DD
.
2. The firmware checks the state of R5 [0,1]. If the state with which these two bits is
0x00, set the IOCA [0] to “1” to define the “USB mode.” Otherwise, set the IOCA [1]
to “1,” to define “PS/2 mode.”
3. When the operation mode is defined as “USB mode,” the D- I/O pin is internal pulled
high by a 1.5K Ohm resistor to 3.3V, which is output from a built-in regulator.
4. If the operation mode is in “PS/2 mode,” both of the PS/2 interface I/O pins are
internal pulled high by a 4.7K Ohm resistor to V
DD
.
{NOTE]
If the auto-detect function is not used, the firmware should set the operation mode,
either in USB mode or PS/2 mode, at the beginning of program.
An additional mode, “USB Test Mode” is also available. This mode has no load on D+ and
D- I/O pins, and can only be used in USB Application case. Therefore, an external 1.5K Ohm
resistor is needed to pull up D- I/O pin to 3.3V.
Under “PS/2 mode,” both PS/2 pins are programmed to generate an interrupt. After setting
the Port 5 State change to Interrupt Enable bit, the MCU will interrupt while the state of these
two pins changes.