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!

accessing LPT for sending raw data

Status
Not open for further replies.

boakest

Programmer
Jun 6, 2000
1
0
0
US
I am currently trying to integrate a custom hardware system with a basic parallel interface and need to be able to send raw data to the PCs parallel port directly i.e. without using a printer driver.<br><br>Is there a way in which I can either access base memory locations in order to access the LPT hardware registers?<br><br>Alternatively does anyone know of a very basic printer driver with little or no handshaking protocol?<br><br>Any help will be a great help..
 
I used this with quickbasic. I tried with vb6 and it still works.<br>printer = freefile<br>open &quot;lpt1:&quot; for output as #printer 'you can use lpt2 etc.<br>print #printer, &quot;Data sent to the printer&quot;<br>close #printer<br>
 
VB 5 has a printer object. I've used it to print graphs from a custom control. <p>Colin Chevrier<br><a href=mailto:colin.chevrier@ca.jdsunph.com>colin.chevrier@ca.jdsunph.com</a><br><a href= > </a><br>
 
My problem was similar to yours except that I wanted to send raw data to a dot matrix printer on a network. Whilst setting up a printer as a dot matrix 9pin was an option a simple work around is to determine the network printers location using printer.port (will show \\blahh\blah) etc and then net use this location to LPT6:, say. Write your raw data to simple text file on your hard drive then type this text file to the net used printer using a simple batch file.<br>Simple, no hardware gooping and works nicely with the spooler.<br><br>Have fun <p>ciaran<br><a href=mailto:ciaranr@albany.jrc.net.au>ciaranr@albany.jrc.net.au</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top