FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

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

Author Topic: FT232H and Serial Port  (Read 676 times)

rajat

  • Newbie
  • *
  • Posts: 1
    • View Profile
FT232H and Serial Port
« on: February 22, 2022, 03:05:13 AM »

I am a newbie to all this.

I am using FT232H as a USB to serial [ SCLK, SDI, SDO] converter.

In Win10 Home, I have used FTD2XX_NET and dotnet 6 framework and managed to talk to USB chip as per C#-example 3 on code examples section on the ftdi website.
I can read the Serial number, description from the USB chip.

However
- this examples does a UART loopback test so set baud rate etc UART related parameters.

I need a sample code which in C# which can set SPI parameters such as clock rate, 16bits/word and the do a block read ot 128 bytes.

Can you point my nose in the right direction.

Thanks in advance
Rajan
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 749
    • View Profile
Re: FT232H and Serial Port
« Reply #1 on: February 22, 2022, 04:27:31 PM »

Hello,

To use I2C/SPI as a master, see AN_135 MPSSE Basics and our existing MPSSE Example projects:
 
https://ftdichip.com/software-examples/mpsse-projects/
 
There are two options to use I2C/SPI modes with the MPSSE engine:
 
a.            Use LibMPSSE libraries. Example code is provided with the download.
b.            Use D2XX drivers direct. Example code is shown at I2C/SPI.
AN_108 Command Processor For MPSSE and MCU Host Bus Emulation Modes provides the necessary information.
 
Option b is the best option to use the D2XX drivers direct (no dependency on libMPSSE library).

Unfortunately in option b above, we only have C++, Delphi and VB examples.
There is a C# example for I2C which you could use for reference.

We do have a C# wrapper which you could use to develop your own software:

https://ftdichip.com/software-examples/code-examples/csharp-examples/

Best Regards,
FTDI Community
Logged