FTDI Community

General Category => Discussion - Software => Topic started by: 9ghtX on December 11, 2020, 09:51:27 AM

Title: How to Read-Write on FT220X via FTD2xx lib?
Post by: 9ghtX on December 11, 2020, 09:51:27 AM
 Actually I got how to read messages. I need to send to my FT device first byte 0x00, and then I get readed data.
 But how to write it? What D2xxs' FT_Write() does? If it writes data in buffer, then how to send it to my other device?
 I try to write to FT220X both FT1248 commands Read(0x00) and Write(0x01), but only one happens - I read data, but nothing writes. I checked MIOSI line and there is only my second devices' data, no FT220Xs' device answers.
 So, the question is in how FT_Write() func works and how to write data via FT220X conv from PC?
Title: Re: How to Read-Write on FT220X via FTD2xx lib?
Post by: FTDI Community on December 11, 2020, 05:54:36 PM
Hello,

There is example source for an FT1248 application in the following:
https://www.ftdichip.com/Support/Documents/AppNotes/AN_173_Establishing_FT1248_Communications_using_a_Morph-IC-II.pdf (https://www.ftdichip.com/Support/Documents/AppNotes/AN_173_Establishing_FT1248_Communications_using_a_Morph-IC-II.pdf)

For the write routine in this application it will buffer up 2 bytes of 0x00 before the byte to be sent to the target device, this buffer of bytes is then written out with FT_Write.

Best Regards,
FTDI Community