Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Goal: 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
1  
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... –  hbdgaf Nov 30 '10 at 19:35
    
Either (see main post edit) –  Steven Nov 30 '10 at 19:49
    

2 Answers 2

up vote 2 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.