croudfreak
Newbie level 1
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.
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.