Path: utzoo!attcan!uunet!isc-br!jimc From: jimc@isc-br.ISCS.COM (Jim Cathey) Newsgroups: comp.sys.mac.programmer Subject: Re: Serial port question Message-ID: <2661@isc-br.ISCS.COM> Date: 22 Nov 89 03:45:16 GMT References: <1989Nov16.190032.13720@aucs.uucp> Distribution: na Organization: ISC Systems Corporation, Spokane WA Lines: 28 In article <1989Nov16.190032.13720@aucs.uucp> peter@aucs.uucp (Peter Steele) writes: >Does anyone know how to initialize the Mac serial driver to send at >38400 baud? The contants are available to initalize it to 57600 and >19200 baud but not 38400. Any reason why? I think that Microphone can >send at 38400 so its probably possible. According to IM volumes II & III, and Zilog's SCC manual, a constant of 1 will send at 38,250 baud. The formula is: sclk = 1/(3,672,000 / 16) baud = 1/(2 * (CONSTANT + 2) * sclk) (0 is 57375, 1 is 38250, 2 is 28688, 3 is 22950, 4 is 19125, ... 380 is 300). The constant is dropped directly into the SCC's time constant register. Just looking at the numbers, it looks like they used one of those drop-a-half-cycle-every-eight-full-cycles (multiply by 15/16) counter stages to get 3.672 MHz out of a 15.6672 MHz crystal. +----------------+ ! II CCCCCC ! Jim Cathey ! II SSSSCC ! ISC-Bunker Ramo ! II CC ! TAF-C8; Spokane, WA 99220 ! IISSSS CC ! UUCP: uunet!isc-br!jimc (jimc@isc-br.iscs.com) ! II CCCCCC ! (509) 927-5757 +----------------+ "With excitement like this, who is needing enemas?"