What I need to do is be able to read some 5v TTL Inputs in and write some 5v TTL outputs out. The parallel port always worked when my program was a DOS program.. it was so simple, just do Port[$378]:= data to set the bits on the port or data:=port[$378] to read some bits from the port. I'm not opposed to some hardware other than a parallel port if it will be able to interface with freepascal easily, if anyone can make a recommendation. Serial ports won't work because they are not made to just read and write bits like the parallel port and they are not TTL voltage levels.
-----Original Message----- From: fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of Marc Santhoff Sent: Wednesday, July 20, 2016 11:29 PM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Parallel Port Access with Free Pascal - windows On Fr, 2016-07-15 at 14:59 -0700, Zaaphod wrote: > I am trying to get access to the parallel port with Free Pascal. > > I'm trying to use this version of inpout32 (x64) > http://www.highrez.co.uk/downloads/inpout32/ > > Here's my program: > http://pastebin.com/facf6EFc > > Here's my Unit: > http://pastebin.com/XR0aYUPR > > When I try to run it, I get a windows message The application was > unable to start correctly (0xc000007b). click ok to close the application. You could search Microsofts web site to decode this error. > then I get Exitcode 123 in the Free Pascal IDE. 123 is decimal of 7b. > > Does anyone know how to get this to work? reading and writing the parallel > port used to be so easy, now it's extremely confusing, thanks windows! Didn't test, but as a remark: parallel port is dead and it has been a constant source of problems. First the access rights problems you know of. Second it has no fixed timing, so you're in trouble when e.g. flashing a microcontroller works on one machine and refuses to on another one. Third it is not electrically protected, if you fry it, the mainboard is dead by chance or you have to insert an extension board - which is hard to find nowadays, too. Depending on your needs I'd suggest using a USB-to-serial-Adapter or similar. They are cheap and well supported (e.g. using CP2102). As an alternative FTDI has some nice USB-to-anything (including parallel) chips and they sell modules with mil spacing pins for easy breadboarding. HTH somehow, Marc _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal