Digital I/O

Showing results for 
Search instead for 
Did you mean: 

FT232RL, FT_Read, reading buffer broken

I would like information about  reading of the FT232RL buffer, I'm having some problems, when I read the buffer it is broken.

Like this



’01 02 03 04 05 06 07 08’

‘09 0A 0B 0C 0D 0E 0F’


I need to read two times to get the whole frame, when the read should come like this:


’01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F’


When  I have to read the buffer two times, I don’t no why, I can’t  join those frames..


Seems like the buffer is not getting the entire data. In some tests i could get the entire data but takes over 500ms,


I using the Delphi XE to develop my software and I set the USB device like this:




procedure ConectUSB;         


  i: Integer;


  i := Open_USB_Device;         

  if (i = 0) or (i = 1 ) then   


    Set_USB_Device_TimeOuts(20, 20);




    FT_Current_Baud := 92000;








And my reading procedure is like this:





function Tfrm1.Rx3(bytes : Integer) : string;          //when “bytes” receives the number of bytes that I need 


  i, cont : integer;

  resp: string;



  frm1.vresp := '';

  resp := '';

  cont := 0;


  while cont < bytes do


    cont := cont + Read_USB_Device_Buffer(bytes);



  for i := 0 to bytes - 1 do



    resp := resp + Chr(FT_In_Buffer[i]);



  if resp <> '' then 

        Result := AsciiToHex(resp); 






thaks for the help

0 Kudos
Message 1 of 3

The FT232RL is not NI Digital hardware, not any type of NI hardware. Delphi is no an NI product either. Have you tried a Delphi or FTDI forum?

0 Kudos
Message 2 of 3

sorry, unfortunately i've been looking out a answer to my problem


and I just make this post because i've seen many posts on this forum talking about FTDI


and i think if could someone help me with this...


so i'm sorry if the problem that I have with this FTDI do not fit with this forum



0 Kudos
Message 3 of 3