Posted 08 March 2012 - 05:19 AM
I want to send data through my laptop's parallel port. It's actually a command that the rf module on the xbox360 needs to start looking for a wireless controller. I have arduino code to do this but...I don't have an arduino! I do have a parallel port though.
But it's hard to find any information on doing this. Can anyone point me in the right direction?
EDIT: I managed to get a response from the guy that wrote the arduino code. He told me very specifically what information the rf module needs.
Give the module the signal to listen by pulling the data pin low then send bits on the low clocks, pulling the data pin high after the command to let it know you're done (after which I put the microcontroller pin into high impedance). The module accepts instructions 10 bits long (I've not experimented with longer or shorter commands). The sync command is 0×04/b0000000100.
This post has been edited by AerosolSP: 08 March 2012 - 11:56 AM
Posted 08 March 2012 - 12:29 PM
&H378 is for reading/sending stuff to the D0....D7 pins,
&H379 is for reading status input pins and enabling tristate to do a read on data port.
&H37A is for controlling status output pins
The port may vary, but its usually 378, 278 and sometimes 3BC
Posted 08 March 2012 - 12:45 PM
Awesome. Any clue on how to interface with the parallel port in windows xp?
Posted 08 March 2012 - 03:27 PM
install UserPort and open up the required port range and use the means provided by your programming language to deal with hardware ports, and if that is not available you need some kind of port driver
Posted 09 March 2012 - 01:37 AM
Hmm...it looks like I might not be able to achieve what I'm trying to anyway. I can't find a way to pull the data pins on the parallel port high or low in software only. I need to pull a data pin low to let the rf module know I'm about to send a command, and pull it high so it knows when I'm done. If there's no way to do it in software, I'd have to do it in hardware, which is bit beyond me!
Posted 09 March 2012 - 03:50 AM
You can pull any output signal high or low, unless you're in ECP mode, then it may do all kind of fun things for you... LPT port can roughly handle 1M accesses per second so it should be fine for most tasks. Bitbanking is exactly how one device I made for burning and dumping MD cards and memories works.