usb host shield 2 hardware manual - e-gizmo.net documents/usb host... · dir 0 deleteme 1 file 12....
TRANSCRIPT
USB Host Shield 2
Features and Specifications
The e-Gizmo USB Host Shield 2 is used for interfacing with USB devices such as an optical mouse or a ash drive. The shield can also be used as an input/output expander with its extension pins. USB data are sent/received via Serial communication.
General Specifications:Power input:
+5VUSB host controller:
AT90USB64/128
US
B H
ost
Sh
ield
2
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 2 of 14 pageswww.e-Gizmo.com
Figure 1. USB Host Shield 2 Components Presentation
US
B H
ost
Sh
ield
2MAJOR COMPONENTS
PRESENTATION
USB HOST SHIELD 2
USB Host Compatibility:- Common Optical USB Mouse.- Mass Storage Devices such as Flash Drives (FAT32) 2.0 or above.
STEP1: Open Hyperterminal and enter any name for your connection
US
B H
ost
Sh
ield
2USER GUIDE
USB HOST SHIELD 2
ICSP
USB Host Shield Gizduino USB
Y1
AT90USB64/128
JP6
= PWM
JP8
45
43
41
39
45
37
35
33
31
29
27
25
23
SCL
GND
+5V
44
42
40
38
36
34
32
30
28
26
24
22
GND
+5V
JTAG
JP7
A0 A1 A2 A3 A4 A5 A6 A7
7 6 5 4 3 2 1TX 0RXAREF GND 13 12 11 10 9 8
RESET +3.3V +5V GND GND VIN
Reset
PWR
SPI
One of the many ways the user can use the USB Host Shield 2 is by connecting it to a USB-UART Converter via Serial Communication. This user guide contains the connections and default settings when used on a terminal emulator. Simply connect the USB Host Shield 2 to your USB-UART converter as shown on the image below,
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 3 of 14 pageswww.e-Gizmo.com
STEP2: The Connect To window shall show up. Select the COM port you used for the USB-UART converter.
STEP3: On the next window, click Restore Defaults, then change bits per second to 57,600 (this is the DEFAULT baud rate of the USB host)
1
2
US
B H
ost
Sh
ield
2USB HOST SHIELD 2USER GUIDE
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 4 of 14 pageswww.e-Gizmo.com
ICSP
USB
Host Shield
Gizduino U
SBY1
AT90USB
64/128
JP6
= P
WM
JP8
45434139 45
3735333129272523
SCL
GN
D
+5V
44424038
3634323028262422GN
D
+5V
JTAG
JP7
A0 A
1 A
2 A
3 A
4 A
5 A
6 A
7
7 6
5 4
3 2
1TX 0
RX
AR
EF GN
D 1
3 1
2 1
1 1
0 9
8
RES
ET +3
.3V +
5V G
ND
GN
D V
IN
Reset
PW
R
SPI
Connect USB mouse to USB device terminal.
Read mouse data using an USB-UART (Serial TTL) converter.
UHS USB-UART+5V - +5V GND - GND RX - TXD TX - RXD
Figure 2. USB Host Shield 2 Sample Wiring Connections
US
B H
ost
Sh
ield
2USB HOST SHIELD 2SAMPLE APPLICATIONS
Interfacing with a USB Mouse
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 5 of 14 pageswww.e-Gizmo.com
The data received from the shield when using a mouse are divided into four set of bits and are shown as 0,0,0,0. Examples of data received upon mouse movement are as follows:
Mouse button, X axis, Y axis, Scroll
Left:0,-n,0,0Right:
0,+n,0,0
Up:0,0,+n,0
Down:0,0,-n,0
Scroll UP/DOWN:0,0,0,+/-1
1 2
4
Left click0,0,0,1
Right click0,0,0,2
Roller click0,0,0,4
Figure 3. USB Host Shield 2 sample application illustrations
US
B H
ost
Sh
ield
2USB HOST SHIELD 2SAMPLE APPLICATIONS
Interfacing with a USB Mouse
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 6 of 14 pageswww.e-Gizmo.com
Besides using a mouse, the USB host shield 2 can also access a ash drive through a serial terminal emulator such as hyperterminal. The ash drive must be in FAT32 format for it to be accessible. The manual provided by ATMEL is also provided in the same folder as this manual with the filename “Commands List.html”.
ICSP
USB Host Shield Gizduino USB
Y1
AT90USB64/128
JP6
= PWM
JP8
45
43
41
39
45
37
35
33
31
29
27
25
23
SCL
GND
+5V
44
42
40
38
36
34
32
30
28
26
24
22
GND
+5V
JTAG
JP7
A0 A1 A2 A3 A4 A5 A6 A7
7 6 5 4 3 2 1TX 0RXAREF GND 13 12 11 10 9 8
RESET +3.3V +5V GND GND VIN
Reset
PWR
SPI
Figure 4. Wiring connections for interfacing with a USB ash drive
US
B H
ost
Sh
ield
2USB HOST SHIELD 2SAMPLE APPLICATIONS
Interfacing with mass storage devices
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 7 of 14 pageswww.e-Gizmo.com
Start-up screen: -------------------------- ATMEL AVR uShell -------------------------- Memory interface available: a: "On board data ash”
Start-up commands:1. reboot - resets terminal2. lsusb - shows ash drive informationInput: $> lsusbOutput: Device 1 @:0x05 VID:058F, PID:6387, MaxPower is 100mA, Device is bus-powered Control Endpoint is 64 bytes, Device is full-speed Device does not support remote wake-up Supported interface(s):01 Interface nb:00, AltS nb:00, Class:08, SubClass:06, Protocol:80
Endpoint(s) Addr: 01 82 Physical pipe(s): 01 023. resume - allows USB activity4. suspend - suspends USB activity
Commands:1. mount (disk) - mounts the selected disk. Removable storage is usually named as b:
Input: $> mount bOutput: (none)
2. disk - checks all available disk and shows their functionsInput: $> diskOutput: Memory interface available: a: "On board data ash” b: "USB Remote memory”
3. a: or b: - selects selected drive
Input: >$ a:Output: (none)
4. df - checks drive free space. Input” $> dfOutput: b: "USB Remote memory” Free space: 99 %
5.format drivename, with drivename - removes all files and reformats drive with
US
B H
ost
Sh
ield
2USB HOST SHIELD 2COMMANDS LIST
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 8 of 14 pageswww.e-Gizmo.com
the drivename specifiedInput: $> format bOutput: (none)
6. deltree - deletes files and directories permanentlyInput: $> deltree b:Output: (none)
7. mkdir dirname - makes a directoryInput: $> mkdir b
Output: (none)
8. cd - change directoriesInput: $> cdOutput: (none)
9. cd dirname - change directories with specific directory nameInput: $> cd bOutput:
(none)
10. ls - lists all filesInput: $> lsOutput: b: volume is "USB Remote memory” Drive uses FAT32 Dir name is B: Size Name Dir 0 Deleteme 3 Files 1 Dir
10. mark - bookmarks current directory Input: $> mark b:Output: (none)
11. touch filename - makes a text file with the specified filenameInput: $> touch DeleteMe $> lsOutput: b: volume is "USB Remote memory”
US
B H
ost
Sh
ield
2USB HOST SHIELD 2COMMANDS LIST
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 9 of 14 pageswww.e-Gizmo.com
Drive uses FAT32 Dir name is B: Size Name Dir 0 Deleteme 1 file
12. cp filename - copy filename to bookmarkInput: $> cp filenameOutput: (none)
13. cat filename1 filename2 - concatenates texts of specified filenamesInput: $> cat DeleteMe SampleOutput: (none)14. append filename - adds text on specified filenameInput: $> append DeleteMeOutput: Simple text editor, enter char to append, ^q to exit and save DeleteMe
15. goto - goes to bookmark specifiedInput: $> gotoOutput: (none)
US
B H
ost
Sh
ield
2USB HOST SHIELD 2COMMANDS LIST
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 10 of 14 pageswww.e-Gizmo.com
Figure 5. USB Host Shield 2 Front PCB Layout
Figure 6. USB Host Shield 2 Back PCB Layout
US
B H
ost
Sh
ield
2USB HOST SHIELD 2PCB LAYOUTS
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 11 of 14 pageswww.e-Gizmo.com
Figure 7. USB Host Shield 2 Parts Placement
US
B H
ost
Sh
ield
2USB HOST SHIELD 2PARTS PLACEMENT
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 12 of 14 pageswww.e-Gizmo.com
Figure 8. USB Host Shield 2 Schematic diagram part 1
US
B H
ost
Sh
ield
2USB HOST SHIELD 2SCHEMATIC DIAGRAM
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 13 of 14 pageswww.e-Gizmo.com
1 23 45 6
JP6
ICSP
+5V
R1
1K
S1Reset
R247k
123456
JP1
HEADER 6
RESET+3.3V
VIN
+5V
+C4
100u
Vin1
GN
D2
+5V3
U2UA7805KC
+ C5
100u
R6220
D1
4001
12
JP5
7.5-12V
VIN+5V
RESET
RESET+3.3V+5VGNDGNDVIN
LED1
PWR
LED2L
R1510k
R1610k
VIN
3
21
84
U5ALM358
G1
D2
S3
Q2MOSFET P
+5V
+5V
+3.3V
+C15
10u
Vin3
GN
D2
+5V1
U4RT9163
3.3 V
+3.3V
+3.3V
+5V
RESET(SCK)
5
67
U5BLM358PB1
(PDO)(PDI)
VBUS
C9100n
S2HWB
R347k
+5V
C10100n
(HWB)
Figure 9. USB Host Shield 2 Schematic diagram part 2
US
B H
ost
Sh
ield
2USB HOST SHIELD 2SCHEMATIC DIAGRAM
© Copyright 2013by e-Gizmo Mechatronix Central
All Rights Reserved
Pages 14 of 14 pageswww.e-Gizmo.com