Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / DLL request - Parallel Port

Author
Message
TheComet
11
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 11th Sep 2011 15:22
Hi everyone


I'm doing a little electronic project with a friend, and I'd like to be able to interface with my circuit board in some way. The easiest solution would be the parallel port, since you can directly output signals without any complexity, and you have the advantage that the pins use TTL technology (much easier to use than something like CMOS).

Is anyone willing to program a DLL for accessing the port through DBP? Here's an article on the port : http://www.beyondlogic.org/spp/parallel.htm

All I need from the port are the outputs, so a command like this would be fine:



The above code would output 1000'0110 to the parallel port on pin 2-9.

Would this be possible?


TheComet

Hassan
10
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 12th Sep 2011 17:42 Edited at: 12th Sep 2011 18:24
never tested this, but could help? (you can read more on CreateFile on msdn)

and read/write to it, try it, you won't lose anything =p

also - from the link you posted:


so you can find out where your device is, then pass this to CreateFile, again, not tested, i used CreateFile to interface with USB devices(HID) using WinDDK, got some results, but not as expected, info was very rare and unclear, i gave up early because the hardware i had was damaged =p
anyways, i don't even know how the parallel port looks like, and also - don't randomly change the code above because writing on wrong address may damage your computer in some way

EDIT: ok so after some googling it looks like the LPT1 starts at x and ends at y addresses, and y - x = 3, and the pin assignments are for 3 bytes, perhaps, you could directly read/write on those locations? i shall test this on an old, broken PC, or i can use the schools computer

i'm really interested in this, if anyone could provide info/code it would be great :3

Manson_NS
15
Years of Service
User Offline
Joined: 4th May 2004
Location: Denmark
Posted: 13th Sep 2011 09:39 Edited at: 13th Sep 2011 09:41
Done - inpout32.dll is your friend:

http://forum.thegamecreators.com/?m=forum_view&t=94050&b=1
http://forum.thegamecreators.com/?m=forum_view&t=129655&b=18

it works damn well for projects like yours.
throw in IanM's Matrix1 plug in for working on the bit level, and you're happy as - well, insert happy animal here -
Manson_NS
15
Years of Service
User Offline
Joined: 4th May 2004
Location: Denmark
Posted: 13th Sep 2011 09:46
Uhm, btw, be sure to throw in some resistors, the parallel port damages easy if you're not carefull.

Also - forget about USB -> Parallel adaptors, they work on another level, and you'd be better off with an actual usb development board, or hacking that cheap USB cannon for an easy output relay.

I have done a few of these things with great success, so best of luck to you!

Login to post a reply

Server time is: 2019-10-17 03:26:56
Your offset time is: 2019-10-17 03:26:56