Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing directly to LPT1 under XP 1

Status
Not open for further replies.

CmPaiva

Programmer
Nov 13, 2002
124
0
0
PT
Do anyone know how to access directly LPT1, without a printer driver installed. The Idea is to control existent Hardware via LPT1 port bypassing Driver And/Or spooler.

Thanks in advance
Carlos Paiva
 
If you use the Add New printer wizard, choose Local printer, LPT1, don't do any auto-detect and select 'Generic/Text only' you should get an old-fashioned character printer.
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Thanks jonhwm, but i don't want to use spool32 for raw access. I need to write directly to hardware port, for timing reasons.

The idea, of a dummy driver, is what i use to write to POS printers, in commercial applications.

Tanks anyway for your response,
Carlos Paiva
 
As I understand it, XP and the other NT type OS's only allow access to the hardware via the HAL (hardware abstraction layer)

There is an article on NT drivers which may (or may not) help

You might try Google for more HAL info
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Can't you use the MS Comm Control?


MSComm.CommPort = "LPT1"


Rob
 
teh215

As stated by ms in msdn, MsComm is only for serial comunications .
How hould you make it work for the parallel port?

johnwm,
I think you're right, and i can do it by C code, but i'm searching for a means of doing it directly in VB6.
The link you show, was too interesting.

Carlos Paiva
 
Solution:

Use this program, it installs a driver to access the Hardware ports directly, I have not experimented so much with it, but I used it to controll a Velleman K8000 Interface board in Windows XP.


Eldaria

That was my 25cent** of opinion.

** Inclusive Intrest, tax on interest, Genral tax, Enviromental tax, Tax, and tax on intrest, tax on fees, tax on tax, and other Various taxes and fees.
 
Sweet sweet sweet Eldaria :) That was exactly what I was lookin for :) My Velleman passive tests are fine.. but not a single respons on my Parrallel port... That programme rocks :) AND OMG THE SOURCE CODE IN VB :) :) :)
You made my day :p
 
:s I connected a scope on Pin 13 and 14 of the parrallel port and used the Diagnostic Test K8000 for XP. I had a signal on Pin 17 (which is the clock)
On Pin 14 I get a 5VDC with a 150mVTT. The ripple seems to react to some degree on the output test. But is in no means connected to actual data output.
As all the traffic is done serial, where can I find the actual codes for each command ? Or some documantation on how the serial communication works ? Finding all that stuff out on my own might take a while. I don't see a start into it :) Maybe I could ask you for some source code :)
 
I have only used the supplied routines...
I have not been able to really understand the concept behind. :)
I can see you already got further than me. :)

I wanted to be able to also controll the stepper motor, but I have been unsucesfull. with that..

Brian.
Eldaria

That was my 25cent** of opinion.

** Inclusive Intrest, tax on interest, Genral tax, Enviromental tax, Tax, and tax on intrest, tax on fees, tax on tax, and other Various taxes and fees.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top