PDA

View Full Version : Modular board for USB host and device testing with P8X32A Propeller microcontroller



Cluso99
10-21-2011, 12:25 AM
Here is my new USB module for testing USB software on the Propeller. PCB size is 1"x0.65".

The purpose of the board is to provide the possibility to test USB software (BradC has published USB device code and Micah/Scanlime has published code to act as a USB host to attach various devices such as a USB Bluetooth device). None of this code is strictly USB compliant.

The pcb can take either a USB-A Male (plug) or USB-A Female (socket). I have fitted a male as USB-A Female-Female adapters can be readily bought from eBay for about $1 so I can use either USB host or device mode simply, with the same pcb. (note that I used a male connector removed from a usb device purchased on eBay)

The 1x10 0.1" connector will specifically connect to the pins on the edge of my CpuBlade (and also duplicated on my BaseBlade1), so it will stack onto either board. It can also be fitted to most propeller boards with expansion connectors provided care is taken with the 5V and Gnd pins (i.e. This pin arrangement is not the same as the edge of my BaseBoard1 connector, nor some of the other boards).

When acting as a device, the 5V from the PC could be used as a power source. When acting as a host, 5V must be supplied from the prop board to this board for outputting on the USB connector.

Ports 0 & 1 are connected to the D- & D+ pins of the USB and contain series resistors (usually 68R although 100R should also work).
Ports 2 & 3 are connected to the D- & D+ pins of the USB and contain series resistors (usually 1K5) and designed to be set by prop software for USB Device mode and FS (full speed) by making P2 an output and logic high, or LS (low speed) by making P3 an output and logic high.
Ports 4 & 5 are connected to the D- & D+ pins of the USB and contain series resistors (usually 10K or 15K) and designed to be set by prop software for USB Host mode by making both P4 & P5 outputs and logic low. Alternately, PS2 mode (for attaching a keyboard or mouse) can be achieved by setting both P4 & P5 as outputs and logic high (Ports 0 & 1 series resistors should be 100R)

Here is a pic of the assembled board and the schematic.

86148 86149

Here are the links with USB software...
BradC http://forums.parallax.com/showthread.php?97328-USB-toys-to-play-with&highlight=usb+bluetooth+host
Micah http://forums.parallax.com/showthread.php?121321-Working-full-speed-(12-Mb-s)-bit-banging-USB-Host-controller&highlight=usb+bluetooth+host

For anyone interested in tagging along with the USB prop project, I have 8 pcbs spare. I can supply the pcb plus 1x10uf cap, 2x68R, 2x100R, 2x1K5, 2x10K (smt 0805 unsoldered), 2@1x6 female header and 1x10 male pin header, for US$6.00 posted unregistered airmail (add $1 to include a USB-A Female - I don't have any USB-A Male connectors). This is my cost plus an anticipated $1 charge by PayPal. If you are interested, please email me cluso =at= clusos =dot= com or by PM.