Macintosh Serial I/O



Every Macintosh contains serial device interface ports. The ports are used to interface to modems, to LocalTalk, to printers and a variety of other devices. MachTen interfaces to serial ports with the support of the Unix file system and special file names. Referencing a specific filename references a specific serial port. Reading and writing from a special file reads and writes data from the cooresponding serial port. These special files are known as serial device files.



Macintosh Serial Device Interfaces


Receiving serial data is necessarily a real time operation. A Macintosh must interrupt its computing to receive and store serial characters in real time before more characters arrive and overrun the previous data. Until recently, the latency between the time a character arrival and the time Macintosh system software is able to process that data can get very large. All Power Macintoshes and some Motorola 68000 Macintoshes contain Direct Memory Access (DMA) hardware to remove the real time component from Macintosh system software and support it instead by system hardware. With the advent of Macintosh system software to properly support the DMA hardware, Power and other Macintoshes are able to easily support serial I/O at very high speeds.

For the Macintosh-based serial device interface software, Tenon recommends the use of Macintosh OS 7.5.3 which contains a serial DMA based driver for use on those Macintosh hardware platforms that support DMA serial I/O. This new software supports serial bit rates in the several hundred kilo-bit range with extremely small system overhead. The latest version of this driver version 2.0.2 is highly reliable and works well with all Power Macintosh hardware and with some Motorola 68000 Macintosh systems. If DMA hardware is not available on a Macintosh, typically Motorola 68000 Macintoshes, data is received from a serial port on a character-by-character basis. This has an extremely high system overhead which means that serious consideration should be given to limiting the signalling bit rate of an modem connection to 9.6K bits-per-second unless a very high performance Motorola 68000 system is used in dedicated support of the serial operations.


MachTen Serial Device Files


MachTen supports access to the serial ports directly, the MachTen Macintosh "modem" port serial device file is "/dev/ttya" and the MachTen "printer" port serial device file is "/dev/ttyb". These devices access the ports without regard to modem status or modem flow control signalling. This works well for low speed operations or for character-at-a-time operations available from programs like "tip".

When the performance of a link is improved with higher speed 14.4 or 28.8 modems, it is necessary to use hardware flow control to avoid overrunning the modem or the Macintosh with too much data when a receiver is unprepared to receive. MachTen supports hardware flow control for the devices "/dev/ttyfa", "/dev/ttyfb", "/dev/ttycfa" and "/dev/ttycfb". Ttyfa and ttyfb support hardware flow control. Ttycfa and ttycfb also support hardware flow control and at the same time support the monitoring of the modem carrier signal to determine whether the modem has disconnected the phone link.

To use /dev/ttycfa and /dev/ttycfb a special Macintosh-to-modem cable is required. Many modem manufacturers ship Machintosh-to-modem interface cables that do not connect the modem carrier or DCD signal (pin 8) to the Macintosh GPi input (pin 7). See General Purpose Interface (GPI) Serial Cable for more information. The GPi input receives erronous input if the Macintosh to modem interface cable does connect this signal and consequently will erronously descide that the modem has flagged a DCD transition which will normally terminate MachTen PPP operations. If you are sure that you have a cable with GPi and DCD connected use the "ttycfa" or "ttycfb" connections. The use of "ttycfa" or "ttycfb" if you do not have the proper cable can cause MachTen to erronously treat a modem connection as if it had been "hung up". If you are unsure or do not have a proper interface cable use "ttyfa" or "ttyfb".

It is important to reiterate that use of hardware flow control is essential for modems operated speeds greater than 14.4K bps data rates.

| Tenon Home | Products | Order | Contact Us | About Tenon | Register | Tech Support | Resources | Press Room | Mailing Lists |

Powered By iTools

Copyright©2009 Tenon Intersystems, 232 Anacapa Street, Santa Barbara, CA 93101. All rights reserved.
Questions about our website - Contact: webmaster@tenon.com.