So far, I have not been able to see any output from the FTDI 4232 Mini-Module when using bit-bang mode. I can get my computer to recognize the device and load the drivers. I can get my program to compile and link FTDI's libraries, load and run without any errors. But so far, no luck in getting an output bit on Channel A, bit 0. In fact, after reading all the example programs, and going through the documemtation, I can't figure out how to even specifiy channel A. Here is one version of the code I've tried. I've also tried flashing the otuput on and off.
Rich (BB code):
// ftdi_hello_world_led.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <string.h>
#include <math.h>
#include "ftd2xx.h"
//#include <ftdi.h>
int _tmain(int argc, _TCHAR* argv[])
{
unsigned char c = 0xff;
DWORD bytes;
FT_HANDLE handle;
printf("FTDI Hello World\n");
if(FT_Open(0, &handle) != FT_OK) {
printf("Cannot open device\n");
return 1;
}
FT_SetBitMode(handle, 0xff, 0x1); //handle, mask, mode
FT_SetBaudRate(handle, 921600);
FT_Write(handle, &c, 1, &bytes);
for(;;) {}
return 0;
}