Si solo quieres mandar un byte puede que esta funcion te resulte util:
Código Delphi
[-]
function MandarByte(Puerto: String; B: Byte): Boolean;
var
hPort: THandle;
DCB: TDCB;
Escritos: Cardinal;
begin
Result:= FALSE;
Puerto:= Uppercase(Puerto);
if (Puerto<>'COM1') and (Puerto<>'COM2') then
exit;
hPort:= CreateFile(PChar('\\.\'+Puerto), GENERIC_READ or GENERIC_WRITE,0, nil,
OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0);
if hPort<>INVALID_HANDLE_VALUE then
begin
DCB.DCBlength:= sizeof(DCB);
if GetCommState(hPort,DCB) then
begin
with DCB do
begin
BaudRate := CBR_9600;
ByteSize := 8;
Parity := NOPARITY;
StopBits := ONESTOPBIT;
Flags := $01;
end;
if SetCommState(hPort, DCB) then
begin
PurgeComm(hPort, PURGE_TXABORT or PURGE_RXABORT or PURGE_TXCLEAR or
PURGE_RXCLEAR);
Result := WriteFile(hPort, B, 1, Escritos, nil);
end;
end;
CloseHandle(hPort);
end;
end;
Para usarla, por ejemplo, para mandar un 1:
Como sugerencia: Puedes usar los pines DTR y RTS para mandar señales sin necesidad de un circuito muy complicado, pero si ya tienes el circuito montado, da lo mismo.