W
wmmwang
Unregistered / Unconfirmed
GUEST, unregistred user!
PC机发$11,单片机什么都不做,收到什么发什么,这里收到$11,那就还是发$11,PC收到结果却什么都没有。代码如下:
procedure TForm1.Button1Click(Sender: TObject);
var
i:Byte;
begin
i:=$11;
comm1.WriteCommData(@i,1);
end;
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
var
i:Byte;
begin
move(buffer^,i,1);
edit2.text:=inttohex(i,2);
end;
哪位高手解决下啊???帮帮忙…… 拜托了!
procedure TForm1.Button1Click(Sender: TObject);
var
i:Byte;
begin
i:=$11;
comm1.WriteCommData(@i,1);
end;
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
var
i:Byte;
begin
move(buffer^,i,1);
edit2.text:=inttohex(i,2);
end;
哪位高手解决下啊???帮帮忙…… 拜托了!