There is one catch with most of the driver's that you are talking about, they all require you to be logged in as an administrator, which is realy what I call an adhack approach to a driver. I have looked at the drivers offerred for free and they just don't appeal to me do to above mentioned things. I will send you an example later this evening on how to use DeviceIoControl to read the signals from the LPT PORT. Regards, James -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Ruben Jvnsson Sent: Thursday, September 19, 2002 4:46 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [EE]: Printer port control software If you go for the driver approach (which are available for free, you don't have to write any) you get 12 outputs (D0-D7, strobe, autofdxt, init and slctin) and 5 inputs (ack, busy, pe, slct and error) without any special hardware or jumpers attached to the lpt. With CreateFile()/WriteFile() I have been told (haven't tried it) that by only tying busy and pe to ground and slct to +5V through autofdxt, you get 8 outputs (D0-D7). This will leave 2 inputs (ack and error) - which may be fine for a lot of things. So - how do I use DeviceIOControl() to read these? Any example source? Ruben > All windows 32bit versions are easy to write to the printer port. It > can be done with two API calls. One to open a handle to the device: > CreateFile(..) and the other to Write your data out to the port. > WriteFile(...). This does 100% work under windows 95/98/me and > Windows NT3.51/4.0/2000 and XP. No problems. The only criteria for it > to work is that your device attached properly utilize the nStrobe,nAck > and nBusy signals according to Compatibility mode. > > I have sever devices which I have made and wrote nice windows programs > for them without having to write a special VXD or device driver. > > It is realy simple. Problem is people think it is hard or are not > versted enough with Windows HAL (Hardward abstraction layer) to take > advantage. You can even read the signals from the port using > DeviceIOControl(...) API function even in NT/2000/XP. > > Again you don't have to have any special things for this other than > your hardware follow the compatibility handshake. > > Regards, > > James > > ============================== Ruben Jvnsson AB Liros Elektronik Box 9124, 200 39 Malmv, Sweden TEL INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se ============================== -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads