_._ •• - CONFIDENTIAL ••••••••••••••••••••••••••••••••••• CONFIDENTIAL ..... .. Apple Macintosh / 3.5-Inch Sony MicrOfloppy Disk Interface Design Document G. Crow, B. Smith & B. Howard Copyright (C) Apple Computer Inc. 19 May 1983 •••• -- CONFIDENTIAL ••••••••••••••••••••••••••••••••••• CONFIDENTIAL .----- Contents: Page 1 Introduction Page 1 Pinout for Macintosh DiSk Inte.rfac!e Connector I Page 2 MC!tot'l.ttol Inputs, Outputs},artd Status Bits Page 3 Reading atid Writing on the MCl " Page 4 . I P'w14 Sigttil Cha.racter'is d c:s' ' Page 4 Page 5 • ,'-I ,." Page 7 FU9i'i~~f6fMC! PAt. Device, " Page 9 Page 11 ~.ote :t:his lsa revisionb,f't:he iMavSony InterfaheOesignDoc.ument.-- This ,v,U"s:!.QT/. extendsehe -desel't~ttot1~of IMOTORONand·/ Sr!p· (pages'~ aria 3), and . ,addatlolo new. sections : '. M4~.(jr·:,Sp.eds,(pag~,4) a~d'" Hardwar.e Inter'f~ce (page 1L). ~ '1' .;". . I \ ! 19 May 1983 3.S-Inch Sony Disk Interface Page 1 I~TRODUCTION This document describes the mechanical, electrical, and software interface between an Apple Macintosh computer and a Sony 80 track, 3.S inch microfloppy disk drive. The interface supports auto-eject operation, allowing the disk cassette to be ejected from the machine under software control. In addition, a connector signal (/PIHM) allows the speed of the drive motor eo be adjusted under soft",are control, "'hich increases the drive capacity and keeps the speed of the media, "'ith respect to the head, relaeively constant. For future versions which may use two read-write heads, (allowing data to be recorded on both sides of the disk), a control signal (SEL) is provided at the'connector. Apple intends to use ehe drive with a proprietary GCR (Group Code Recording) encoding scheme. This scheme reads and writes code words containing 2, 4, or 6 microsecond intervals between flux transitions. PINOUT FOR APPLE ~CINTOSH DISK INTERFACE CONNECTOR This table shows the signal names associated with the pins of an Apple ~acintosh 20-pin disk drive connector. MAC f'-' - - Signal Connector Name / Pin No. 12£f'j J - 7 ", .- -:::: CGNO 1 '-_._- CA0 .CGNO· 2 3 " Z .... ,- ---...;:;;> CAl 4 -------_. CGND CAl 5 6 :J 1'3 , _.- _. ./ CGNO LSTRB 1 8 H H _ .. ';s- • <- -.l2VF 9 t:: ;,..J ? lWRTGATE 10 1.5 +;'\1'14' 11 ' ~ - /' ~ , • . SEt 12 .. ' -,;> \/)~ '=''7 ..J +12tf'! 13 r . .;> .: /ENBL '1', 14 ICc -- / , +12VF IS • 1 -' - r- , RD +12iVF 16 17 17 7 -- ~ :;7 .:: ,~,:'c ~~ , - r? - - " - - '---7' i.:: A-~ WRtDATA 18 +12Vi ,. ~ N·C, /PWM 20 /9 --,-;, .' ·.v ~. : >, - ..;. 19 May 1983 3.5-lnch Sony Disk Intt'!!rface Page ., Mcr CONTROL INPUTS, OUTPUTS, AND STATUS BITS Note: the control signals and status bits described here refer to the Microfloppy Control Interface! IC (MCl) installed on the disk drive's Read-Chain board. An "input" refers to one of the MC! inputs, likewise for the outputs. There are four control inputs to the Me!: 0. ICSTIN This input 8oesto a zero only when a cassette is in the drive. 1. WRTPRT This input goes to a one only ~hen a write-protected cassette is in the drive, or when no cassette is in the drive •. 2. TK0 This input goes to a one only when the head is located at track 0. From the time the ISTEP output is brought low, a delay of 12 mS is required before the TK0 input is valid. 3. TACH This input receives 60 pulses for each rotation of the drive motor. The signal is used for accurate calibration of motor speed • ~ote: when these inputs are read on the RD line, as described in the . following section, all of the Signals except ICST!N appear inverted. There are four control outputs from the MCl: 0.' IOlRTN This output Uts the direction of head motion for stepping from one track to another. A zero sets the direction towards the center of the disk~ When the drive is disabled (fE~Bt high), the IOIRTN output is set to aorte. . I • 1. ISTEP If the tit1" •. !s enabled (/ENSt.. iow) ,setting the ISTEP output to a zero tells the disk-s CPU'to begin a full track step sequence. When the'st~p sequence is c01l!:pl~te (totithin 12 mS), the disk~s CPU sets the/STEP outJ)ut:.to a Qne. W'ht'!!n the drive is di.sabled (/ENBt high), the 'I STEp· outp'l:it is '~~t to a one .. ~ ' , . 1 2. IMOTORON If the dtive;)1senabled (lEN-Bt low) and a ci's.sette is in the drive (lCSTIN 10wl.t;'.t:l11le lMO'l'ORON is btotigh('low, a delay of 400mS . is required before val.td read data maybe expecti!d f:ol'!! the d::ive. When the drive isdis.afiledUENBth1gh). IMotORON.·cannot be. changed. , '.'" ' 3. EJECT . If t~e.dt1vefi·l:.efiab.led.(IENBLlow)t ~se'ttingt'he EJEC: output to a one causesthe,~ .' . ~:.,' . ,[" '". '. '~. , oi, 6. SIDES 'this status bit is J:'ead as .a.ZE!!ro if thi! d!"ive is single..;sidec (one read/;-trite head). ~r a one.H the drive 1s double-sided~' . 7. IDRV!N This. s~ae~s'bi'ltd~ read as a2:eroO'nl:l.i fthe se he ted j rive is,ac tu~i 11 c.onneeted to th~,. Ap:ple, Mai:intoShcotll1?u ter. 19 May 1983 3.5~Irtch Sony Disk Interface Page 3 READING AND WRITING ON THE Me! To read an MCl control signal or status bit, or the RDDATA signal from a disk read/write head, first be sure that LSTRB is low and the drive is enabled (/ENBL low). Then follow the chart below to determine the correct state of CA0, CAL, CA2 and SEL for the desired signal. This signal will then appear on the RD line. Note that all of the Mel input signals except /CSTIN are inverted when they appear on the RD line. CA2 CAL CA0 SEL-0 SEL-1 0 0 0 /DIRTN /CSTIN' 0 0 1 /STEP /WRPROT 0 1 0 /MOTORON /TK0 0 1 1 EJECT /TACH (Write only) 1 0 0 RDDATA RDDATA (Head 0) (Head 1) 1 1 0 SIDES SIDES 1 1 1 /DRVlN /DRVIN The state of all the signals except EJECT can' be read. However, you can write to only four signals: theconttol outputs /DIRtN. /StEP, /!-10TORON and EJECT. To write to one of the control outputS , begin byfollo101irig the instructions for reading the sig,nal,as above, /Jut set CA2 to the value ( 0 or 1) to which" you wish to set the contro.l. output. Next; bring LStRB first high and then low • . Note 1: be sure that CA0-.:cAZ arid SEL do not cha'nge value while LS'I'?S is high, and that CA0 and n CAL are ret'Jrne.d to a one level before changing SE1. :;oce 2: EJECT is at). unlatch~d '. o~tPut:;onlY: the state of the EJECT signal cannot be read (it al~aysuads the value 0). to ejecta casse,.tte, follow the instructions for setting t.heEJ'EC!6utput to a 1, hue hold tS'!'RBhigh for approxima"tely one-halfseC:,ortd. . ~ote 3: the Her output /M6tORONwill not actually ',affec: the drive u:1less a cassette is in the dri9_. . " . . . Note 4: after you set lS'rE'P to'<.'0. the disk drige resetsi t: to a 1 within 12 mS. How-ever. ,you must al1ily's>Sli!t tSTRB low before the disk resets /ST!? to a 1. To be safe J make surethattSTRB. is high less . ~ than '1 mS except. dur:!.::.; - ejec.t. 19 Hay 1983 3.5-Inch Sony Disk Interface Page 4 /PWM SIGNAL CHARACTERISTICS The /PWM signal is used by the co~puter to adjust the speed of the drive motor. This TTL level signal transmits timing information in the form of pulses whose average width width determines the motor speed. The basic pulse rate is 22 kHz, and the duty cycle of each pulse (the portion of time the signal is at a logic zero le~el) may vary from 0~ to 907.. However, the signal is dithered such that ten pulses must be averaged to reconstruct the true motor speed, giving an effective frequency of 2.2 kHz. MOTOR SPEEDS The following table shows the correct motor speed for each of the 80 disk tracks: Track Soeed (rpm) 0 ..... 9 363 10 ••• 25 393 26 ••• 40 429 41. •• 55 472 56." .'71. 524 72 ••• 79 590 19 May 1983 3.5~Inch Sony Disk Interface Page 5 MCI PAL EQUATIONS, PALl6L8 BURRELL SMITH & GEORGE CROW PAT00l0 2-l"_~,,{-83 • MICROFLOPPY CONTROL INTERFACE (MC!) CA0 CAl CAl LSTRB /ENBL SEL ltDOAl'A ICSTIN WRTPRT G}.1) TK0 EJECT LE /DIRTN /STEP .05 IMOTORON TACH R.D vec LE • /L5TRB .. ISEL + /CA2 .. ICAl * ICA0 * CSTIN .. SEL + ICA2 * ICAl * CA0 * WRl'PRT * SEt + ICA2 .. CAl* ICA0 * !K0 * SEL + ICA2 * CAl * CA0 * TACH * SEt ID!RTN • /CAl * /CAl * ICA0 .. LE * 15E't + OIR.TN * SEL + OIRT~l * CAl + OIRT~i .. CA~ + orRTN * ILSTRB + /E~~BL I STSP ::II E~BL ~ 05 * lCAl *iCAl * CA0 * LE .. I SEL + " ENBL * 05 *·STEP .. StL ~ ENBL .. 05 * S':EP* CAL '\' :'~B L * 05 .. StEP .?e'A0' 4- ENBL * 05 * STEP*:I.LST~! /MOTORON "" ENBL * ICAl * CAL" leA0' '" t.E * 1St'!. '+ MOTORON * 5£L+ 'i ~bTOR.ON *' /CAl Of' ~, ; MotoRdN* /l.STR.B , 19 May 1983 2.5-Inch Sony Disk Interface Page 6 EJECT - ICA2 * CAl * CA0 * LSTRB * ISEL + SEL + ICAl + ICA0 + ILSTRB + IE~BL IF (ENBL) RD • ICA2 * SEL 111 ILE + ICA2 111 leAl 111 ICA0 111 I~EL * OIRTN + ICA2 111 ICAI * CA0 * ISEL * STEP + ICAl 111 CAl 111 ICA0 * ISEt * MOTORON + CA2 111 ICAl '* ICA'/J * IRDDATA + CAl * CAl * CA'/J + CA2 * CAl 111 /CAiJ I DESCRIPTION: . THIS PART I~TSRFACES THE 3:S-INC1.:r SONY DISK ·TO~.AC·!NTOSH. NOTE: THIS IS PATTER.."l (REVISION) NUMBER I'll. THr"s .PART'S CHEC~SlJ!1 IS: 0FS0. 19 May 1983· 3.S-Inch Sony DiskInte~tace Page 7 FUSE PLOT OF MCr PAL DEVICE Microfloppy Control Interface (MCI Pattern 10) 0123 4561 8911· 1111 1111 2222 2222 2233 01 2345 6789 0123 4S67 8901 o -x-- --_. --~~ 1 -X-- ---- x--- ---X 2 -x-x -X-- -x-- ---X 3 -XX- -X-- - ...-- -X-X 4 X--X -X-- ---X -x-- ---- 5 -x-x x--- -x-- 6 X-X- X--- 7 x--x X--- 8 XXXX XXX:< .XXX,.X XXXX XXXX x..'<.'{X XXXX xxxx" 9 XXXX XXXX XXXX XXXX .XXXX xxx;< xx.xx xxxx 10 XXXX :XXXX xx.."t.X XXXX xxx.'( 'XXX.X 27 XXXX x.."(X.X ,XXX,XXXXX XXXX XXXX XXXX xX-xx 28 XXXX' XXXX LUX'; ,XXX,X XXXX XXXXXXXXX.XXX 2. 9 XX,.\X XXM. ~' .., XAXX XXM xxxx . !..XXx. . . xx.xx 30 xxx."( XXX=< moe xxxX' x..'UX ,xxxx XXXX xxx..x 31 xxxx XXXXxxxx.·· XXXX -x..-O:Xxx..XX. )cx'U xxxx 19 May 1983 3.S-Inc:h Sony Disk tnterfac:e Page 8 0123 4567 89U 1111 1111 2222 2222 2233 01 2345 6789 0123 4567 8901 32 33 -xx- ---- ..x..-:- -- -_..• _ ---. ..... ..... ·_.-x- -x..- _-... ....._- -"'lIt_'" .... .. -XX- .... ~ ........ ---- 34 -xx- x--x .... 35 36 x-- ---x ---- --- -XX- -xx- ----X ---X . ; ........- ----" 37 ..x-- -XX- ---x 38 XXXX x'x' '<..X xxx.x xx:o:. XXXX. XXXX XXX..'< XXx...X 39 xxxx xxxx XXXX xxxx x..UX xxxx XXXX xxxx 40 41 -x-x -x- --- ...._- -x-- ~-X- 42 43 x--- ---- --- x--- .....-x .......... ---- ---X 44 --X- 45 -- ·x..... _......... -...... .......- ---X --x ......--- 46 47 ·x..x.."<..X ----- L"<.'{X XXXX X,XX.'<. ~ ..... X-"· --- XXXX .......... XXXXXXXX .x.xx."( 48 49 __........ ......-.. ........__ ...-....... ........... ............. -X-" -X--· . .\ . ..... .......... .- -x-- -.,.,--- ---- ......... 'x·_-- _ _ ~tIiiit. 50 -x-x ·... X....• ......... x--... 51 52 -x.'\- x--x -x ...... · -x..~ X ....-- .------ ·x---- -'!io~- ............. ........ --x ... ----' -yo.x- ..... ....... x--- --- ... ; 53 x-x- ~ ., ~ ~ ~' 54 x..UX X: ..... .-. ;.. --_...... 59 60 ---:X - .......- ---- --*. -.- ~"" ":;.;.--- :ilAi!(~' :~~.',}'-~.\ ,.--~- ... - ~ ';(\. .;~- ..... ··''''8..- ... ..........-- -~ -- _ , . , ........,<'1:' "' 61 ~~~."\ i~"'--' 62 .......... ..... ":···X~"-'" .... .....-... ......-- .----- ' 63 x..xxx XXXX ····kXX.~····:,:tXXx XX".x XXXX XXx:< x..X.XX Legend: , ...it -:-,.' T .. l1li ·'·r\iae Not: Blown (t.",0) . Fuse Blown (H t ."'. - ,.1) >19 May 1983. 3.S-In.ch Sony Disk Interface. Page 9 MCI TIMING DIAGRh~S Unless indicated othervise, timing is variable, but must not be less than 1 p.S between transitions.. In these diagrams, x.xxx indicates a period when the signal is in an unknown state (either high or: low, or floating). 1. Read MCI Control Line .. This example reads the state of the /MOTORON line. The equation for doing t;1is is: CA0 a 0, CA1-l, CA2-0; SEL-0. (Note: CAl goes low before returning to a one for the convenience of software, only.) CA0 xxxxxxxi CAl LJ. CA2" xxxxx.,.uxxxx 1_ _ _ _ _ _ _ _ . I --...0.-. . . .___ SEL XXXX...XXXXXXXXXX 1 ------------------------~l~-- RO (for example) 2. Write to ~CI Output Line This example changes the state of the I MOTORO'N, line frOm high to low. (Noee: CAl goes low before returning to a one for the convenience of software, only.) CAl CA2 x.x..X.X..XXx.'\.X.."\X 1_ _- _ _ _ _........_ _ _ _ _ __ SEt 'lyyyyyyyyyyyyyf .. -.,. . - - - - - - - .... - - -.. 1_ _...,....,................... , ,,,,,,",_ _ _ _. ,.... ",...'......... ; ,........!!'I't....,.,..... LSTRB ------~...,...,~~ . F=I " . . J . ~'.>,; .1 JlS I MOTORON " I -~----- J. ':)-lnch Sony 01si<. ,In terface " Page ,1U ",. ,I: .'r '." ,r",' ", 3. ' Read Data This example "reads datafr'om disk read/wr~ te head-0. On a ,single-sided drive, . correct data will be read no matter which head is selected. (Note: CA2 goes low before returning to ~ one for the convenience of ~oftware, only.) CA0 xxxxxxxi , CAl xxxx.x.xxx.x I", , ' xxxxxxxxxxx I CAl - I SEL XXXXXX,.,