Need help with ftdi rs232 reading data, broken buffer data

Status
Not open for further replies.

croudfreak

Newbie level 1
Joined
Feb 9, 2011
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,289
hi everyone, i'm programming with Delphi and i've been use Ftdi rs232 to receive data from a pic, but when i read the data i have problems because the buffer brokes the line of code

i'm using this procedure to read the data

procedure Tfrm1.Rx;
var
i, cont: integer;
resp : string;
begin
cont := Read_USB_Device_Buffer($100);
resp := '';
for i := 0 to (cont - 1) do
begin
Get_USB_Device_QueueStatus;
resp := resp + Chr(FT_In_Buffer);
end;
memlog.SelAttributes.Color := clYellow;
Memlog.Lines.Add(AsciiToHex(resp));
end;

the data came like this sometimes

ex:
'01 02 03 04
05 06 07'

when should came like this

'01 02 03 04 05 06 07'

if someone helpme i'll be very happy

ps: sorry with the bad english.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…