home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!taligent!apple!applelink.apple.com
- From: D0989@AppleLink.Apple.COM (G-Bar Partnership, R Myers,PRT)
- Newsgroups: comp.sys.mac.oop.macapp3
- Subject: Re: Serial Port Hardware Overr
- Message-ID: <727590613.9275764@AppleLink.Apple.COM>
- Date: 21 Jan 93 03:30:00 GMT
- Sender: daemon@Apple.COM
- Organization: AppleLink Gateway
- Lines: 32
-
- Dear Keith,
-
- Just some notes from the trenches in dealing with the Mac serial ports.
-
- If something holds the interrupts off for more than 3 character periods (about
- 3ms @ 9600 bps) the SCC will overrun. The Mac OS has hooks in some interrupt
- routines to try to unload the SCC manually, and to insert the received chars
- into a buffer that will be unloaded by the driver the next time the driver is
- called. If you are not doing anything special to the SCC setup, or are not
- writing your own driver this _generally_ works. Apple however loudly declaims
- (and disclaims) that the Mac is not a real-time device and that you can't count
- on how long or when interrupts may be off. Disk activity and network activity
- (LocalTalk particularly, for obvious reasons) can shut the interrupts off for
- long enough that you can drop characters.
-
- If you are doing something silly with the SCC all bets are off. We have a
- special driver that when the SCC is properly configured for the data stream
- that we are looking at (which is broadcast, we can't handshake it), the receipt
- of a character doesn't set the bit on the VIA that the little hooks are looking
- for.
-
- If you are not messing too badly with the SCC, but are using your own driver
- you may be in better shape. DTS sent me a copy of the serial driver in the 64k
- rom machines as an example of how to to use the PollProc hook (what they call
- that little stack of characters).
-
- You probably just should do handshaking if you can.
-
- Good luck,
-
- Bob Myers
-
-