Your browser does not allow scripts
Please click here to view a static table of contents without scripts
Return to Introduction  Previous page  Next page
Initialise the device.

(FTC_HANDLE ftHandle, DWORD dwClockDivisor)

Handle of the device.
Specifies a clock divisor which will be used to set the frequency for clocking data in and out of the FT2232C device.

Return Value
FTC_SUCCESS if successful, otherwise the return value is one of the following FTC error codes:


This function initializes the FT2232C device, by carrying out the following:

·    resets the device and purge device USB input buffer
·    sets the device USB input and output buffers to 64K bytes
·    sets the special characters for the device, disable event and error characters
·    sets the device read timeout to infinite
·    sets the device write timeout to 5 seconds
·    sets the device latency timer to 16 milliseconds
·    reset MPSSE controller
·    enable MPSSE controller
·    synchronize the MPSSE
·    set the 8 general purpose pins to output mode and set their output states to high
·    set data in and data out clock frequency
·    set MPSSE loopback state to off (default)

The valid range for
dwClockDivisor is 0 to 65535. The highest clock frequency is represented by 0, which is equivalent to 6MHz and the lowest clock frequency is represented by 65535, which is equivalent to 91Hz. This can be calculated using the following formula:

Clock Frequency = 12MHz / ((1 + dwClockDivisor) * 2)


FTC_HANDLE ftHandle;
DWORD dwClockDivisor = 0;

Status = SPI_InitDevice(ftHandle, dwClockDivisor);