FTDI Community

General Category => Discussion - Software => Topic started by: kalesha on May 23, 2022, 11:40:16 AM

Title: FT232H Configuration
Post by: kalesha on May 23, 2022, 11:40:16 AM
Hi,

I have a simple question related to FTDI Chip

How to change default configuration of FT232H chip (USB -> UART) to FT232H (USB -> SPI).Is there any API for changing configuration of FT232.
Title: Re: FT232H Configuration
Post by: FTDI Community on May 23, 2022, 04:15:05 PM
Hi,

To use the FT232H with SPI, the MPSSE engine is used. We have an example application using the FT232H with SPI. https://ftdichip.com/wp-content/uploads/2020/07/AN_180_FT232H-MPSSE-Example-USB-Current-Meter-using-the-SPI-interface.pdf (http://url).

Also, have a look at https://ftdichip.com/wp-content/uploads/2020/08/AN_135_MPSSE_Basics.pdf (http://url) this shows the basics of how to activate and use the MPSSE engine.

Here some helpful documentation for MPSSE:

https://ftdichip.com/wp-content/uploads/2020/08/AN_108_Command_Processor_for_MPSSE_and_MCU_Host_Bus_Emulation_Modes.pdf (http://url)
https://ftdichip.com/wp-content/uploads/2020/08/AN_178_User-Guide-for-LibMPSSE-SPI.pdf (http://url)

LibMPSSE-SPI is the dedicated API for using the engine for SPI communication. we have a number of software examples to get you started. they can be found here https://ftdichip.com/software-examples/mpsse-projects/libmpsse-spi-examples/ (http://url).

Best Regards,

FTDI Community
Title: Re: FT232H Configuration
Post by: kalesha on May 24, 2022, 07:40:42 AM
Hi,

Yeah I went through with all documents it said the configuration can be changed by setting FT_SetBitmode through d2xx commands.

But how to give those commands? Is there any API or any terminal to give commands

Note: I just want to change it's configuration to USB -> SPI, rest the interfacing part we have .bat files.
Title: Re: FT232H Configuration
Post by: steve on May 24, 2022, 11:27:15 AM
Hi Kalesha,

I think you have to configured SetBitMode 0x02 from d2xx file. This command will set your device for MPSSE mode.
Title: Re: FT232H Configuration
Post by: FTDI Community on May 24, 2022, 03:16:32 PM
Hi,

Yes, to enable MPSSE mode you need to set the bit mode to 0x02 using the FT_SetBitMode function. the MPSSE basics document i linked previously explains this. the set up the MPSSE. the LibMPSSE-SPI user guide explains the API and how it is built on the D2XX driver.

You can run the example code i linked on visual studio.

Best Regards

FTDI Community