Arduino Pro Micro + USB Host

Hi

I recently bought an Arduino Pro Micro (https://www.sparkfun.com/products/10999) and a “mini” USB Host Shield for Arduino Pro Mini (http://www.circuitsathome.com/products- … -pro-mini/).

I can’t get the USB Host to work, not even the test program supplied with the USB Host shield. The Pro Mini seems to be pin compatible with Pro Micro, so that should not be a problem. And I’m kind of a hardware newbie to any help or pointers is appreciated.

Similar setups has been done with Teensy: http://www.pjrc.com/teensy/td_libs_USBHostShield.html

Any success stories using these or similar hardware?

– bugch3ck

Can you explain “does not work”?

I’m in the same boat. It seems that the issue is that the Pro Mini has SS on pin 10, but the Pro Micro uses the SS pin for the Rx LED. The USB Host shield needs SS on pin 10. I’m not sure if this can be corrected in software or not.

EDIT: Actually, that probably isn’t the cause of the issue, as the Leonardo uses the same pinout with regards to SS, and the full-size USB host shield works fine with the Leonardo. Hmm…

Keep in mind that the ATmega32u4 based boards (Micro and Leonardo) do not use I/O pins for the SPI bus, with the exception of SS (which isn’t a SPI pin.)

You have to connect directly to the ICSP header to communicate with SPI devices.

The Pro Micro does have the SPI bus on I/O pins. I/O pins 14-16 (according to the silkscreen) are MISO, MOSI, and SCK. This matches the pinout of the Pro Mini, which is officially supported by the shield developers. The full-sized host shield uses the ICSP pins.

http://dlnmh9ip6v2uc.cloudfront.net/dat … 1-3.3V.pdf

My bad, I was confused between the Sparkfun “Pro Micro” and the official “Micro” board, which appear to have different pinouts.

I think the issue may be in the pin definitions found in avrpins.h in the host shield library. Since the Pro Micro is a 32U4, but not a Teensy, it’s assigning pins based on the Leonardo pinout. I don’t know if this causes any problems or not, I’m looking at the schematics to try to figure out what’s what.

I think this is the right pin assignments for the Pro Micro. Toward the top of avrpins.h (in the USB Host shield library directory) you’ll want to #define BOARD_PRO_MICRO (I did it near #define BOARD_TEENSY).

Also, change

#if !defined(BOARD_TEENSY) && defined(__AVR_ATmega32U4__) 

to

#if !(defined(BOARD_TEENSY) || defined(BOARD_PRO_MICRO)) && defined(__AVR_ATmega32U4__) 

Then add this toward the bottom of the file

#if defined(BOARD_PRO_MICRO) && defined(__AVR_ATmega32U4__) 
// SparkFun Pro Micro pin numbers
// https://www.sparkfun.com/products/10999
#define P0  Pd2
#define P1  Pd3
#define P2  Pd1
#define P3  Pd0
#define P4  Pd4
#define P5  Pc6
#define P6  Pd7
#define P7  Pe6
#define P8  Pb4
#define P9  Pb5
#define P10 Pb6
#define P11 Pb2
#define P12 Pb3
#define P13 Pb1
#define P14 Pf7
#define P15 Pf6
#define P16 Pf5
#define P17 Pf4
#endif // SparkFun Pro Micro

No guarantees, I haven’t tried it out yet myself. I’ll let you know if it works when I get home.

Ok, that didn’t fix it, but it’s at least a start.

I’ve contacted Circuits@Home tech support, so maybe we can get this figured out soon.

Ok, found the culprit. Unfortunately, the Pro Micro has pin 3 assigned to GND, where the Pro Mini uses that as a RST line. This causes the host shield to be held in reset. I really don’t understand that design decision… really dumb move, if you ask me. The only answer is to disconnect pin 3 (the GND pin right next to TxI), and connect it to the RST pin on the other side of the board. Seriously, this design decision makes absolutely no sense to me. The Pro Micro is supposed to be pin-compatible with the Pro Mini… why, guys? :frowning:

Anyway, that modification seems to work for me.

Sorry to bump such an old thread… but to be honest, there is NOT a lot of documentation for the Circuits @ Home USB Host (mini) Shield and the Pro Micro out there…

Since I’m using a +3.3v Pro Micro…

I have done the required mods to get +5v to the VBUS

&

Connecting (jumper) the RESET pin on the USB Host to the correct RESET pin on the Pro Micro…

When I run the Boards_QC test sketch…I get an error:

Circuits @ Home: 2011

USB Host Shield Quality Control Routine

Reading Revision Register: Die Revision invalid Value Returned: 00

Unrecoverable error: test halted!

0×55 pattern is transmitted via SPI

Press RESET to restart test

Which is (I believe) do to the fact that the Pro Micro, does NOT have the same pin# for the SPI bus as the Pro Mini does…

and even more so, the Pro Micro doesnt have the SS pin broken out to an I/O….

The SS pin seems to be connected to the yellow RX led on the board???

I’d rather not mod/cut traces on the board… is there any other way to re-define the SS pin?

Like turning the default SS pin to an output? and then using another pin or something instead?

I also have NOT done the board updates I see above?

Being this is a few years old… is this still required to get the Pro Micro working?

And can anyone explain the edit a little bit?

Maybe this is where I can re-define the SS pin to be used??

Thanks for any feedback or direction!

-xl

bump…

are these proposed lib changes still valid??

I’m looking in the avrpins.h file…

and when searching for the text of: #if !defined(BOARD_TEENSY) && defined(AVR_ATmega32U4)

to update it??

I dont see things being referred to as board_…but more as core_ ??

I cant seem to find it in usbcore.h, avrpins.h, settings.h…nowhere… :naughty:

anyone still around that can update the steps here? :slight_smile: :clap: :dance: