Bueno, y porque no usar el Memo para enviar los caracteres, agrega otra variable de tipo
Integer de nombre Contador
Código Delphi
[-]
var
Str: String;
begin
ComPort.ReadStr(Str, Count);
if length(Str)>= 8 then
ShowMessage('OK')
else if Str = #1 then begin
case Cuantos of
1: begin
ComPort.WriteStr(#2#2);
Cuantos := 2;
end;
2: begin ComPort.WriteStr(#2#3);
Cuantos := 3;
end;
3: begin showmessage('Chip Borrado.. OK!')
Cuantos := 4;
end;
4: begin ComPort.WriteStr(#2#2);
Cuantos := 5;
end;
5: begin ComPort.WriteStr(#6#4#0#0#16#0);
Contador := 1;
end;
end;
end
else if Str = #2 then begin
end
else if Str = #53 then begin
if contador <= 4096 then begin
ComPort.WriteStr(Memo1.Text[Contador]);
Inc(Contador);
end;
end;
end;
A ver como funciona
Salud OS