I want to output a single bit from a program on my PC to a TTL circuit.
I know I can buy a digital I/O card, but I just want a single value.
Can I use one of the pins on the serial port as a single TTL out bit?
Edit: I can use Linux or Windows.
I want to output a single bit from a program on my PC to a TTL circuit.
I know I can buy a digital I/O card, but I just want a single value.
Can I use one of the pins on the serial port as a single TTL out bit?
Edit: I can use Linux or Windows.
You certainly can but you will need to do some level conversion as the output lines (like RTS) are not at TTL levels.
Wiring and programming info here
Level converter circuit here - this circuit ("Common TTL serial interface") converts the Txd and Rxd lines to/from RS232 levels but if you just want to implement a single handshake line, use the circuitry for the PC's Txd line only (pin 3 on 9-pin connector) but connect it to the DTR (Pin 4 on 9-pin connector) or RTS (pin 7) line.
This USB device appears as a serial port to the OS so can easily be driven, and there are 3.3V and 5V versions.