0
\$\begingroup\$

Is it possible to use a parallel port (a real one, not an USB converter) as a TTL serial port equivalent, for a maximum speed of 115200 baud ?

I'd like to talk to a router's serial port but I don't have any TTL level converter, and buying one is not an option (I can't afford to "waste" 20 bucks on a stupid "hey let's reverse engineer this router!" idea).

\$\endgroup\$
5
  • \$\begingroup\$ @WoutervanOoijen I was talking about buying one already made, which is about 20 bucks with shipping. Of course it's cheaper if you buy the parts and assemble it yourself but I prefer to avoid that. \$\endgroup\$
    – user40669
    Commented Nov 14, 2014 at 20:30
  • \$\begingroup\$ @WoutervanOoijen but since you say it's impossible, you may as well post that as an answer. Thanks. \$\endgroup\$
    – user40669
    Commented Nov 14, 2014 at 20:31
  • \$\begingroup\$ It probably is possible to bit-bang serial at fairly high baud rates on a true localbus parallel port, if you write your own bare-metal program dedicated exclusively to that goal. It is probably not possible under a general purpose desktop O/S. \$\endgroup\$ Commented Nov 14, 2014 at 20:43
  • \$\begingroup\$ While a converter could well prove to be as simple as a pair of transistorized (or IC) inverters. \$\endgroup\$ Commented Nov 14, 2014 at 20:43
  • \$\begingroup\$ As @ChrisStratton says, a couple NPN transistors, four resistors and a diode would 99.9% likely work (needs a 5V supply from somewhere). \$\endgroup\$ Commented Nov 14, 2014 at 20:57

2 Answers 2

4
\$\begingroup\$

It is a simple enough matter to "bit bang" a pair of the IO pins of a parallel port to emulate a serial port. It's all in the software.

And that's where it all gets a bit tricky.

The basic operations of reading and writing are simple enough - what is hard, when you are working on a PC with an OS in the way, is the precise timing needed to read and write at the right times.

Programming "software serial" on something like an Arduino is pretty simple because you have hardware timers, and direct access to the hardware.

Doing it on a PC when you have so much more going on would be a rather tricky task. And then of course there's the writing of a driver so it's seen as a COM port, etc.

So although it would be possible, it's really not worth the huge amount of effort, when all you really need is a little USB dongle that you can pick up for $3 on eBay.

\$\endgroup\$
2
\$\begingroup\$

Using the parallel port as a serial port: not without adding parallel-to-serial conversion hardware.

A serial-port-to/from-TTL converter can be as simple as a max232 chip and a few 1uF capacitors. If that costs you 20 bucks you are visiting the wrong shops.

Did you ever check www.dx.com? Free shipping...

http://www.dx.com/p/usb-to-ttl-cp2102-serial-module-red-309988

http://www.dx.com/p/3v-5v-serial-port-rs232-to-ttl-converter-module-340324

Note: As an USB-to-serial converter the CP2102 (and everything else that isn't an FT chip) doesn't have the best reputation, but is is cheap...

\$\endgroup\$
2
  • \$\begingroup\$ I ordered some small prototype boards from dx -- maybe $20 out of a much larger order. For some reason, just those got hung up in customs, and took about 4 months to reach me. dx was communicative, but it was a bummer, and I had to order much more expensive boards in a rush to equip a summer course I was teaching. \$\endgroup\$ Commented Nov 14, 2014 at 20:40
  • \$\begingroup\$ I ordered a couple cheap Bluetooth modules from dx, which never arrived at all. \$\endgroup\$ Commented Nov 14, 2014 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.