Bus Blaster v2 is a pain to test at the factory. That is likely holding up the supply.
A simple Windows test application would help things along. It’s a very basic app if you’re already setup to work with FTDI chips, but we’re not.
To speed things along, we’re offering a bounty for a test application. As a thank you for chipping in, the first developer with an app can take any project from our current catalog and a free PCB code.
A general outline and program requirements are listed below.
Basic overview:
A command line app is preferable. The testers do require Windows.
Not sure if this works, since I don’t own a bus blaster.
Based on libftdi’s example bitbang_ft2232.c
Uses libfti which is available on linux/windows/mac.
Since MSPPE is 16 bit wide I tried using two ports.
Maybe it’s atleast a starting point
—
/* bitbang_ft2232-busblaster.c
based on FTDI’s bitbang_ft2232.c
Thanks to max@koeln.ccc.de for fixing and extending
the example for the second channel.
This program is distributed under the GPL, version 2
Peter Huewe
*/
#include
#include
#ifdef __WIN32__
#define sleep(x) _sleep(x)
#endif
#include
#define CHANNEL1 0xFF
#define CHANNEL2 0x00
int main(int argc, char **argv)
{
struct ftdi_context ftdic, ftdic2;
char buf,value;
int f,i;
char patterns[]={0xAA, 0x55};
// Init 1. channel
if (ftdi_init(&ftdic) < 0)
{
fprintf(stderr, "ftdi_init failed\n");
return EXIT_FAILURE;
}
ftdi_set_interface(&ftdic, INTERFACE_A);
f = ftdi_usb_open(&ftdic, 0x0403, 0x6001);
if (f < 0 && f != -5)
{
fprintf(stderr, "unable to open ftdi device: %d (%s)\n", f, ftdi_get_error_string(&ftdic));
exit(-1);
}
printf("ftdi open succeeded(channel 1): %d\n",f);
printf("enabling bitbang mode(channel 1)\n");
ftdi_set_bitmode(&ftdic, CHANNEL1, BITMODE_MPSSE);
// Init 2. channel
if (ftdi_init(&ftdic2) < 0)
{
fprintf(stderr, "ftdi_init failed\n");
return EXIT_FAILURE;
}
ftdi_set_interface(&ftdic2, INTERFACE_B);
f = ftdi_usb_open(&ftdic2, 0x0403, 0x6001);
if (f < 0 && f != -5)
{
fprintf(stderr, "unable to open ftdi device: %d (%s)\n", f, ftdi_get_error_string(&ftdic2));
exit(-1);
}
printf("ftdi open succeeded(channel 2): %d\n",f);
printf("enabling bitbang mode (channel 2)\n");
ftdi_set_bitmode(&ftdic2, CHANNEL2, BITMODE_MPSSE);
// Write data
for (i = 0; i < sizeof (patterns)/sizeof(patterns[0]); i++) {
buf = patterns[i];
f = ftdi_write_data(&ftdic, &buf, 1);
if (f < 0)
fprintf(stderr,"write failed on channel 1 for 0x%x, error %d (%s)\n", buf, f, ftdi_get_error_string(&ftdic));
sleep(1);
f= ftdi_read_pins(&ftdic2, &val);
if (f < 0)
fprintf(stderr,"read failed on channel 2 for 0x%x, error %d (%s)\n", val, f, ftdi_get_error_string(&ftdic2));
if (val != patterns[i]) {
fprintf(stderr, "read value %d, expected %d\n", val, patterns[i]);
return -1;
}
sleep(1);
}
printf("disabling bitbang mode(channel 1)\n");
ftdi_disable_bitbang(&ftdic);
ftdi_usb_close(&ftdic);
ftdi_deinit(&ftdic);
printf("disabling bitbang mode(channel 2)\n");
ftdi_disable_bitbang(&ftdic2);
ftdi_usb_close(&ftdic2);
ftdi_deinit(&ftdic2);
}
I just sent you (by e-mail) a Qt app for testing.
Any updates on this one?
Yes, for more info, you should follow the forum thread:
http://dangerousprototypes.com/forum/viewtopic.php?f=37&t=2179