Position: Index > Unclassified >

Sample routine of working with LPT1 port under windows XP in

2017-12-22 21:35  
Declaration:We aim to transmit more information by carrying articles . We will delete it soon, if we are involved in the problems of article content ,copyright or other problems.

This is simple routine of sending and reading of byte from LPT1 port under Windows XP.

LPT port has four types of pins:

8 output pins accessed via the DATA Port5 input pins (one inverted) accessed via the STATUS Port4 output pins (three inverted) accessed via the CONTROL PortThe remaining 8 pins are groundedLPT_pinout

Now we are interested in Data pins.

Set up driver according to post: Acces LPT and COM ports easily under windows NT-2000-XP. I have written and compiled example under DEV-CPP tool-set, which you can download from http://www.bloodshed.net/.

Start New console project


Create new cpp file and save it to project directory. Also copyporttalk_IOCTL.handpt_ioctl.cfiles to project directory. These files you will find in the package portalk22.zip.

Test program:


Compile this program and run it. You should see results like this:


Now it is time to connect your microcontroller and start experimenting. Good luck.

Test routine project files for DEV-CPP are here:LPT1 Sample Project

Reprinted Url Of This Article: