Electronics -- USB 8bit Interface BoardTest Software
Clearly, some software had to be written to test the device.
And of course, it had to run under Linux... I am providing the test code here; it is a quick hack and can be used to test the read and write operations in bitbang mode as well as send and receive in normal (handshake) mode. Note that you need to download and compile libusb and libftdi (see FTDI's home page) prior to compiling this code.
Max bitbang mode send rate is 500kb/s using the available sources and 800kb/s using a patched libftdi (with non-standard baud rate). However, note that this data stream is not continuous but comes in bursts of 64 bytes. For normal (handshake) mode, the data send rate is independent of the used baud rate because the handshake signals and/or the USB limit the amount of data transferred. Here is a smaple ternial snipped using the above program and applying a 1MHz clock to the WR pin of USB-CTRL: bash# ./testusb send init: OK open: OK reset: OK bitbang(off): OK baudrate: OK ................................................................................ ................................................................................ ..................[interrupt] written: 729088 bytes in 0.904 sec (787.611 kb/s) close: OK The data sheet mentiones a maximum transfer rate of 1M/s for D2XX drivers (Windows only) and 300kb/s for VCP (virtual COM port) drivers. The measured >780kb/s (using libftdi drivers over USB-1.1 with max. 12Mbit/s, hence >1M/s) are hence probably not at optimum. Programming the EEPROMIt is often desirable to use one's own vendor and device ID for the self-made USB device instead of the built-in FTDI defaults. This will, e.g. prevent the Linux USB device module loader to automatically load the ftdi_sio module when you plug in the board and allows you to have your own actions taken upon plugin. If you ever intend to use more than one FTDI chip on the same USBus or your device needs more than 50mA from the USB, you most certainly want to program your own EEPROM contents. In order to read the EEPROM content and to write own information into the EEPROM, I wrote the test-and-demo program testeep which can be downloaded here:
Please look yourself at the code for details. Here is a shell snipped for my board: bash# ./testeep -d=6002 dump init: OK open: OK reset: OK read eeprom: OK EEPROM Content: vendor=0x0403, product=0x6002 self_powered=1, remote_wakeup=1, BM_type_chip=1 in_is_isochronous=0, out_is_isochronous=0, suspend_pull_downs=0 use_serial=0, change_usb_version=0, usb_version=0, max_power=0 manufacturer="WieserLabs", product="USB8bit (prototype)", serial="1.0" close: OK Troubleshooting
In case you get an error like
An error like
|