X
xxgzlkc
Unregistered / Unconfirmed
GUEST, unregistred user!
为什么我用SPCOMM控件接不到单片机发来的十六进制的11和13,在线等
我的代码是:
rbuf:array[0..20] of byte;
viewstring:='';
// setlength(rbuf,bufferlength);
FillChar(rbuf,SizeOf(rbuf),$20);
move(buffer^,pchar(@rbuf)^,bufferlength);
for i:=0 to bufferlength-1 do
begin // viewstring:=viewstring+Bintohex(rbuf)+'';
viewstring:=viewstring+inttohex(rbuf,2)+'';
showmessage(inttostr(rbuf));
end;
viewstring:='接收'+viewstring;
memo1.lines.add(viewstring);
memo1.lines.add('');
我的代码是:
rbuf:array[0..20] of byte;
viewstring:='';
// setlength(rbuf,bufferlength);
FillChar(rbuf,SizeOf(rbuf),$20);
move(buffer^,pchar(@rbuf)^,bufferlength);
for i:=0 to bufferlength-1 do
begin // viewstring:=viewstring+Bintohex(rbuf)+'';
viewstring:=viewstring+inttohex(rbuf,2)+'';
showmessage(inttostr(rbuf));
end;
viewstring:='接收'+viewstring;
memo1.lines.add(viewstring);
memo1.lines.add('');