Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
linux or windows? (for a sample solution this should prove important). one problem here - you would need two pins i think, one for the feed voltage and one for return voltage... – RobotHumans Nov 30 '10 at 19:35
Either (see main post edit) – Steven Nov 30 '10 at 19:49
up vote 3 down vote accepted

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

share|improve this answer

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

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .