Parallel device into Modern PC

Just starting out? Need help? Post your questions and find answers here.
User avatar
matalog
Enthusiast
Enthusiast
Posts: 305
Joined: Tue Sep 05, 2017 10:07 am

Parallel device into Modern PC

Post by matalog »

Is there a way for Purebasic to control a Parallel device, the same way I have seen it control a Serial connected device?

I don't yet have a Parallel to USB transceiver adaptor yet, but might get one if there is enough control.

I have used USB/Serial Transcievers with no problems (after a fight with the code of course).

For example, I have an old printer. It has a Centronics connector on the back, that is equatable to PC parallel. I have been able to control it via Serial and the correct conversion cable. I know exactly which numbers it should receive in a sequence, but have not thought about attempting this in Parallel before.
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Parallel device into Modern PC

Post by infratec »

It is possible to access the registers directly, but ...

you need a kernel driver for this, because MS decided that only a ring0 kernel driver has the privilege to access ports directly.
There are some of them available.

https://github.com/eantcal/ioperm
https://www.codeproject.com/Articles/98 ... -User-Mode
https://www.highrez.co.uk/downloads/inpout32/
...
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: Parallel device into Modern PC

Post by DarkDragon »

I guess it should work the way you used to work with LPT ports with the InpOut32 DLL from infratec's post, if the USB adapters are not completely proprietary:

http://www.purearea.net/pb/CodeArchiv/I ... r_Drive.pb
http://www.purearea.net/pb/CodeArchiv/I ... pOutDll.pb

:D
bye,
Daniel
Post Reply