FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  


Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support

New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Topics - josh

Pages: [1]
Discussion - Software / Question about FT4222 GPIO pin
« on: June 28, 2018, 02:37:06 AM »
Consider these 3 successive function calls:

FT4222_GPIO_Write(ftHandle, GPIO_PORT0, 0);
FT4222_GPIO_Write(ftHandle, GPIO_PORT0, 1);
FT4222_GPIO_Write(ftHandle, GPIO_PORT0, 0);

This is how I output a pulse in GPIO pin 0. The logic analyzer shows that when I do this, the GPIO port 0 signal remains high for 200 us which is too long for my app. How can I control for how long the signal will be 1?


Discussion - Software / FT4222 question from a newbie
« on: February 19, 2018, 03:27:50 PM »
Hi all,
I am trying to write my very first FTDI driver for the FT4222H chip in SPI slave mode.
I'm trying to write code to send DLen bytes of data to the master using a short slave transfer (without checksum) command according to the protocol in page 22 of this doc http://www.ftdichip.com/Support/Documents/AppNotes/AN_329_User_Guide_for_LibFT4222.pdf.

However, it is not working. Assuming I always check that ftStatus equals OK, here is the code. Am I doing something wrong?

ftStatus = FT_CreateDeviceInfoList(&dwNumDevs);

ftStatus |= FT_GetDeviceInfoList(devInfo, &dwNumDevs);

ftStatus |= FT_OpenEx((PVOID)(uintptr_t)devInfo.LocId,FT_OPEN_BY_LOCATION, &ftHandle);

ftStatus |= FT4222_SPISlave_Init(ftHandle);

ftStatus |= FT4222_SPI_SetDrivingStrength(ftHandle, DS_8MA, DS_8MA, DS_8MA);

char sp[5] = {0x5a, 0x83, serial_num, (DLen & 0xff) >> 8, DLen & 0xff };

ftStatus |= FT4222_SPISlave_Write( ftHandle, sp, 5,&sizeTransferred);
ftStatus |= FT4222_SPISlave_Write( ftHandle, Buffer, DLen, &sizeTransferred);


Pages: [1]