Hi,
I'm trying to get a Circuits@Home USB Host Mini working with the Teensy++2.0 board.. but it's not working.
Thus far, I've done the following:
- soldered both boards onto some perfboard (since they connect via SPI, I could't just use the usual breadboard solution).
- configured the USB host mini board to provide 5v to the USB VBUS (to allow bus-powered peripherals)by cutting the VBUS trace, and by soldering a wire between the VBUS pad and the RAW pin (which is connected to a 5v power source)
- Included felis's USB Host library in Arduino 0022, and made a change to Max3421e_constants.h, in place of the piece that now lives in the "else" statement. The aim is to support the pin numbering on the AT90USB1286 in the Teensy++2.0.
#if defined(__AVR_AT90USB1286__)
#define SS_PIN 20
#define SCK_PIN 21
#define MOSI_PIN 22
#define MISO_PIN 23
#define MAX_SS 20
#define MAX_INT 19
#define MAX_GPX 0
#define MAX_RESET 10
#else
//the case for everything other than the Teensy++ 2.0
#define MAX_SS 10
#define MAX_INT 9
#define MAX_GPX 8
#define MAX_RESET 7
#endif
I've run the "board test" example that comes with the USB Host library, but it fails, with the following:
Circuits At Home 2010 USB Host Shield QC test routinePress any key to continue...
Reading REVISION register...Die revision invalid. Value returned: FF
Test FAILED*!*
Test Halted.
0x55 pattern is being transmitted via SPI to aid in troubleshooting
Press RESET to restart test
The actual soldered connections between the Teensy++2.0 and the USB host mini board are the following:
USB Mini Breakout board (r1.1) --starting at the bottom left, moving about the board counterclockwise1=SS - connected via 3.3v LDO to pin 20 (SS) on Teensy++2.0 (3.2v measured here)
2=MOSI - connected via 3.3v LDO to pin 22 (MOSI) on Teensy++2.0 (3.21v measured here)
3=MISO - connected directly to pin 23 (MISO) on Teensy++2.0 (0v measured here)
4=SCK - connected via 3.3v LDO to pin 21 (SLCK) on Teensy++2.0 (0v measured here on input side of LDO, and the ground connection to the LDO is ok)
5=no connection
6=no connection
7=no connection
8=no connection
9=3.3v, connected, via 3.3v LDO to 5v (verified 3.23v)
10=no connection
11=GND, connected to GND on Teensy++2.0
12=RAW(5V), connected to VCC on Teensy++2.0 (verified 4.88v)
--skipping all the GPIN, and GPOUT pins, which are not connected to anything
--starting at the top right, moving counterclockwise again
13=no connection
14=no connection
15=RESET - connected via a 3.3v LDO to pin 10 on Teensy++2.0 (3.21v measured here)
16=GND (valid ground connection)
17=no connection
18=no connection
19=no connection
20=no connection
21=no connection
22=no connection
23=no connection
24=INT - connected to pin 19 on the Teensy++2.0 (measures 3.23v)
- the VBUS trace has been cut on the USB Host Mini
- I've soldered a wire between the VBUS pad, and the RAW pin (to provide 5v to the USB peripheral, which will be bus powered)
So, in summary, it's not working..
And finally, some observations / questions:
- In Max3421e_constants.h I'm confused why, on the Arduino Mega, MAX_SS != SS_PIN (10 != 53), whereas on the Duemilanove, MAX_SS ==SS_PIN (10 == 10). Also, in one of the pages on circuits@Home, when Oleg describes what changes need to be made when the SS pin needs to move, only MAX_SS is documented as needing to change, but not SS_PIN, so this makes me think the two pins serve different functions (I originally assumed they were just two different names for the same thing). In my case so far, I have both SS_PIN and MAX_SS == 20 (the SS pin on the Teensy++2.0). I'm beginning to think that this might be an issue, but I don't know how to determine the correct pin numbers. Can anyone explain the differences between SS_PIN and MAX_SS?
- Is SPI going to work ok over some soldered connections on perfboard, or will there be too much stray capacitance, same as on a breadboard?
- Do the measured voltages look ok for SPI?
- Has anyone else gotten this combination (Teensy++2.0 with Circuits@Home USB Host Mini) working? If so, can they post details of pins used, etc?
I'm new to micro-controllers, so if you're assuming that I've first done / checked all the obvious things, please don't ![]()
Colm