Pages: [1] 2 3 ... 5   Go Down
Author Topic: Sparkfun USB Host Shield working with oleg USB Host Shield 2.0  (Read 17681 times)
0 Members and 1 Guest are viewing this topic.
Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 205
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

[EDITED] The updated sparkfun product 9628, https://www.sparkfun.com/products/9628 have FIXED this issue...

I've searched the forum and could not find any posting on this...

I've a Sparkfun USB Host Shield ( http://www.sparkfun.com/products/9947 ) and got it working with the original USB Host Shield library  ( https://github.com/felis/USBHostShield )

Have anyone got this USB Host Shield working with the latest USB Host Shield library V2 ( http://www.circuitsathome.com/mcu/usb-host-shield-library-version-2-0-released )

It seems the library uses a different method of configuring the pins.

The schematics from Sparkfun :
Sparkfun Schematic http://www.sparkfun.com/datasheets/DevTools/Arduino/USBHostShield-v13.pdf

RST - D7
GPX - D8
INT - D9
SS - D10
MOSI - D11
MISO - D12
SCK - D13

Circuit@Home is connected to the 2x3 ICSP pins
Circuit@Home Schematic http://www.circuitsathome.com/wp/wp-content/uploads/2011/02/UHS_20.pdf

MISO - 1
MOSI - 4
SCK - 3
RST - 5
GND - 6

SS - D10
INT - D9

Can someone guide me on how to change the version 2.0 library to point it back similar to the Sparkfun
schematic ?

The verison 2.0 seems to define the pins using avrpins.h that uses AVR low level pins settings.

What is the name for the ICSP pin name in AVR ?

Attached is the avrpins.h

Thanks



* avrpins.h (13.53 KB - downloaded 44 times.)
« Last Edit: December 15, 2013, 12:37:53 pm by Stanley » Logged


Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8975
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The ICSP pins are connected to the hardware SPI pins of the Arduino processor.  The reason to use the ICSP pins for MISO, MOSI and SCK instead of D11, D12 and D13 is that they work on an Arduino Mega as well as the regular Arduino (the Arduino Mega has the SPI pins connected to D50-D53).  On the regular Arduino there is no difference between using D11-13 and the ICSP header.

It looks like the new library no longer uses an Arduino output to drive the RESET signal of the MAX3421E.  It looks like the circuitsathome version uses the RESET signal from the Arduino to reset the MAX3421E,

It looks like the GPX output of the MAX3421E is no longer connected to an Arduino input.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 205
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the clarifications. I only found out about the ICSP pins after looking at the UNO schematics.

I also compared both the USB Host schematics and found the same about the RESET you mentioned.

I jumpered a wire from D7 ( original RST on sparkfun ) to RST on the Arduino pin 1 and manage to get V2.0 library working and detected a USB device..

If it works, I will permanently solder a wire below the shield.



Logged


Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Will you write a quick tutorial when you're finished testing?  Hardware and software changes?
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 205
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Very simple tutorial...

Hardware changes, connect Digital pin 7 to RST pin ( the pin beside the 3.3V pin )

Software changes, NONE, just install the usb host shield ver 2.0

Then just run the example board_qc to test the SPI and detect some USB devices..

I connected it to a Nikon DSLR USB cable to do a remote trigger and got it working using the PTP libraries and examples..


Logged


Cairns - Green Island for Winter
Offline Offline
Full Member
***
Karma: 2
Posts: 148
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Funny
Sparkfun schematic shows pin 7 already connected to the reset pin (of the arduino ? ) http://www.sparkfun.com/products/9947
« Last Edit: October 12, 2011, 11:32:54 am by tytower » Logged

Governments should do what they were designed to do only.
Manage the larger issues best done by Government.
My Family and my Property are no

Cairns - Green Island for Winter
Offline Offline
Full Member
***
Karma: 2
Posts: 148
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like the new library no longer uses an Arduino output to drive the RESET signal of the MAX3421E.  It looks like the circuitsathome version uses the RESET signal from the Arduino to reset the MAX3421E,

It looks like the GPX output of the MAX3421E is no longer connected to an Arduino input.
So shouldn't the arduino reset line or D7 (or maybe either) be connected to Pin 9 of the hex converter which is then connected to Pin 12 on the MAX3421E to reset it  ?

I'm confused -when the circuit says D7 is connected to 'reset' do they mean on the shield bus line or the arduino reset line ?
« Last Edit: October 12, 2011, 11:41:56 am by tytower » Logged

Governments should do what they were designed to do only.
Manage the larger issues best done by Government.
My Family and my Property are no

Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 205
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Funny
Sparkfun schematic shows pin 7 already connected to the reset pin (of the arduino ? ) http://www.sparkfun.com/products/9947

No, digital Pin7 is connected to the MAX3421E reset pin, NOT the Arduino reset (atmega328 pin 0)

To support board like Mega, MAX3421E reset it was routed to Arduino reset pin instead of Pin 7.

When running the Sparkfun board on USB Host Shield 2.0 library, it did not reset the MAX3421E at all..

The 2.0 library will pull the Arduino reset pin low to reset the MAX3421E IC but there was no connection to the MAX3421E reset pin on Sparkfun shield.



Logged


Cairns - Green Island for Winter
Offline Offline
Full Member
***
Karma: 2
Posts: 148
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes thanks Stanley I think I see it now
Logged

Governments should do what they were designed to do only.
Manage the larger issues best done by Government.
My Family and my Property are no

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The mega ADK does not work either with this version.
Is there a similar fix to make this board work with this lib?
Logged

Cairns - Green Island for Winter
Offline Offline
Full Member
***
Karma: 2
Posts: 148
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The ICSP pins are connected to the hardware SPI pins of the Arduino processor.  The reason to use the ICSP pins for MISO, MOSI and SCK instead of D11, D12 and D13 is that they work on an Arduino Mega as well as the regular Arduino (the Arduino Mega has the SPI pins connected to D50-D53).  On the regular Arduino there is no difference between using D11-13 and the ICSP header.

It looks like the new library no longer uses an Arduino output to drive the RESET signal of the MAX3421E.  It looks like the circuitsathome version uses the RESET signal from the Arduino to reset the MAX3421E,

It looks like the GPX output of the MAX3421E is no longer connected to an Arduino input.

So I wired from D7 to reset pin also and it seems to now accept and run the code
Does the GPX output  of the MAX3421E need to be connected to an arduino input for anything in the library?

@bob 1810 I don't know the mega ADK but the shield needs the reset pin of the arduino connected into the reset bus of the shield
« Last Edit: October 15, 2011, 03:59:57 pm by tytower » Logged

Governments should do what they were designed to do only.
Manage the larger issues best done by Government.
My Family and my Property are no

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Connecting D7 (PWM 7?) to reset does not help;same result.
I would advice anyone NOT to buy this Mega ADK board if you want to use version 2
of the USB host libs,
it simply does NOT work !
Logged

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I believe Tytower's idea and the instructions above apply specifically to the Sparkfun USB Shield.
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Cairns - Green Island for Winter
Offline Offline
Full Member
***
Karma: 2
Posts: 148
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like the new library no longer uses an Arduino output to drive the RESET signal of the MAX3421E.  It looks like the circuitsathome version uses the RESET signal from the Arduino to reset the MAX3421E,
It looks like the GPX output of the MAX3421E is no longer connected to an Arduino input.

I find on my Sparkfun board that GPX output of the MAX3421E is connected to D8  Olegs board shows it left disconnected  I think .
I have a Duemielanove board and noticed-In max3421e.h he defines pins for the Duemielanove so I have un-commented those does not seem to make a difference that I have seen yet
*/
/* MAX3421E register/bit names and bitmasks */
#ifndef _max3421e_h_
#define _max3421e_h_
/* Arduino pin definitions */
/* pin numbers to port numbers */
//#define MAX_INT   9      // Duemielanove
//#define MAX_GPX   8
« Last Edit: October 29, 2011, 02:04:19 am by tytower » Logged

Governments should do what they were designed to do only.
Manage the larger issues best done by Government.
My Family and my Property are no

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I made this mod and now I can't use pin 7 - it stays high all the time. I have another project where pin 7 is used - do I have to buy another Arduino board for it?
Logged

Pages: [1] 2 3 ... 5   Go Up
Jump to: