All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > General Electronics Chat


General Electronics Chat Discussion forum for general chat about anything electronics related, including asking questions about material in the All About Circuits E-book, Worksheets, and Videos.

Reply   Post New Thread
Thread Tools Display Modes
Old 04-29-2012, 09:08 AM
Mad Professor Mad Professor is offline
Senior Member
Join Date: Apr 2009
Location: Isle Of Wight, UK
Posts: 132
Question Printer Port Handshaking SPP/EPP/ECP

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.
Reply With Quote
Old 04-30-2012, 06:07 AM
Phant Phant is offline
New Member
Join Date: Apr 2012
Posts: 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.
Reply With Quote
Old 04-30-2012, 06:48 AM
Mad Professor Mad Professor is offline
Senior Member
Join Date: Apr 2009
Location: Isle Of Wight, UK
Posts: 132

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.
Reply With Quote
Old 04-30-2012, 02:55 PM
Phant Phant is offline
New Member
Join Date: Apr 2012
Posts: 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.
Reply With Quote
Old 04-30-2012, 03:23 PM
t06afre's Avatar
t06afre t06afre is offline
Senior Member
Join Date: May 2009
Posts: 5,939

A trick then using the parallel port is to tie the ack pin to ground. The SPP mode is the original parallel port mode.
Reply With Quote
Reply   Post New Thread

, , ,

Related Site Pages
Section Title
Worksheet Shift registers
Worksheet Digital communication
Video Lecture Hardware: IO, RTC, PS - Microprocessors
Textbook Networks and busses : Digital Communication

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ti Chipcon CC1110/CC2510 SPI problem Hamilton Embedded Systems and Microcontrollers 11 12-18-2013 09:58 AM
Problem with JetDirect card? spinnaker Computing and Networks 17 02-20-2010 03:31 PM
Driving a relay through a printer port fester225 The Projects Forum 2 11-12-2008 02:24 AM
Printer parallel port convert to sensor parallel port threegold The Projects Forum 1 07-04-2008 10:36 AM
16F676 port problems lazerspot Embedded Systems and Microcontrollers 1 02-17-2008 04:56 AM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 07:29 AM.

User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.