2

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.

Steven
  • 28,386

2 Answers2

3

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

PC 9-pin wiring 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.

VB code and example here

Linker3000
  • 28,240
2

This USB device appears as a serial port to the OS so can easily be driven, and there are 3.3V and 5V versions.

Martin
  • 2,865