FTDI Community

General Category => Discussion - Hardware => Topic started by: rdb9878 on August 20, 2021, 10:57:32 AM

Title: FT260 GPIO initial output state
Post by: rdb9878 on August 20, 2021, 10:57:32 AM
Hello. I'm trying to utilize the GPIO features of the FT260. One thing I have noticed is that when I configure the GPIO as outputs, it seems to be completely random whether or not they initially output as a '1' or a '0'. This makes it very hard to ensure proper GPIO sequencing.

Here are the things I have tried to combat this: 1) I've tried calling FT260_GPIO_Write before calling FT260_GPIO_SetDir, but the status field returns FT260_GPIO_WRONG_DIRECTION, and it simply doesn't have an effect. 2) I've tried calling FT260_GPIO_Set before calling FT260_GPIO_SetDir, and I get the FT260_OK status, but the values don't seem to "stick" until I have already enabled the outputs...

Any suggestions on how to ensure a specific initial output state?

Title: Re: FT260 GPIO initial output state
Post by: FTDI Community on August 20, 2021, 01:07:08 PM
hi,

have a look at https://ftdichip.com/wp-content/uploads/2020/08/AN_184-FTDI-Device-Input-Output-Pin-States.pdf. This application note goes over the I/O pin states of our devices, section 22 is for the FT260.

we also have a couple of software examples for the FT260 that may be able to help you. The folder for the code examples can be found here: https://ftdichip.com/products/ft260q/ under the downloads tab, you should have a look at the GPIO and GPIO_OpenDrain examples.

Please let me know if you have any more questions

Thanks

Kieran