p4
22-Nov-10
expandIO-USB
HW148-18
www.firmwarefactory.com
R
es
et
#
P
G
D
V
d
V
ss
TEAclipper
connector 1
5
OSC1
OSC2
D+
Vusb
Figure 2
expandIO-USB
USB
C2
C3
X1
2
3
4
Vdd
Vss
P
G
C
1
2
3
4
Vss
D-
Vss
C1
C6
C7
V
ss
C8
Suspend
AllSysGo
Vdd
Vss
Configured
Tx / Rx Ind
Tx Ind
Rx Ind
Vdd
R2
One LED circuit
for each indicator
(Active low shown)
General purpose I/O
R2x
Oscillator X1/C2/C3 may be replaced by a low-cost
resonator, provided its frequency tolerance is greater
than 0.25% (full speed devices) or 1.5% (low speed
devices). C1 and C6 should be placed close to the USB
connector. Capacitor(s) C7 should be placed near the
Vss and Vdd pin(s) of the expandIO-USB and are only
required if they would be some distance from C6. C8 is
a filter capacitor for an internal regulator and is required.
The TEAclipper connector is for in-circuit programming
of devices where the firmware has been purchased from
HexWax. It is strongly recommended to allow firmware
updates, even if the firmware is supplied pre-
programmed.
Power Take-Off
A device should only draw current from the USB line
once USB configuration is complete and the host PC is
not is sleep mode. The AllSysGo output (configured
active low) can provide such a switch using the sub-
circuit shown in figure 3. C4 / R6 provide a slow switch-
on to prevent inrush current exceeding USB power
limitations. 1μF and 100nF smoothing capacitors are
recommended on both sides of T1.
AllSysGo
Vdd
Vout
T1
R1
R6
C4
Figure 3
Power considerations
If the device is electromagnetically noisy, a ferrite bead
is recommended on the USB Vdd supply in order to
suppress any transmission of noise to the rest of the
USB network.
Design note AN1149 from Microchip Technology, in the
development kit, discusses designs for recharging
batteries using USB bus power.
USB Connectors
Common USB connector and cable configurations are
shown in figure 4 and table 5.
The shield on the
connector should be left unconnected. The ID pin on
the mini connector permits the distinction of A and B
plugs. The micro connector pin-out is the same as the
mini connector.
Figure 4 Common USB pin-outs for male connectors
Table 5. USB Connection Key
Pin
Std Mini
Name
Cable
color
Description
1
Vcc
Red
+5V (can dip to 4.08V)
2
D–
White
Data –
3
D+
Green
Data +
–
4
ID
–
Type A: Connect to ground
Type B: Not connected
4
5
Gnd
Black
Signal ground
For ultra-low cost products, it is possible to form a USB
Type-A plug direct from a circuit board as shown in
figure 5. This connector is only suitable for a number of
insertions (~50 before cleaning is required).
It is
unshielded and recommended only for ‘dongle’ type
products with no cables attached.
For further dimensional information, refer to figure 6-7 of
the USB 2.0 Specification, in the development kit.
Figure 5
4. Vss
11.75
1.00-2.00
1.00
0.50
3.00
12.00
Shoulder required to prevent over-insertion
Overall PCB width 16.00 or less
Contacts plated with hard
gold flash (0.25-1.27m)
over nickel (2.6-5.0m)
Overall PCB thickness
including tracks 2.00 - 2.20
3. D+
2. D-
1. Vdd
2.25
1.25
Dimensions in mm
Host-Side Interfacing
expandIO-USB uses the Human Interface Device (HID)
USB interface. It has the advantages that no device
drivers are required, and that a host application can
easily locate the expandIO-USB.
On full speed devices, all exchanges of data (‘reports’)
between the host and the expandIO-USB are 64 bytes
in length. In HID terms, all transfers are 1ms interrupt
reports of 64 bytes, to and from output ID 0 on EP1.
On low speed devices, all exchanges of data (‘reports’)
between the host and the expandIO-USB are 8 bytes in
length. In HID terms, all transfers are 10ms interrupt
reports of 8 bytes, to and from output ID 0 on EP1.
The host software has two perform two tasks. First it
has to locate the device. Then it has to communicate
with it. To locate the device, enumerate all devices with
Vendor ID 0x0B40 and Product ID (shown in table 1).
Then use a Get Feature request for the string 4, the