[comp.sys.mac.programmer] Synchronous serial communication

ragge@nada.kth.se (Ragnar Sundblad) (10/06/88)

Is it possible to do synchronous communication with the Serial Driver?
I have understood that I can connect a clock to the HSKI-pin, but then?
How do I tell the driver that it should use an external clock?
How do I tell it to be synch.?
How do I set the idle patterns etc?

Any help greatly appreciated!

	/ragge@nada.kth.se

han@Apple.COM (Byron Han, Architect) (10/09/88)

In article <590@draken.nada.kth.se> ragge@nada.kth.se (Ragnar Sundblad) writes:
>Is it possible to do synchronous communication with the Serial Driver?

Theoretically yes.  However, in reality, there are so many things that
turn off interrupts (e.g. the Sony floppy driver, AppleTalk drivers, etc.)
which make life a living ...  well you get the message.

You need to directly bang on the SCC to do synchronous communications through
the serial ports.  This is also a nono since the SCC may not always be
accessible.  

Sorry for the bad news.
------------------------------------------------------------------------------
Byron Han, Communications Architect      TANSTAAFL - You Get What You Pay For.
Apple Computer, Inc.                     -------------------------------------
20525 Mariani Ave, MS27Y                 Internet: han@apple.COM
Cupertino, CA 95014                      UUCP:{sun,voder,nsc,decwrl}!apple!han
--------------------------------------   GENIE: BYRONHAN
ATTnet: 408-973-6450   Applelink: HAN1   CompuServe: 72167,1664
------------------------------------------------------------------------------

paul@unisoft.UUCP (n) (10/10/88)

In article <590@draken.nada.kth.se> ragge@nada.kth.se (Ragnar Sundblad) writes:
>Is it possible to do synchronous communication with the Serial Driver?
>I have understood that I can connect a clock to the HSKI-pin, but then?
>How do I tell the driver that it should use an external clock?
>How do I tell it to be synch.?
>How do I set the idle patterns etc?

You have to write your own device driver. To do this you need a data sheet
for the Zilog 8530. This will tell you all this information. Look at
Inside Mac IV/V for information about how the chips are wired into
the Mac. 

Warning: because of the framing etc requirements for synchronous communications
	 be carefull about writing code that will be used in environments
	 that turn off interrupts for more than the time it takes to read
	 3 characters from the serial port (ie 3ms at 9600 baud - the chip has
	 a 3 byte input buffer, actually allow some extra time for overhead
	 say 2.5mS). This effectively rules out operation concurrently with
	 the floppies or appletalk (which has hooks for the serial driver
	 but not for any synchronous operation).

	Paul Campbell


-- 
Paul Campbell, UniSoft Corp. 6121 Hollis, Emeryville, Ca
	E-mail:		..!{ucbvax,hoptoad}!unisoft!paul  
Nothing here represents the opinions of UniSoft or its employees (except me)
"Nuclear war doesn't prove who's Right, just who's Left" (ABC news 10/13/87)