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

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Messages - 9ghtX

Pages: [1]
1
Discussion - Software / How to Read-Write on FT220X via FTD2xx lib?
« 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?

2
Discussion - Software / Re: Zeros in output from FT220X (C#)
« on: December 10, 2020, 04:11:46 AM »
 I found out that I needed to write in FT220X 0x00 bit first to initialize Master Write Slave Read mode.
"Write 0x00 Write request command" - From FT220X Datasheet

 Do I need to write to FT220X in my program first bit 0x01 to init Master Read Slave Write mode? Or it does this bt itself and I don't need to write anything?
"Read 0x01 Read request command" - From FT220X Datasheet

 Or for easily for me to understand you could write little example, how to Write via FT220X correctly.

 Here is my thoughts:
If I want to read message from Master, I need to send to my FT220X 0x00 in first bit of my byte data.
If I want to write data from my FT220X to Master, what should I do? Write first bit 0x01? Or it happens automatically? Does it add first bit 0x01-write-command and will my Master see this bit?
So many questions..)

3
Discussion - Software / Re: Zeros in output from FT220X (C#)
« on: December 09, 2020, 05:14:47 AM »
 I tried to define RxBuffer differently: integer, char, DWORD just for experiment. That doesn't change nothing

 As I checked, there must be at least one 4 (or 5, that's another question, why I get 4 bytes instead 5, when timings are Ok) bytes package {0x9E, 0x00, 0x00, 0x00, 0x03}.

 Another question. There is MIOSIs in FT1248 controller. The 0s' one is only for OUTPUT or for both of them?


4
Discussion - Software / Re: Zeros in output from FT220X (C#)
« on: December 08, 2020, 03:39:53 AM »
I found a problem about this random numbers.

After solving all problems with reading, now I get zeros as via C# lib. I write all readed data in byte array and write in console every byte from it. And all bytes in array are zeros. As you can see at screenshot, there is bytes in RxBytes (that displays allowed to read bytes in buffer). There is 4 of them, readed data bytes have only 0 value.

5
Discussion - Software / Re: Zeros in output from FT220X (C#)
« on: December 07, 2020, 05:18:08 AM »
Recently I tried to write program on C++, guided by your instructions on official cite. So, after completing writing I got on RxBytesBuffer strange data package. I get, for example, 0x00AFF738 and this bytes always change in ever iteration of using program.

Also I notice that this values have difference in 12. If I printf() them in %lu, I get RxBytes: 0x6421720, TxBytes: 0x6421732 and RxBuffer: 0x6421444. Is this kinda encrypting? And if this packages always change and they are encrypted, how I can uncrypt them?

In my device this chip in Slave mode. I need get 5 bytes, that contains answers from my SPI-Master device. And after getting command I need to write an answer to Master and continue communicate with it at same time with 485 port (but with communicating with 2 devices I have no problem).

6
Discussion - Software / Zeros in output from FT220X (C#)
« on: December 03, 2020, 05:22:23 AM »
 I tried to get data from my FT220X using ftDevice.Read() and ftDevice.Purge(ref readData), but there is only zeros in data. I checked hardware signals and there is everything OK.
 So, the question. May be there problem in code (I've attached it to this topic) that causes this problem?

Hardware specifics:
 Clock: 40 Mhz
 Receiving package has 4 bytes
 Connected 2 devices FT234XD via 485 (using Serial.IO C# lib) and FT220X via SPI (using FTD2XX.dll).

Pages: [1]