I have some projects using the PC's printer port as interface, some dating back from the 1980's. One od these projects is an EPROM emulator. I use an old laptop with on-board LPT port to operate it.
I once bought this Uno R3 for my son but he doesn't use it anymore. So the idea rose to use it as an interface between my modern laptop (no COM and no LPT port). I need 8 pins for data and 4 for directing it. IMHO the Arduino has them. Programming them is not the problem: I read two bytes from the serial port and use them to set the 12 pins.
I have found a lot of examples but all about using the Arduino as a gadget, no example where a PC is involved. OK, I know that the serial part of the Arduino is involved, my laptop sees it as COM3, but I haven't found any example yet where the PC/laptop is part of the project. Any pointers to some examples are welcome!
My main programming language is Pascal: Turbo Pascal / Free Pascal / Lazarus. An example using one of these would be great.
You have to open the COM port associated with the Arduino. Search for code that enumerates the COM ports and tries to identify the Arduino port. What if multiple Arduinos are connected? Present the user a list of COM ports and let him pick one.
You need to be aware that a USB to parallel converter (whether a ready-made product or based on an Arduino) does not function exactly the same as a parallel port on an old PC simply because the data must be channelled through the USB system.
For some applications the USB-parallel-port conversion will be perfectly adequate, but if the project relies on the strict timing that would be available with a real parallel port you may have a problem. The USB system does not perform well with small data transfers - it is designed for packets of 64 bytes or more.
Thank you all for answering. I know about USB to parallel converters but AFAIK they are sold with drivers that is closed software. I just want to be able to control twelve output pins and the Arduino does allow me that.
Before I asked my question I found a guide line how to use Lazarus in combination with an Arduino but that didn't work, at least for me. I'm sure the error was in the Lazarus software because when using Putty the Arduino reacted fine.
After posting my question I was pointed to this video: