Ich mache das mit JAVA!
Ungefähr so:
Code:
import javax.comm.*;
...
serialPort=open("COM1");
serialPort.setSerialPortParams(2400, SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
outputStream = serialPort.getOutputStream();
...
outputStream.write(char);
...
mit
Code:
SerialPort open(String name) throws PortInUseException {
CommPortIdentifier portId;
Enumeration portList;
portList = CommPortIdentifier.getPortIdentifiers();
while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
if (portId.getName().equals(name)) {
return (SerialPort) portId.open(name, 2000);
}
}
}
return null;
}
Tut's
Lesezeichen