Lastnight and today, I made a new program to send a byte (0 to 255) out of this Win-XP's printer port. If anyone is having problems with that DLL to access the parallel (printer) port, then this could be a workaround and respectable solution since it does not require that DLL or all those data files as I mentioned in my last post here. It is probably not lightning fast (how bout a few times a second, is that good enough? I got about a max. of about 10 times a second), but then again the paralell port was never designed to be as fast as possible, that's why they made USB stuff - but that is not as easy to make a project box for. If you want the program let me know. I call it pport2.exe (only about 2K bytes long) and the format to use it is:
pport2 byte ; where byte is 0 to 255 decimal
[update] I also have two other programs:
The goal of these programs is to allow the user, someone who has no interest in learning digital or
binary code, to activate remote devices simply by calling a program or clicking on it with the mouse.
They do allow atlease a minimal amount of programming possibilities that you may need.
pport3 that can be used to set a particular line on or off.
pport4 that toggles a line on or off regardless of its current state (on or off).
Let me know and I'll upload it and send a link so you can download it free.
I have made a test program that calls this program (pport2), much like a function call in a programming language, and that program displays numbers 0 to 9 and the decimal point. In the program I call pport2 with the necessary values to light up the led's on the 7 segment "numeric display" on my project box to look like numbers.
Here is the pport2.exe program I wrote, for sending any value to the parallel port, and it's very useful for non-programmers or programmers alike, to download from a free file hosting site (pardon any adds), you can rename the program if you want, to something easier to remember:
http://www.megaupload.com/?d=8XWEE1IXWhen ran, the program does not have any of its own error checking, it only sends out the data on the 8 data lines using the Windows system internal copy command, so you will need a compatable wireing scheme/method and I have one posted here as an image, if yours is different then it is possible it may not work right with this particular program. The program does not set or read any other of the 25 lines.
Run the program from the command line, or within a batchfile, ex. a sample calling/running of it would be: pport2.exe 255
In a batchfile, you can also step through commands by using the pause command on a line, all the user needs to do is
press any key to continue or ctrl break, or ctrl c, or "X out of the window".
You can also call it from within the code of another program. This program does create a temporary data file in the folder/directory of which it was ran, thats part of the reason it might seem a bit slow, but if you run it on a flash memory drive or a "virtual drive" in memory, it should be faster.