nugteren@pttrnl.nl (10/30/90)
I have written a serial port driver which works fine on port A (modem port), but when I tried rewriting it to port B (printer port) I get error -98 (portNotCf : Driver Open error, port not configured for this connection). I look in the Inside MacIntosh and I found the comment (II-246) : "The printer port SHOULD be used for output only connections to devices such as printers, OR at low baud rates (300 baud or less).The modem port has no such restrictions...." I also found this remark (III-24) : "Port A and Port B are identical except that Port A (the modem port) has a higher interrupt priority, making it MORE suitable for high-speed communication" What should I make from this? Does it mean I should be able to configure port B for 1200 baud input at my own risk of hardware overrun errors, or is such a configuration internally restricted? I get the feeling the former is true, because when I try to configure port B for 300 baud I get the same error. What's going on? It's got to be a bug in my code but I can't find it anywhere. I hope someone out there can help, Nils
russotto@eng.umd.edu (Matthew T. Russotto) (11/01/90)
In article <57715.272d5199@pttrnl.nl> nugteren@pttrnl.nl writes: >I have written a serial port driver which works fine on port A (modem port), >but when I tried rewriting it to port B (printer port) I get error -98 >(portNotCf : Driver Open error, port not configured for this connection). Sounds like you have AppleTalk on. Thus, you can't use the printer port for serial communications. -- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu Tax the rich, and feed the poor -- until there are, rich no more.
oster@well.sf.ca.us (David Phillip Oster) (11/02/90)
>error -98
this probably means that appletalk is turned on. Use the Chooser to turn it
off.
On the original 128K mac, at baud rates above 9600 baud, during floppy access,
port B would loose data, but port A was specially checked by the floppy
driver. I would be surprised if this were still a concern.
The ports differ slightly in the power available on the auxiliary control
lines, but unless you are designing hardware to run off power scavenged
from the serial port (like Apple's MIDI interface does) you won't have to
worry about this.
--
-- David Phillip Oster - Note new signature. Old one has gone Bye Bye.
-- oster@well.sf.ca.us = {backbone}!well!oster
Chris.Gehlker@p12.f56.n114.z1.fidonet.org (Chris Gehlker) (11/04/90)
> "Port A and Port B are identical except that Port A (the modem port) has a > higher interrupt priority, making it MORE suitable for high-speed > communication" > > What should I make from this? Does it mean I should be able to configure port > B > for 1200 baud input at my own risk of hardware overrun errors, or is such a > configuration internally restricted? I get the feeling the former is true, > because when I try to configure port B for 300 baud I get the same error. > What's going on? It's got to be a bug in my code but I can't find it anywhere. To quote from page 2-9 of the Zilog Z8030 Z-Bus SCC/ Z8530 SCC Serial Communications Controller Manual: "Transmit interrupts, receive interrupts, and external/status interrupts are the main sources of interrupts. Each interrupt source is enabled under program control with channel A having a higher priority than channel B and with receive, transmit, and external/status interrupts pripritized respectively whithin each channel." I think Apple is just trying to warn you that it's inherent in the design of the SCC that port A will always be serviced before the printer port. I wrote the device driver for the Kurta serial graphics tablets which run at 9600 baud. They work fine on port B even if the user is communicating on port A at up to 2400 baud. I can afford to loose a packet now and then. -- Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!56.12!Chris.Gehlker Internet: Chris.Gehlker@p12.f56.n114.z1.fidonet.org
stevec@Apple.COM (Steve Christensen) (11/06/90)
In article <57715.272d5199@pttrnl.nl> nugteren@pttrnl.nl writes: >I have written a serial port driver which works fine on port A (modem port), >but when I tried rewriting it to port B (printer port) I get error -98 >(portNotCf : Driver Open error, port not configured for this connection). >I look in the Inside MacIntosh and I found the comment (II-246) : > >"The printer port SHOULD be used for output only connections to devices such as >printers, OR at low baud rates (300 baud or less).The modem port has no such >restrictions...." The -98 error means that the port was configured for something else. The "something else" is most likely LocalTalk. In order to use the port, you'd have to turn off LocalTalk in the Chooser. The only real difference between the modem and printer ports is how well they work at higher baud rates when other things (like floppy disk use) are going on that disable interrupts for [relatively] long periods of time. The floppy disk driver, for example, stashes any bytes received by the modem port while it's reading and writing since it can't be interrupted during this time. When it finishes the read or write, it passes the data to the serial driver to process as if it had received them itself... steve -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ whoami? Steve Christensen snail: Apple Computer, 20525 Mariani Ave, MS-81CS, Cupertino, CA 95014 Internet: stevec@apple.com AppleLink: stevec CompuServe: 76174,1712