All,
I have looked all over for a solution that will allow me to output data directly to the parallel port when the Arduino is already connnected to the PC via the USB serial connection ..... what would it take to accomplish that.
It's not clear what is supposed to send data to the parallel port - is it the PC or the Arduino?
If you don't know how to send (and receive) PC data to the parallel port you should be able to find plenty of advice about that using Google. What PC operating system are you using?
If you want the Arduino to send data to the serial port it will be necessary to make your data byte appear on each of 8 Arduino pins. Look up direct port manipulation to help with that.
If you want the Arduino to send data to the serial port it will be necessary to make your data byte appear on each of 8 Arduino pins. Look up direct port manipulation to help with that.
Ivan_the_Red:
All,
I have looked all over for a solution that will allow me to output data directly to the parallel port when the Arduino is already connnected to the PC via the USB serial connection ..... what would it take to accomplish that.
Any ideas or suggestions would sure be great !!
You don't mention things like data rate and number of bits.
Assuming you are using Windows then you will have a few further obstacles.
If using XP, then you will need inpout32.dll loaded onto the PC and your app on it will read data via that.
If using 7, then you will need another version of the port accessing dll specifically written for it, as 7 is very picky about letting Ring 3 "user land" apps directly access ports.
You could use HAL (the hardware abstraction layer) built into Windows directly but then you will be heading for a world of hurt and frustration.
Another thing to consider is number of bits.
The LPT port is actually made up of 3 distinct ports at three addresses, namely the data port, the status port and the control port.
Most LPT ports will default to the data port being outputs when powered up, unless you program it to be an input.
So if you need to transfer a byte at a time, you need to set the data port (of the LPT port) to inputs, otherwise if "nibble mode" will suffice, you can simply use the status port.
Keep in mind though that some lines of the status port are inverted (active low).
Lastly, don't expect amazing or consistent data rates.
In practice you will probably achieve anything between 300 and 700Kbps.
EDIT:
If you are using Windows 8, then you are on your own, I don't even know if it's possible with that OS.
Never used it, don't think I ever will.