Hard drives may be inexpensive, but they need a lot of I/O pins to interface and the file system needs a bit of variable space to handle, something the Stamps are not known for. You will have more luck by using a USB hard drive interface and a USB host that can handle mass storage drives like Parallax's Memory Stick Datalogger which should be able to handle USB hard drives exactly the same as USB flash drives. Any of the other available USB hosts should work just as well (like FTDI's Vinculum VDrive2 or VMusic2 or GHI Electronics' USBwiz).
Considering how cheap a 1GB flash memory drive is these days, why bother with a hard drive? The only moving part is the cap that covers the USB plug and the power consumption is lower as well.
Hard drives may be inexpensive, but they need a lot of I/O pins to interface and the file system needs a bit of variable space to handle, something the Stamps are not known for. You will have more luck by using a USB hard drive interface and a USB host that can handle mass storage drives like Parallax's Memory Stick Datalogger which should be able to handle USB hard drives exactly the same as USB flash drives. Any of the other available USB hosts should work just as well (like FTDI's Vinculum VDrive2 or VMusic2 or GHI Electronics' USBwiz).
Considering how cheap a 1GB flash memory drive is these days, why bother with a hard drive? The only moving part is the cap that covers the USB plug and the power consumption is lower as well.
Do you have the BS2 connection for USBwiz?. Thanks.
USBwiz is an obsolete chip from GHI Electronics and there are several boards they sell for their newer ALFAT chip. All of these use a standard logic level serial interface that would work with the SERIN and SEROUT statements of the BS2. Optionally, they can use an SPI interface using the SHIFTIN and SHIFTOUT statements. The ALFAT can use I2C which I wouldn't recommend for use with a BS2.
Read the documentation for the board you have and read the Basic Stamp Syntax and Reference Manual sections on the SERIN and SEROUT statements. If you provide a link to the documentation for the USBwiz board you want to use, we'll be happy to help you with wiring suggestions, but it should be straightforward.
ALFAT USB includes a Full-Speed USB 2.0 port.
All required signals are exposed through a 1x18 pinmount.
Also, if the desired interface is UART, all
signals required are exposed through a secondary 2x5
pin-mount.
ALFAT USB Pinout
1x18 pin-mount
Pin Name Pin Name
1 UART_TX 10 ACTIVE
2 UART_RX/SPI_BUSY/
I2C_BUSY
11 Reserved
3 I2C_SCL 12 VBAT
4 I2C_SDA 13 Internal 3.3V (Do not connect)
5 SPI_SCK 14 RESET (not 5V tolerant)
6 SPI_MISO/UART_BUSY 15 GND
7 SPI_MOSI 16 Not connected
8 SPI_SSEL 17 Not connected
9 WAKE 18 5 Volts
2x5 pin-mount
Pin Name Pin Name
1 Internal 3.3V (Do not
connect)
2 5V
3 UART_TX 4 SPI_MOSI
5 UART_RX/SPI_BUSY/I2C
_BUSY
6 SPI_MISO/UART_BUSY
7 Reserved 8 VBAT
9 GND 10 RESET (not 5V tolerant)
I would use the 2x5 connector and connect #2 to a +5V supply (Vdd), #9 to ground (Vss), #3 and #5 to any available Stamp I/O pins. Optionally, you could also connect #6 to another I/O pin. #3 would be used with SERIN. #5 would be used with SEROUT. Depending on how it's used by the USBwiz, #6 could be used for handshaking.
Note that the USBwiz's default Baud is 115.2KB. The Stamps can't handle this speed. You'd have to use a PC or some other source of 115.2KB data to change the USBwiz's Baud to something like 9600 Baud.
Comments
Considering how cheap a 1GB flash memory drive is these days, why bother with a hard drive? The only moving part is the cap that covers the USB plug and the power consumption is lower as well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I look for common sense in the world...
the more·I·find how un-common it is.
·
Do you have the BS2 connection for USBwiz?. Thanks.
Read the documentation for the board you have and read the Basic Stamp Syntax and Reference Manual sections on the SERIN and SEROUT statements. If you provide a link to the documentation for the USBwiz board you want to use, we'll be happy to help you with wiring suggestions, but it should be straightforward.
I have the ALFAT USB BOARD
ALFAT USB includes a Full-Speed USB 2.0 port.
All required signals are exposed through a 1x18 pinmount.
Also, if the desired interface is UART, all
signals required are exposed through a secondary 2x5
pin-mount.
ALFAT USB Pinout
1x18 pin-mount
Pin Name Pin Name
1 UART_TX 10 ACTIVE
2 UART_RX/SPI_BUSY/
I2C_BUSY
11 Reserved
3 I2C_SCL 12 VBAT
4 I2C_SDA 13 Internal 3.3V (Do not connect)
5 SPI_SCK 14 RESET (not 5V tolerant)
6 SPI_MISO/UART_BUSY 15 GND
7 SPI_MOSI 16 Not connected
8 SPI_SSEL 17 Not connected
9 WAKE 18 5 Volts
2x5 pin-mount
Pin Name Pin Name
1 Internal 3.3V (Do not
connect)
2 5V
3 UART_TX 4 SPI_MOSI
5 UART_RX/SPI_BUSY/I2C
_BUSY
6 SPI_MISO/UART_BUSY
7 Reserved 8 VBAT
9 GND 10 RESET (not 5V tolerant)
$25, logs serial output automatically to an SD file, cycles the filenames, and supports multiple baud rates.
Note that the USBwiz's default Baud is 115.2KB. The Stamps can't handle this speed. You'd have to use a PC or some other source of 115.2KB data to change the USBwiz's Baud to something like 9600 Baud.