Printer Port Handshaking SPP/EPP/ECP

Thread Starter

Mad Professor

Joined Apr 15, 2009
133
Good day all.

I am looking for help and advice with regards to Printer Port Handshaking.

I have a duel printer port PCI card based on the Moschip Semiconductor MCS9865IV-AA Chip.

When the card is fitted and installed, windows see two new ECP printer ports.

Both ports work fine.

I need to be able to force one of the ports from ECP to SPP mode.

Reading the Datasheets for the MCS9865IV-AA, it says:
Parallel Port Features
Parallel port will support SPP/CBFIFO/ECP/EPP modes. Parallel port mode will be automatically configured to the required mode after handshaking with the connected device.
But now is when things get more intresting.

I am not using the printer ports for any standard devices, like printers, scanners, etc.

The printer ports are part of a CNC system, running Mach3 software, that uses the printer port inputs / outputs to control step and direction pulses.

ECP or EPP Mode is find for sending out step and direction pulses, but does not work for input signals, for that I need to use SPP mode.

So my question is: What is involved to make a SPP handshake signal to force the port from ECP to SPP mode?

Can it be done with simple hardware, or will I have to use a PicAxe or Arduino microcontroller?

Thanks for your time.

Best Regards.
 

Phant

Joined Apr 30, 2012
5
Been a while since I did anything with these.
The ones I have used either had physical on board jumpers to set mode or had a driver option setting.
For MS O/S right click My Computer -> Click Manage ->select Drivers and open the driver for your card. Check the tabs for a mode setting.

Other than that go to the manufactures web site and read the documentation for the card.
 

Thread Starter

Mad Professor

Joined Apr 15, 2009
133
I have e-mailed both MosChip Semiconductor and ASIX Electronics.

I have just had a reply from ASIX Electronics.

In Linux, for example, Use “lspci -v” to get the I/O ports address and IRQ.
you could use command “modprobe parport_pc io=0xd800 irq=10”, to set I/O port address 0xd800 and IRQ 10 for SPP mode.
And if you use ECP mode, you could use the command “modprobe parport_pc io=0xd800 io_hi=0xd400 irq=10”. The io and io_hi is reference to I/O port address.

If you use Windows OS, there is another story.
Only the MCS98xx DOS and Windows NT drivers have a mechanism to manually select the desired LPT (SPP, EPP, and ECP etc.) Mode for MCS98xx Parallel port.
The other Windows systems are supposed to be able to auto-switch to a proper LPT mode for PCI based parallel port devices.
MCS98xx can support SPP and PS/2 Modes without any problems.
As I am running windows xp on this system, it looks like I will be unable to force the printer port from ECP to SPP mode via software or drivers.

So the only way I can see to force the printer port from ECP to SPP mode is to send SPP handshake to the card.

Can this be done with a simple circuit, or will I have to use a Picaxe or Arduino microcontroller.

Thanks for your time.
 

Phant

Joined Apr 30, 2012
5
Just out of curiosity have you tried running your software?
SPP (standard parallel port) in general does not support bi-directional data and is mostly output only except for a handshake line or two.

If your software is attempting to read data (not impossible) from an SPP port then the software was internally written to do direct port access. Direct port access was disallowed by any MS OS released after NT (Win2000 on up).

You would need to write a windows device driver (or find one somebody wrote) that does a port/interrupt overlay for the ports and interrupt your software is using and can grant application calls the necessary access rights.

My guess is that switching the OS to some version of Linux is your best option or possibly running Win98 in a virtual machine configuration. No amount of external port handshaking is going to give the necessary access with Win Xp.
 

t06afre

Joined May 11, 2009
5,934
A trick then using the parallel port is to tie the ack pin to ground. The SPP mode is the original parallel port mode.
 
Top