Table of Contents
What is serial communication?
Serial communication is a simple means of sending data to long distances quickly and reliably. Serial communication is an increasingly important aspect of embedded systems. A good understanding is essential to the aspiring designer. There are 2 broad types of serial communication:
- Synchronous
- Asynchronous
And there are lots of standards and protocols when it comes to serial communications. They should match the right protocol with the right applications.
What is TMS Async?
TMS Async is a communications package that provides access to the serial ports under Windows. The event-driven architecture provides the highest possible performance and allows all the tools to run in the background.
TMS Async Features
- The advanced class object structure
- Easy to use design interface
- Optimized event-driven architecture
- Links directly to your EXE, no runtime
- Supports all important transfer protocols
procedure TForm1.VaCommRxBuf(Sender: TObject; Data: PVaData;
Count: Integer);
var
I: Integer;
begin
for I := 0 to Count - 1 do
case Data^[I] of
#10:;
#13: MemoIndex := Memo2.Lines.Add('');
else
begin
Memo2.Lines[MemoIndex] := Memo2.Lines[MemoIndex] + Data^[I];
Memo2.Refresh;
end;
end;
end;
procedure TForm1.VaModem21RingDetect(Sender: TObject; Rings: Integer;
var AcceptCall: Boolean);
begin
Memo1.Lines.Add('RING: ' + IntToStr(Rings));
AcceptCall := Rings >= 1;
end;
procedure TForm1.VaModem21CommandTimeout(Sender: TObject);
begin
case VaModem1.ModemAction of
maInit: Memo1.Lines.Add('Error initializing modem.');
end;
end;