Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!shelby!agate!ucbvax!ADMIN.HumberC.ON.CA!GRAY From: GRAY@ADMIN.HumberC.ON.CA (Kelly Gray) Newsgroups: comp.sys.apple2 Subject: Re: Question on BREAK detection on Super Ser.? Message-ID: <91Feb24.083458est.57432@ugw.utcs.utoronto.ca> Date: 24 Feb 91 13:24:06 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 19 One way to detect a break with the SSC is to look for a series of $00 bytes, each with a framing error. How many of them will be recieved depends on the baud rate. at 1200 bps, a 250mS break will show up as 30 consecutive $00 bytes, all of which are improperly framed (no stop bits will be present) At 2400, this will be 60 consecutive $00 bytes, while at 300 bps, only 7. Your code could do something like check to see if there is a framing error as each character is recieved. (bit 1 of the status register set) Then increment a counter if the byte recieved is $00. If the counter reaches six without any other character being received, you've almost certainly found a break. _________________________ ________________________________________ / \ / \ | Kelly Gray | The opinions expressed in the preceding | | | message are not guaranteed to represent | | GRAY@ADMIN.HumberC.ON.CA | any form of rational thought whatsoever | \_________________________/ \_________________________________________/ Brought to you by Super Global Mega Corp .com