FTDI Community

General Category => Discussion - Software => Topic started by: Slava on March 27, 2023, 11:58:38 AM

Title: How can I read the direction of a particular GPIO pin?
Post by: Slava on March 27, 2023, 11:58:38 AM
Hello,

How can I read the direction of certain FT4232H GPOIs that have been configured by another application?

Let's say one application has configured ADBUS7 as an output with a specific value. Now in another application, I need to change the value of ADBUS6 without changing anything in ADBUS7. To do this, first I need to change the direction of ADBUS6 to output and I don't know how to do it without affecting ADBUS7. If I could check the direction of other pins, I would be able to change only one bit in this value and to set the result to FT_SetBitMode(). Please help!

Thanks,
Slava
Title: Re: How can I read the direction of a particular GPIO pin?
Post by: FTDI Community on March 27, 2023, 04:07:48 PM
Hi,

Please see the below application notes that should be able to help. They are for different products, but the same principles apply.

Bit Bang Modes for the FT232R and FT245R (https://ftdichip.com/wp-content/uploads/2020/08/AN_232R-01_Bit_Bang_Mode_Available_For_FT232R_and_Ft245R.pdf)
AN_373 Bit-Bang Modes for the FT-X Series  (https://ftdichip.com/wp-content/uploads/2020/08/AN_373-Bit-Bang-Modes-for-the-FT-X-Series.pdf)

Best Regards

FTDI Community
Title: Re: How can I read the direction of a particular GPIO pin?
Post by: Slava on March 29, 2023, 10:11:18 PM
Hi,

Thanks for the information provided. Can you point me to a specific page/paragraph in these documents that answers my question? I seem to know how the Bit Bang mode works in general.

Regards,
Slava