EMC EM78612 Computer Hardware User Manual


 
EM78612
Universal Serial Bus Microcontroller
Product Specification (V1.0) 03.22.2006
23
(This specification is subject to change without further notice)
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.
7.4 USB Application
EM78612 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.
7.4.1 Detect PS/2 or USB Mode
When the EM78612 is connected to the bus, the firmware should detect and identify
which type of bus (USB or PS/2) it is connected to. The conditions that influence 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 VDD.
2. The firmware checks the state of R5 [0,1]. If the state with which these two bits is
0b00, 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 2.2K Ohm resistor to V
DD
.
NOTE
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- IO 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.