Go Down

Topic: Sparkfun USB Host Shield working with oleg USB Host Shield 2.0 (Read 18575 times) previous topic - next topic

Stanley

Sep 28, 2011, 06:17 pm Last Edit: Dec 15, 2013, 06:37 pm by Stanley Reason: 1
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


nRF24L01+ UNO Adapter for Sale :-
http://arduino-for-beginners.blogspot.com/p/nrf-adapter-for-sale.html

johnwasser

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.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Stanley

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.



nRF24L01+ UNO Adapter for Sale :-
http://arduino-for-beginners.blogspot.com/p/nrf-adapter-for-sale.html

sbright33

Will you write a quick tutorial when you're finished testing?  Hardware and software changes?
If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Stanley

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..


nRF24L01+ UNO Adapter for Sale :-
http://arduino-for-beginners.blogspot.com/p/nrf-adapter-for-sale.html

tytower

#5
Oct 12, 2011, 06:13 pm Last Edit: Oct 12, 2011, 06:32 pm by tytower Reason: 1
Funny
Sparkfun schematic shows pin 7 already connected to the reset pin (of the arduino ? ) http://www.sparkfun.com/products/9947
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

tytower

#6
Oct 12, 2011, 06:18 pm Last Edit: Oct 12, 2011, 06:41 pm by tytower Reason: 1

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 ?
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

Stanley


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.



nRF24L01+ UNO Adapter for Sale :-
http://arduino-for-beginners.blogspot.com/p/nrf-adapter-for-sale.html

tytower

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

bob1810

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

tytower

#10
Oct 15, 2011, 10:55 pm Last Edit: Oct 15, 2011, 10:59 pm by tytower Reason: 1

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
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

bob1810

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 !

sbright33

I believe Tytower's idea and the instructions above apply specifically to the Sparkfun USB Shield.
If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

tytower

#13
Oct 29, 2011, 08:14 am Last Edit: Oct 29, 2011, 09:04 am by tytower Reason: 1

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
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

arapahoe

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?

Go Up