ACT Apricot disk imageãž F^€ ) ÿÿ(C) ACT 1983 €vüFONT=BRIT02 KEYS=ACT001 ãžüÿÿ@`€   À à @`€ Àà! #@%`'€) +À-à/1 3@5`7€9 ;À=à?A C@E`G€I KÀMàOQ S@U`W€Y [À]à_a c@e`g€i kÀmàoq s@u`w€y {À}à ƒ@…`‡€‰ ‹Ààÿ ‘ “@ •` —€ ™  ›À à Ÿ ¡ £@ ¥` §€ ©  «ðÿÿï ¯ ± ÿO µ` ·€ ¹  »À ½à ÿ Á Ã@ Å` Ç€ É  ËðÿÍà Ï Ñ Ó@ Õ` ×€ Ù  ÛÀ Ýà ßá ã@å`ç€é ëÀíàïðÿñ ó@õ`÷€ù ûÀýàÿ!Añÿ ¡ Á á!Aa¡Áá!!#A%a')¡+Á-á/1!3A5a79¡;Á=á?A!CAEaGI¡KÁMáOQ!SAUaãžWY¡[Á]á_a!cAeagi¡kÁmáoq!sAuawy¡{Á}á!ƒA…a‡‰¡‹Áá‘!“A•a—™¡›Á១!£A¥a§©¡«Á­áÿ±!ÿOµa·¹¡»Á½á¿Á!ÃAÅaÇÿ¯ËÁÍáÏÑ!ÓAÕa×Ù¡ÛÁÝáßá!ãñÿåaçé¡ëÁíáïñ!óAõa÷ñÿù¡ûñÿýáÿ " B ÿo ‚ ¢  â !"!B!b!‚!¢!Â!ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿãžüÿÿ@`€   À à @`€ Àà! #@%`'€) +À-à/1 3@5`7€9 ;À=à?A C@E`G€I KÀMàOQ S@U`W€Y [À]à_a c@e`g€i kÀmàoq s@u`w€y {À}à ƒ@…`‡€‰ ‹Ààÿ ‘ “@ •` —€ ™  ›À à Ÿ ¡ £@ ¥` §€ ©  «ðÿÿï ¯ ± ÿO µ` ·€ ¹  »À ½à ÿ Á Ã@ Å` Ç€ É  ËðÿÍà Ï Ñ Ó@ Õ` ×€ Ù  ÛÀ Ýà ßá ã@å`ç€é ëÀíàïðÿñ ó@õ`÷€ù ûÀýàÿ!Añÿ ¡ Á á!Aa¡Áá!!#A%a')¡+Á-á/1!3A5a79¡;Á=á?A!CAEaGI¡KÁMáOQ!SAUaãžWY¡[Á]á_a!cAeagi¡kÁmáoq!sAuawy¡{Á}á!ƒA…a‡‰¡‹Áá‘!“A•a—™¡›Á១!£A¥a§©¡«Á­áÿ±!ÿOµa·¹¡»Á½á¿Á!ÃAÅaÇÿ¯ËÁÍáÏÑ!ÓAÕa×Ù¡ÛÁÝáßá!ãñÿåaçé¡ëÁíáïñ!óAõa÷ñÿù¡ûñÿýáÿ " B ÿo ‚ ¢  â !"!B!b!‚!¢!Â!ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿãžApricot Y:TECRFFDCDOC gr:KEYBD DOC r:€9CCTDIAG DOC µs:¬CALC DOC Ãs:­€ MISCREENDOC öt:³€GSX DOC Cu:¿€TECRFDDRDOC œu:ÌHTECRFSG DOC Úu:ð€+TECRFSIODOC Óv:€QSOFTDETLDOC ûv:¯€TECRFSWRDOC 6w:³,TECRFHRDDOC y:É6PCBSPEC DOC @y:ä(BTROM DOC Yy:ø€DISKS DOC {y:üãžTECRFSYSDOC z:/ãZ>ãZ> ãZ>ãZ>ãZ>ãZ>ãž.he FLOPPY DISK INTERFACE .op .FO # FLOPPY DISK INTERFACE List of Contents Page INTRODUCTION 3 DESCRIPTION 3 General 3 ãžDisk Write 4 Disk Read 5 Disk Formatting 5 Read/write Head Positioning 6 FDC DETAIL 7 General 7 Processor Interface 7 Disk Drive Control ãž 10 Command Register 11 Status Register 12 Track Register 12 Sector Register 12 Data Register 12 PROGRAMMING CONSIDERATIONS 12 Disk Drive Selection ãž 12 Head Loading 12 Head Positioning 13 Data Transfers 16 Formatting Commands 20 Force Interrupt Command 24 INTERFACE CONNECTION DETAILS 25 TRACK FORMAT 28 ãž  List of Illustrations Figure Floppy Disk Interface block diagram 1 Track format 2 .PA Š Figure 1. Floppy Disk Interface block diagram FDC Pin Definition WD Write Data DRQ Data Request WG Writeãž Gate INTRQ Interrupt Request STEP Step pulse output CLK Clock input DIRC Direction control D0 to D7 Data bus SSO Side Select Output WE Write Enable RAW RD Read Data RE Read Enable TR00 Track 00 CS Chip Select IP Index Pulse A0,A1 Register selects READY Ready input MR Master Reset WPRT Write Protect ŠãžINTRODUCTION Thå  Floppù  Disë Interfacå ió locateä oî thå Systeí Boarä  anä consistó oæ thå elementó oæ circuitrù aó illustrateä oî thå blocë diagraí  opposite®   Thå  interfacå  provideó  alì  thå   controì functionó  necessarù foò formattinç anä transferrinç datá to/froí thå MicroFloppù Diskó viá thå systeí disë drive(s). Thå   configuratioî  oæ  thå  interfacå  incorporateó  alì  thå necessarù facilitieó tï controì eitheò singlå oò duaì MicroFloppù Disë Drivå systems¬  operatinç ãžwitè eitheò singlå oò double-sideä disks®   Alì disks¬  whetheò singlå oò double-sided¬  arå  soft-sectoreä anä  encodeä witè thå samå disë format®  Thió formaô ió logicallù developeä froí thå IBÍ systeí 3´ formaô (á standarä formaô foò ¸ incè disks)¬  anä ió specificallù designeä tï obtaiî thå  optimuí numbeò  oæ datá byteó oî á 3.µ incè MicroFloppù disk®  Thå formaô employó doublå densitù MFÍ codinç witè 51² byteó peò sectoò anä ¹ sectoró  peò  track®  Thå numbeò oæ trackó peò sidå  oæ ãž disë  ió solelù á functioî oæ thå versioî oæ disë drive¬ anä maù bå eitheò 7° oò 80®  Á  brieæ descriptioî oæ thå disë formaô ió includeä aô thå  enä oæ thió sectioî (undeò thå headinç TRACË FORMAT)®  Thió shoulä bå reaä  now¬  iæ  thå  readeò  ió unfamiliaò  witè  thå  methoä  oæ recordinç datá oî disks® Controì connectionó betweeî thå interfacå anä thå drive(s©  arå alì madå internallù withiî thå Systeí Unit® Thå Floppù Disë Drivå Connectoò ió á 26-waù malå IDà terminaì mounteäãž oî thå componenô sidå  oæ  thå Systeí Board®  Aî associateä ribboî cablå  assemblù linkó thå interfacå tï thå drive(s).   Regulateä  poweò  supplù  voltageó  foò  thå  disë  driveó  arå supplieä  directlù froí thå Systeí Board®  Separatå poweò  supplù connectionó  arå  provideä  foò  eacè  disë  drive¬  usinç  Moleø connectoró  (mounteä oî thå componenô sidå oæ thå  Systeí  Board© anä 4-wirå cablå assemblies® DESCRIPTION General Thå  Floppù  Disë  Interfacå  consistó  oæ  á ãž Westerî  Digitaì WD2797-0²  Floppù Disë Controlleò (FDC)¬  á serieó oæ buffers¬  á decodinç circuiô anä thå interfacå connector. Threå  controì lineó foò thå disë driveó arå generateä directlù undeò softwarå control¬  viá thå Paralleì Interfacå oî thå Systeí Board®  Twï  oæ  theså controì lineó arå routeä viá thå  decodinç circuiô tï providå individuaì selecô lineó (DS0¬  DS1)¬  foò thå disë  drives®  Thå  thirä controì linå ió thå heaä  loaä  controì signaì (HLD© foò loadinç thå readãž/writå heaä oæ thå selecteä disë drive. Š Thå  motoò  controì linå (Motoò On© ió hard-wireä tï  0V¬  thuó providing á permanentlù activå controì signaì tï thå disë drives® Thå  configuratioî  oæ  thå  driveó  ió seô  sï  thaô  thå  motoò operates¬ only wheî á disë ió withiî thå drive. Thå  remaininç functionó for¬  controllinç thå movemenô oæ  thå read/writå  head¬  transferrinç datá tï anä froí thå  disks¬  anä monitorinç  statuó signaló froí thå driveó arå implementeä bù thå FDC®  Á  ãždetaileä  descriptioî oæ alì theså connectionó  anä  alì otheò connectionó tï thå interfacå ió provideä iî tabulaò forí aô thå enä oæ thió chapter. Alì  disë transfeò operationó performeä bù thå FDà (formatting¬ readinç disë data¬  writinç datá ontï disks)¬  arå controlleä  bù thå  systeí software¬  anä involvå botè thå 808¶ CPÕ anä thå 808¹ IOP® Thå IOÐ ió useä tï perforí DMÁ datá transferó betweeî systeí memorù anä thå FDà oî á byte-by-bytå basis. Thå  actuaì sequencå oæ eventó perfoãž rmeä bù thå processoró  anä thå  FDà durinç  disë  transfeò  operationó  ió  quitå  complex¬ involvinç   aî   interchangå  oæ  informatioî  betweeî  thå   twï processoró  anä  thå  generatioî oæ variouó  disë  drivå  controì signals®  Duå  tï  thió complexity¬  á simplifieä vie÷  oæ  disë write¬  disë  reaä anä disë formattinç operationó ió presenteä iî thå paragraphó belo÷ tï illustratå somå oæ thå basiã  principles® Á morå detaileä approacè ió takeî iî subsequenô paragraphs® Disk Writãže Disë writå operationó arå initiateä bù thå CPÕ issuinç á  writå commanä  bytå tï thå FDà oveò thå peripheraló datá bus®  Thå  FDà theî  searcheó foò thå requireä destinatioî oî thå disë  foò  thå datá (correcô side¬  tracë anä sector¬  witè thå correcô IÄ fielä CRà bytes)®  Wheî  thå  requireä  locatioî  ió  found¬  thå  FDà signifieó  tï  thå IOÐ thaô á datá bytå ió requireä bù issuinç  á DMÁ  request¬  viá  thå DRÑ output®  Thå disë  writå  cyclå  theî proceedó aó follows: ãž 1® Thå  IOР writeó thå firsô datá bytå intï  á  holdinç registeò (termeä thå Datá Register© withiî thå FDC. 2® Thå  FDà resetó thå DRÑ outpuô anä transferó thå contentó oæ thå Datá Registeò tï aî encodinç circuit, anä  signifieó  tï thå IOÐ thaô anotheò datá  bytå  ió required. 3® Thå  encodinç  circuiô  convertó thå  bytå  intï  MFÍ encodeä datá anä theî writeó thå datá tï thå disk. 4® Thå  IOÐ respondó bùãž writinç thå nexô datá bytå  intï thå Datá Registeò. 5. Thå procesó ió theî repeated® Afteò  thå  lasô  datá bytå iî thå sectoò ió writteî  ontï  thå disk¬ á two-bytå CRà ió computeä internallù withiî thå FDC¬ whicè ió theî alsï writteî ontï thå disk. Š Oî  completinç  á  writå cyclå (completeä writå  operatioî  tï eitheò á singlå sectoò oò multiplå sectoró withiî á track)¬  thå FDà generateó  aî interrupô requesô oî  thå  INTRÑ  output®  Thå interrupô requesôãž performó á duaì function® Iô informó thå IOÐ tï terminatå  thå DMÁ transfeò routinå anä alsï indicateó tï thå CPÕ thå enä oæ thå commanä cyclå (viá thå Interrupô Controller)®  Thå CPÕ  theî  caî  checë á statuó registeò withiî  thå  FDà tï  seå whetheò  anù erroró occurreä durinç thå writå operation®  Readinç thå  Statuó  Registeò  oò  writinç á  ne÷  commanä  tï  thå  FDC¬ automaticallù resetó thå INTRÑ output® Disk Read Disë  reaä  operationó arå initiateä bù thå CPÕ issuinç á  reãžaä commanä  bytå tï thå FDà oveò thå peripheraló datá bus®  Thå  FDà theî  searcheó thå disë foò thå sourcå oæ thå datá (correcô side¬ tracë anä sector¬  witè correcô IÄ CRà bytes)®  Wheî thå requireä locatioî  ió found¬  thå FDà beginó thå procesó oæ readinç  datá froí thå disk® Thå MFÍ encodeä datá ió decoded¬  assembleä intï paralleì datá bytes¬ anä transferreä intï thå Datá Register® Everù  timå  á paralleì datá bytå ió transferreä intï  thå  Datá Register¬  thå  FDà signifieóãž  tï thå IOÐ thaô á  datá  bytå  ió availablå bù issuinç á DMÁ request¬ viá thå DRÑ output. Everù  timå  thå  IOÐ readó thå assembleä datá  byte¬  thå  FDà resetó thå DRÑ output®  Thió procesó continueó untiì thå wholå oæ thå reaä operatioî ió completeä  (readinç thå datá froí eitheò á singlå sectoò oò  froí multiplå  sectoró  withiî  á track)®  Thå FDà theî  generateó  aî interrupô requesô oî thå INTRÑ output¬  whicè informó thå IOР tï terminatå thå DMÁ transfeò routinå anä alsï indiãžcateó tï thå CPU¬ thå  enä  oæ thå commanä cycle®  Anù erroró produceä  durinç  thå transfeò  caî theî bå checkeä bù thå CPÕ analysinç thå FDà statuó register. Disk Formatting Disë  formattinç ió á similaò procesó tï disë writå  operationó buô   involveó  transferrinç  botè  datá  anä   gað   informatioî (unintelligenô  informatioî useä tï separatå areaó oæ datá oî thå disk¬ seå Figurå 2© ontï thå disk¬ anä ió executeä oî á track-by- tracë basis®  Thå procesó ió initiateä bù thå CPÕ iãžssuinç á Writå Tracë commanä tï thå FDC¬  viá thå peripheraló datá bus®  Thå FDà respondó  bù  signifyinç tï thå IOÐ thaô á bytå  ió  requireä  bù issuinç á DMÁ request¬ viá thå DRÑ output. Thå  IOР theî  writeó  thå firsô gað  bytå  intï  thå  holdinç registeò  (Datá Register© withiî thå FDC®  Thå FDà resetó thå DRÑ outpuô  anä  theî waitó foò thå Indeø Pulså (thå markeò  foò  thå start of á track© tï bå detecteä®  Š Oî detectinç thå Indeø Pulse¬ thå FDà transferó thå bytå withiî thåãž   Datá Registeò tï aî encodinç circuiô anä issueó anotheò  DMÁ requesô tï thå IOP®  Thå IOÐ respondó bù writinç thå nexô bytå tï thå  Datá  Registeò  anä thå procesó ió  repeated®  Thå  encodinç circuiô convertó thå bytå intï MFÍ datá anä writeó thå datá  ontï thå disk. Thió  procesó  continueó untiì thå FDà detectó thå  nexô  Indeø Pulse¬  whicè causeó thå FDà tï generatå aî interrupô requesô  oî thå  INTRÑ  output®  Thå  interrupô requesô agaiî  haó  thå  samå functionó  aó describeä beãžfore; i.e® informó thå IOÐ tï terminatå thå  DMÁ transfeò routinå anä alsï interruptó thå  CPU¬  viá  thå Interrupô  Controller®  Resettinç thå INTRÑ outpuô ió achieveä bù readinç thå Statuó Registeò oò issuinç á commanä tï thå FDC® Read/Write Head Positioning Prioò tï performinç anù oæ thå disë transfeò routineó describeä above¬ thå read/writå heaä haó tï bå positioneä oveò thå requireä tracë  oî  thå  selecteä disë anä thå heaä  loaä  controì  signaì issueä  tï  engagå  thå read/wriãžtå  head®  Thå  heaä  positioninç operatioî ió achieveä undeò softwarå controì bù issuinç á commanä bytå tï thå FDC® Thå  FDà respondó tï fivå differenô heaä  positioninç  commanä bytes»  eacè  moveó  thå  heaä  tï á positioî  specifieä  bù  thå command®  Thå fivå commandó arå Restore¬  Seek¬ Step¬ Step-iî anä Step-out®  Thå  functioî oæ eacè commanä ió detaileä iî thå tablå below. Head Positioning Commands Command Function Resãžtore Positions the head over Track 0 on the Disk. Seeë Positionó thå heaä tï thå tracë numbeò  specifieä iî thå Datá Register. Steð  Moveó thå heaä tï aî adjacenô tracë iî thå samå directioî   aó  thå  previouó  heaä   positioninç command. Step-iî  Moveó  thå  heaä tï thå  adjacenô  tracë  iî  thå directioî awaù froí Tracë 0® Step-ouô  Moveó  thå  heaä tï thå adjacenô  traãžcë  iî  thå direction towards Track 0. Š Oî completioî oæ á heaä positioninç command¬  thå FDà generateó aî  interrupô requesô oî thå INTRÑ outpuô tï indicate tï thå  CPÕ thå  enä  oæ thå commanä cycle®  Readinç thå Statuó  Registeò  oò writinç á ne÷ commanä tï thå FDà resetó thå INTRÑ output. Aî  optionaì  featurå  oæ  eacè oæ  thå  fivå  commandó  ió  tï automaticallù verifù thå tracë positioî oæ thå head¬ bù comparinç thå  tracë  numbeò  storeä  withiî aî  inteãžrnaì  registeò  (Tracë Register© witè thå tracë numbeò containeä iî thå IÄ fieldó oî thå disk®  Thå  verificatioî operatioî alsï checkó thå IÄ  fielä  foò erroró  utilisinç thå IÄ fielä CRà bytes®  Failurå tï detecô  thå samå  tracë numbeò oò incorrecô CRà detection¬  setó erroò statuó bitó  withiî  thå Statuó Register®  Sincå thió  featurå  involveó readinç thå disë IÄ field¬ thå heaä haó tï bå loadeä prioò tï thå command® Thå signaló supplieä bù thå FDà tï thå disë drive¬  tï positioî ãž thå read/writå heaä arå thå STEP anä DIRC (direction© outputs®  Á steð  pulså witè á duratioî oæ ² uó ió issueä tï thå drivå  everù timå  thå FDà wantó tï movå thå heaä bù onå tracë  location®  Thå FDà determineó thå directioî oæ movemenô implieä bù thå  commanä anä  setó thå statå oæ thå directioî outpuô  accordingly®  (Logiã higè  tï movå thå heaä awaù froí Tracë 0¬  logiã lo÷ tï movå  thå heaä towardó Tracë 0)® FDC DETAIL General Thå  FDà caî bå divideä froí á descãžriptivå poinô oæ vie÷  intï threå  areaó oæ circuitry¬  á processoò interface¬  á disë  drivå controller¬ anä á serieó oæ registers. Thå processoò interfacå handleó thå transfeò oæ data¬  commandó anä  status¬  betweeî  thå  internaì  registeró  anä  thå  systeí processors¬  anä  alsï  generateó thå interrupô anä  DMÁ  requesô signals. Thå  disë  drivå controlleò respondó tï commandó froí thå  CPU¬ providinç thå  neccessarù circuitrù, anä inpuô anä  outpuô  lineó for: (a©ãž Controllinç thå positioninç oæ thå drivå  read/writå head. (b© Transferrinç datá tï anä froí thå disks.   (c) Monitoring thå disë drivå status. Thå   internaì  registeró  providå  thå  meanó  oæ   exchanginç informatioî (commands¬  status¬ positionaì data© betweeî thå disë drive controlleò anä thå processoò interface® Processor Interface Thå  connectionó tï thå processoò interfacå arå detaileä iî thå tablå  "Systeí  Connections¢  aô thå enä  oæ  thå  chapãž ter®  Thå Šmajoritù oæ thå circuitrù ió á straightforwarä interfacå  betweeî thå  8-biô  bi-directionaì peripheraìs datá buó anä thå serieó oæ addressablå registeró located withiî thå FDC. Thå  systeí  softwarå  viewó  thå  registeró  aó  á  serieó  oæ peripheraì  portó locateä iî thå systeí input/outpuô  space®  Thå porô  addresó  locationó  aó defineä bù thå FDà selecô  anä  thå systeí  addresó buó connections¬  arå detaileä below®  Thå  Data¬ Sectoò anä Tracë Registeró caî bå writteî tãžï anä reaä  from®  Thå Commanä Registeò caî onlù bå writteî to¬  anä thå Statuó Registeò caî onlù bå reaä from® Register Address Command 40H Status 40H Track 42H Sector 44H Data 46H Thå  remaininç circuitrù oæ thå processoò interfacå consistó oæ thå controì section¬ whicè produceó thå INTRÑ anä DRÑ outpãžuts® Thå  DRÑ outpuô ió activateä (seô tï logiã high)¬  durinç  datá transfeò operationó tï anä froí thå disk¬  anä followó thå  statå oæ  aî associateä controì biô withiî thå Statuó Register®  Durinç disë reaä operations¬  thå DRÑ outpuô ió seô activå wheî thå  FDà haó  datá availablå froí thå disë withiî thå Datá Register®  Thå outpuô  ió reseô tï thå inactivå statå wheî thå bytå ió  reaä  bù thå IOP® Durinç datá writå anä formattinç operations¬  thå DRÑ outpuô ió seô  active  wãžheî  thå  FDà Datá Registeò ió emptù, anä  thå  FDà requireó  anotheò bytå froí the IOP® Thå outpuô ió reseô wheî thå Datá Registeò ió loadeä witè á ne÷ byte® Thå  INTRÑ  outpuô  ió  activateä (seô tï logiã  high©  oî  thå successfuì  completioî  oæ  disë  read¬   write¬   oò  formattinç operations»  anä  automaticallù reseô followinç theså operations¬ oî  readinç thå Statuó Registeò oò issuinç á ne÷ commanä  tï  thå Commanä Register®  Thå  INTRÑ outpuô ió alsï seô tï logiã high¬  fãžoò á varietù  oæ otheò  conditionó  (prematurå  terminatioî  oæ  á  disë  transfeò commanä  sequencå  duå  tï aî erroò condition¬  completioî  oæ  á read/writå heaä positioî command¬ etc.)® Iî alì cases¬ INTRÑ caî bå  reseô  bù  eitheò readinç thå Statuó Registeò  oò  issuinç  á commanä  tï  thå  Commanä Register®  Theså otheò  conditionó  arå detaileä iî thå followinç paragraphs. Thå  firsô  operatioî performeä bù thå FDà oî receivinç á  disë reaä oò disë writå commanä ió tï checë whethãžeò thå disë ió  readù foò  á  transfeò operatioî bù analysinç thå READY inpuô froí  thå Šdisë  drive®  Iæ  thå inpuô ió seô tï  logiã  high¬  thå  commanä sequencå  ió initiated®  Iæ thå inpuô ió seô tï  logiã  low¬  thå commanä  sequencå ió immediatelù aborted¬  thå Noô Readù biô  seô withiî thå Statuó Register¬ anä thå INTRÑ outpuô activated. Thå  FDà alsï analyseó thå Writå Protecô inpuô (WPRT© froí  thå disë  drivå oî receivinç á disë writå oò formattinç  command®  Iæ thå WPRÔ inpuô ióãž activateä (logiã low¬  indicatinç thaô thå disë ió writå protected)¬  thå writå operatioî ió terminated¬ INTRÑ ió activateä  anä  thå  Writå Protecô biô  seô  withiî  thå  Statuó Register. Prioò tï writinç datá tï oò readinç datá froí thå disk¬ thå FDà locateó  thå  correcô  sectoò  foò  thå  transfeò  operation¬  bù analysinç  thå  IÄ fieldó oî thå disk®  Failurå tï detecô  aî  IÄ fielä witè thå correcô tracë number¬ correcô sidå number¬ correcô sectoò  numbeò  anä  correcô CRà withiî ãžfivå revolutionó  oæ  thå Disk¬ setó thå Recorä Noô Founä (RNF© biô iî thå Statuó Registeò, activateó thå INTRÑ outpuô anä terminateó thå transfeò operation. Aô  thå starô oæ disë writå anä formattinç operations¬  thå FDà signifieó tï thå IOÐ thaô thå firsô bytå ió required¬ viá thå DRÑ output®  Iæ durinç formatting¬ thå IOÐ failó tï supplù thå firsô bytå beforå thå FDà detectó thå Indeø Pulse¬  thå Losô Datá  (LD© biô ió seô withiî thå Statuó Register¬ INTRÑ ió activateä anä thå formatãžtinç  operatioî ió terminated®  Iæ durinç disë writes¬  thå IOР failó tï supplù thå firsô bytå beforå thå starô oæ thå  datá field¬  thå samå procesó occurs»  thå Losô Datá biô ió set¬ INTRÑ ió activateä anä thå operatioî ió terminated® Durinç  disë reaä operations¬  thå FDà checkó thå two-bytå  CRà codå  aô thå enä oæ thå sectoò datá fielä tï ensurå thå  validitù oæ thå data®  Iæ á CRà erroò ió present¬ thå CRà erroò biô iî thå Statuó Registeò ió set¬ INTRÑ ió activateä anä thå reaä oãž peratioî is terminated (even if the operation is a multiple sector read). Iî additioî tï thå transfeò commands¬  thå INTRÑ outpuô ió alsï activateä aô thå enä oæ thå commanä sequencå foò positioninç  thå read/writå  heaä oæ thå drives®  Thå succesó oæ thå operatioî  ió again signified by the status bits within the Status Register. Thå  firsô  operatioî  performeä bù thå FDà oî  receivinç  thå Restorå  commanä ió á checë oæ thå Tracë ° inpuô (TR00)®  Iæ  thå TR0°  inpuô  ió  seô lo÷ (ãžindicatinç thaô  thå  heaä  ió  alreadù positioneä oveò thå firsô track)¬ anä thå verificatioî optioî ió noô  selected¬  thå  FDà clearó thå Tracë Registeò tï  zerï  anä activateó thå INTRÑ output® Iæ thå TR0° inpuô ió high¬ thå FDà issueó steð pulseó untiì thå TR0°  inpuô  ió seô low¬  whicè theî produceó thå samå effecô  aó describeä  above¬   providinç  thå  verificatioî  optioî  ió  noô selecteä (i.e®  INTRÑ activated¬  Tracë Registeò cleared)® Iæ thå TR0° inpuô ió noô seô lo÷ withiãžî 25µ steð pulses¬  thå  operatioî ió aborted¬  INTRÑ ió activated¬ anä thå Seeë Erroò biô witè thå Statuó Registeò ió set. Š Iæ  thå  verificatioî optioî ió selecteä witè anù oæ  thå  heaä positioninç  commands¬  thå  FDà moveó thå heaä tï thå  specifieä positioî  anä  theî readó thå firsô encountereä IÄ fielä  oî  thå disk®  Thå  tracë numbeò froí thå IÄ fielä ió compareä  witè  thå tracë  numbeò  storeä iî thå Tracë Register®  Providinç  thå  twï numberó arå identicaì anä thå IÄ fielä CRÃãž byteó arå correct¬ thå tracë positioî ió deemeä true¬ anä thå INTRÑ outpuô ió activated® Iæ thå tracë numberó match¬  buô thå CRà ió incorrect¬  thå CRà erroò  biô  withiî  thå  Statuó  Registeò ió  seô  anä  thå  nexô encountereä IÄ fielä ió analysed®  Iæ thå FDà failó tï detecô  aî IÄ  fielä  witè á matchinç tracë numbeò anä correcô CRà withiî  µ revolutionó  oæ  thå disk¬  thå operatioî ió  aborted¬  INTRÑ  ió activated¬  anä thå Seeë Erroò biô withiî thå Statuó Registeò  ió set® ãž Thå  FDà caî bå alsï issueä witè á commanä (Forcå  Interrupt)¬ whicè  setó thå Statuó Registeò tï monitoò thå statå oæ thå inpuô statuó  lineó froí thå drive¬  anä causeó thå INTRÑ outpuô tï  bå activateä foò anù oæ thå conditionó detaileä below: (a) Immediatelù thå commanä ió received. (b) Every time an Index Pulse is detected. (c) On detecting a transition on the Ready input. Disk Drive Control Thå  disë  drivå  controlleò circuitrù actó  aó  thå  inãžterfacå betweeî  thå disë driveó anä thå otheò areaó oæ circuitrù  withiî thå  FDà anä  consistó oæ thå disë datá  encodinç  anä  decodinç sections¬  thå  heaä  positioninç  controì sectioî anä  á  statuó monitoring section. Connectionó  tï  anä froí thå FDà disë controlleò circuitrù  arå detaileä iî thå tablå "Disë Drivå Connections¢ aô thå enä oæ  thå chapter® Aô  thå starô oæ á datá transfeò operatioî tï thå  disë  (writå operation)¬ thå Writå Gatå outpuô ió activateãžä anä thå IOÐ beginó thå  procesó  oæ transferrinç datá byteó tï thå Datá Registeò  iî paralleì format¬ undeò DMÁ control® Thå FDC transferó eacè bytå froí  thå  Datá Registeò tï thå encodinç  circuit®  Thå  encodinç circuiô convertó thå byteó intï MFÍ doublå densitù encodeä data¬ whicè ió theî supplieä tï thå disë viá thå Writå Datá output. Wheî writinç tï trackó witè á tracë numbeò greateò thaî 43¬ thå encodinç  circuiô provideó automatiã writå precompensation®  Thå precompensatioî ãžvaluå ió seô bù á potentiometeò (WPW)¬ locateä oî thå Systeí Board. Thå  decodinç sectioî oæ thå disë controlleò circuitrù  decodeó thå  MFÍ  encodeä datá froí thå Ra÷ Reaä input¬  durinç  transfeò operationó froí thå disk® Thå decodeò ió á phase-lockeä looð datá separatoò  circuiô  baseä arounä aî internaì  voltagå  controlleä oscillatoò  (VCO© anä phaså detector® Thå centrå frequencù oæ thå ŠVCÏ ió seô bù á variablå capacitoò (VC1)¬  locateä oî thå  Systeí Board®  Á  seconä variablå contãžroì RP× setó thå reaä windo÷ pulså width. Thå  heaä  positioninç  controì sectioî respondó  tï  thå  heaä positioninç  commandó  supplieä  tï  thå  Commanä  Registeò   anä controló thå STEÐ anä Directioî (DIRC© outputs® Thå ratå aô whicè thå  ² uó steð pulseó arå issueä tï thå drive¬  tï movå thå  heaä froí  track-to-tracë ió specifieä bù thå command®  Issuinç á steð pulså   tï  thå  drivå  tï  movå  thå  heaä  towardó   Tracë   0¬ automaticallù decrementó thå Tracë Register® Issuinç á ãž steð pulså tï  thå drivå tï movå thå heaä awaù froí Tracë  0¬  automaticallù incrementó thå Tracë Register. Thå  statuó monitorinç sectioî monitoró thå logiã statå oî  thå fouò inputó froí thå disë drive¬ READY¬ TR00¬ Indeø Pulså (IP)anä Writå  Protecô  (WPRT)®  Alì thå fouò inputó caî bå monitoreä  bù issuinç  anù  oæ  thå  heaä positioninç  commandó  oò  thå  Forcå Interrupô command¬  anä theî examininç thå contentó oæ thå Statuó Register®  Thå  effecô oæ thå statuó inputó oî thå operatãžioî  oæ thå  FDà ió  dependenô  oî thå commanä  issueä  tï  thå  Commanä Register and the logic state of the input line. Command Register Thå 8-biô Commanä Registeò holdó thå commanä supplieä froí  thå CPÕ  whicè  determineó thå typå oæ operatioî carrieä ouô  bù  thå FDC¬ anä ió locateä aô addresó locatioî 40È iî thå I/Ï space® Thå registeò  caî  onlù bå writteî tï witè onå oæ  eleveî  predefineä commanä words® Á commanä currentlù iî progresó ió indicateä bù aî associateä controì ãžbiô withiî thå Statuó Register. Thå  eleveî  commandó  caî  bå  divideä  intï  fouò   differenô categorieó  aó  detaileä below®  Á detaileä descriptioî  oæ  eacè command is provided in the PROGRAMMING CONSIDERATIONS section. Type 1® Read/writå heaä positioninç commandsº  Restore¬ Seek¬ Step¬ Step-in¬ Step-out® Type 2. Data transfer commands: Read Sector, Write Sector. Typå 3®  Formaô  codå transfeò commandsº  Reaä  Address¬  Reaä Track¬ Writãžå Track. Type 4. Interrupt command: Force Interrupt. Status Register Thå  8-biô Statuó Registeò holdó statuó information¬  whicè  ió dependenô  oî  thå commanä operatioî performeä bù  thå  FDC®  Thå registeò ió locateä aô addresó 40È iî thå systeí I/Ï  space¬  anä caî  onlù  bå  reaä from®  Somå oæ thå bitó withiî  thå  registeò signifù  thå  statå  oæ thå controì inputó froí thå  disë  drive¬ whilsô otheró indicatå thå statuó oæ thå commanä operation® ŠTrack Register Thåãž  8-biô  Tracë Registeò indicateó thå tracë  numbeò  oæ  thå positioî  oæ thå drivå read/writå heaä anä ió locateä aô  addresó locatioî 42È iî thå systeí I/Ï space® Thå registeò caî bå writteî tï anä reaä from®  Thå FDà updateó thå tracë registeò durinç heaä positioninç  commanä operations¬  everù timå thå drivå  heaä  ió moveä tï aî adjacenô track® Sector Register Thå  8-biô  Sectoò Registeò ió useä tï storå á  sectoò  number¬ whicè indicateó tï thå FDà thå desireä locatioî oî thå dãžisë foò á transfeò operation®  Thå registeò ió locateä aô addresó  locatioî 44È  iî thå systeí input/outpuô spacå anä caî bå writteî  tï  anä reaä from® Durinç multiplå sectoò transfeò operations¬ thå sectoò registeò ió updateä bù thå FDC. Data Register Thå 8-biô Datá Registeò ió thå holdinç registeò durinç transfeò operationó  tï  anä  froí thå disk¬  anä ió  locateä  aô  addresó locatioî  46È  iî  thå systeí input/outpuô  space®  Thå  registeò performó á differenô functioî durinç ãžthå Seeë Command¬  wheî  thå register is programmed with the desired track location. PROGRAMMING CONSIDERATIONS Disk Drive Selection Selectinç  á  disë drivå foò operatioî ió achieveä  bù  writinç datá  tï thå Paralleì Interface®  Thå addresó locatioî  anä  datá requireä tï selecô á specifiã drivå ió detaileä iî thå sectioî oî thå Paralleì Interface® Disë  driveó arå specifieä aó Drivå ° oò Drivå ±  accordinç  tï thå  positioî  oæ á switcè locateä aô thå reaò oæ eacè  drive®  ãžÁ logiã  lo÷  oî thå Drivå Selecô ° controì linå selectó  thå  disë drivå configureä aó Drivå 0¬  anä á logiã lo÷ oî thå Drivå Selecô ± controì linå selectó thå disë drivå configureä aó Drivå 1®  Thå decodinç  circuitrù oæ thå interfacå ió employeä tï  ensurå  thaô botè  driveó  arå  noô  selecteä  simultaneouslù  undeò  softwarå control¬ bù onlù allowinç onå oæ thå drivå selecô lineó tï bå seô to the active logic low state aô anù onå time® Sincå  thå Tracë Registeò containó á recorä oæ ãžthå positioî  oæ thå heaä oæ thå drivå selected¬ changinç operatioî froí onå drivå tï  thå  seconä drivå iî duaì drivå systems¬  requireó thå  Tracë Registeò tï bå updateä accordingly. Heaä Loadinç Loadinç  thå  read/writå  heaä oæ thå selecteä  disë  drivå  ió achieveä bù writinç datá tï thå Paralleì Interface®  Thå  addresó locatioî  anä datá requireä tï loaä thå heaä are detaileä iî  thå Šsection on the Parallel Interface. Thå  timå takeî foò thå standarä disë drivå (thå versioãž î  usinç 7° tracë single-sideä disks)¬ tï engagå thå read/writå heaä afteò thå heaä loaä signaì ió seô active¬  ió oæ thå ordeò oæ 6° ms®  Á 60mó  delaù shoulä therefore bå implementeä afteò thå  heaä  loaä signaì  ió  seô  active¬  tï ensurå thå heaä  ió  engageä  beforå performinç disë datá transfeò operations®  Alì commanä operationó caî  bå  performeä witè thå heaä loadeä withouô  anù  detrimentaì effect to the disk. Heaä Positioninç Positioninç  thå read/writå heaä oæ thå selãžecteä disë drivå  ió achieveä  bù  issuinç  onå oæ thå fivå Typå  ±  commandó  tï  thå Commanä Registeò oæ thå FDC® Terminatioî oæ á commanä (successfuì oò  otherwise©  ió  signifieä  bù aî  interrupô  requesô  tï  thå Interrupô  Controlleò  (PIC)®  Thå  formaô oæ eacè  oæ  thå  heaä positioninç commandó ió detaileä below. Type 1 Commands D7 D0 Command 0 0 0 0 1 V r1 r0 Restore 0ãž 0 0 1 1 V r1 r0 Seek 0 0 1 T 1 V r1 r0 Step 0 1 0 T 1 V r1 r0 Step-in 0 1 1 T 1 V r1 r0 Step-out T = Track Update Flag V = Verify Flag r1,r0 = Stepping motor rate Eacè  oæ  thå commandó contaiî á Verifù Flaç biô  anä  steppinç motoò ratå bits®  Thå steppinç ratå bitó ãžhavå tï bå seô accordinç tï  thå  track-to-tracë  accesó  timå  oæ  thå  disë  drive®  Thå combinatioî oæ bitó allo÷ fouò differenô steppinç motoò rateó  tï bå selecteä aó detaileä below®  Thå track-to-tracë accesó timå oæ thå standarä disë driveó ió 1µ ms. r1 r0 Rate 0 0 3 ms 0 1 6 ms 1 0 10 ms 1 1 15 ms Š Thå  Verifù  Flaç biãžô determineó whetheò thå FDà verifieó  thå tracë positioî afteò positioninç thå head¬  bù readinç thå sectoò IÄ fieldó oî thå disk® Verificatioî ió performed¬ wheî thå Verifù Flaç biô ió seô tï logiã high¬ anä requireó thå heaä tï bå loadeä prior to the command. Thå  verificatioî  operatioî  checkó thå tracë  numbeò  iî  thå sectoò IÄ fielä witè thå numbeò containeä iî thå Tracë Register¬ anä alsï checkó thå IÄ fielä CRà character® Failurå tï matcè thå tracë numbeò oò failurå tï finäãž á matchinç tracë  witè  á valiä CRC¬  withiî fivå revolutionó oæ  thå  disk¬ causeó  thå Seeë Erroò biô tï bå seô iî thå Statuó  Register®  Iæ thå  verificatioî operatioî detectó á CRà erroò withiî anù oæ thå IÄ  fieldó checked¬  thå CRà erroò biô ió seô withiî  thå  Statuó Register® Thå Steð commandó contaiî á Tracë Updatå Flag¬ whicè determineó whetheò  thå Tracë Registeò ió updateä everù timå thå heaä  moveó tï aî adjacenô track®  Thå Tracë Registeò ió updateä iæ thå Tracë Update Fãžlag is set to logic high. Restorå Command.„ Thå Restorå commanä ió useä tï positioî thå heaä oveò  Tracë  °  oæ thå disk®  Thå FDà wilì issuå uð tï  25µ  steð pulseó  aô thå ratå specifieä bù thå steppinç ratå bits¬  iî  aî attempô tï locatå thå firsô tracë oî thå disk®  Failurå tï locatå Tracë  ° (bù monitorinç thå statå oæ thå TR0° input©  withiî  25µ steð pulses¬  causeó thå commanä tï terminate¬ anä thå Seeë Erroò biô tï bå seô withiî thå Statuó Register®  Iæ thå Verifù Flaç biô ióãž  set¬  verificatioî  oæ thå tracë positioî ió carrieä  ouô  aó detaileä above® Seeë Command.„  Prioò  tï  issuinç thå  Seeë  command¬  thå  Datá Registeò  haó tï bå loadeä witè thå desireä tracë numbeò anä  thå Tracë Registeò ió presumeä tï contaiî thå currenô positioî oæ thå head®  Oî receivinç thå command¬  thå FDà setó thå Dirã outpuô tï movå thå heaä iî thå directioî oæ thå desireä track®  Steð pulseó arå theî issueä aô thå ratå specifieä bù thå steppinç ratå bits¬ anä thå Tracë ãžRegisteò updateä oî eacè pulse¬ untiì thå numbeò iî thå  Tracë  Registeò  coincideó  witè  thå  numbeò  iî  thå  Datá Register®  Iæ thå Verifù Flaç ió set¬  verificatioî oæ thå  tracë positioî ió carrieä out® Steð Command.„ Issuinç á Steð commanä moveó thå heaä onå tracë locatioî iî thå directioî specifieä bù thå previouó  command®  Iæ thå  Tracë  Updatå  Flaç ió set¬  thå Tracë Registeò  ió  updateä followinç thå issuå oæ thå Steð pulse® Iæ thå Verifù Flaç ió set¬ verificatioî oæ thåãž  tracë positioî ió carrieä out¬  afteò á delaù determineä bù thå steppinç ratå bitó (i.e®  Á delaù oæ 1µ ms® foò thå standarä disë drives). Step-iî Command.„ Issuinç thå Step-iî commanä moveó thå heaä  onå tracë  locatioî  awaù froí Tracë 0®  Iæ thå Tracë Updatå Flaç  ió set¬ thå Tracë Registeò ió incrementeä followinç thå issuå oæ thå Steð pulse®  Iæ thå Verifù Flaç ió set¬ verificatioî oæ thå tracë Špositioî ió carrieä out¬ afteò á delaù determineä bù thå steppinç ratå bits® Step-ãž out® Issuinç  thå Step-ouô commanä moveó thå heaä onå tracë locatioî towardó Tracë 0®  Iæ thå Tracë Updatå Flaç ió  set¬  thå Tracë  Registeò  ió decrementeä followinç thå issuå oæ  thå  Steð pulse®  Thå Verifù Flaç functionó iî thå samå manneò aó describeä abovå foò thå Steð anä Step-in commands. Statuó Register.„ Thå formaô oæ thå Statuó Registeò followinç  á heaä  positioninç  commanä  ió aó detaileä below®  Oî  issuinç  á commanä  tï  thå  Commanä Register¬  thå FDà resetó  thå  Staãž tuó Registeò tï monitoò certaiî statuó conditionó implieä bù thå  ne÷ command®  Duå tï internaì timinç delays¬ thå Statuó Registeò doeó noô  contaiî valiä statuó information¬  untiì 1´ uó afteò thå ne÷ commanä ió issued® S7 S6 1 S4 S3 S2 S1 S0 Status Register Busy Index Track 0 ãž CRC Error Seek Error Protected Not Ready Busù  Á logiã higè oî Busù indicateó thaô thå commanä ió iî progress»  logiã lo÷ indicateó thaô thå commanä sequencå is complete. Indeø  Inverteä copù oæ thå Indeø Pulså inpuô  froí  thå disãž k drive. Logic low when the pulse occurs. Tracë  °  Inverteä copù oæ thå TR0° inpuô froí  thå  drive® Logiã high indicateó thaô thå heaä  ió  positioneä over Track 0. CRàErroò   Logiã higè indicateó á CRà erroò  waó  detecteä withiî  á sectoò IÄ fielä durinç  verificatioî  oæ thå track. Š Seeë Erroò  Logiã higè indicateó á matchinç tracë numbeò  waãž ó noô  locateä withiî á sectoò IÄ fielä  durinç  thå verificatioî operation®  Thå biô ió alsï seô  higè iæ  thå  FDà failó  tï  detecô  á  logiã  lo÷  oî the TR00 input following a Restore command. Protecteä   Inverteä copù oæ thå WPRÔ inpuô froí  thå  drive® Logiã higè indicateó thaô thå selecteä disë  drivå contains a write protected disk. Noô Readù Inverteä copù oæ tãž hå READÙ inpuô froí  thå  drive® Logiã higè  indicateó thaô thå drivå ió noô  readù for a data transfer operation. Data Transfers Transfeò  oæ datá tï anä froí thå disë ió controlleä bù thå twï Typå ² commands¬  Writå Sectoò anä Reaä Sector®  Prioò tï issuinç thå commanä tï thå Commanä Register¬  thå Sectoò Registeò musô bå loadeä  witè  thå  desireä  sectoò  number¬   tï  determinå   thå source/destinatioî  oæ  thå ãž data®  Terminatioî  oæ  thå  commanä (successfuì oò otherwise© ió signifieä bù aî interrupô requesô tï thå PIC®  Botè commanä operationó arå prematurelù terminated¬  iæ thå  disë  drivå  ió noô readù foò  thå  transfeò  operation¬  aó indicateä bù thå READÙ input® Thå formaô oæ thå datá transfeò commandó ió detaileä below. Type 2 Commands D7 D0 Command 1 0 0 m 1 1 U 0 Read ãž Sector 1 0 1 m 1 1 U 0 Write Sector m = Multiple Record Flag U = Update SSO Botè commandó contaiî á Multiplå Recorä Flaç biô anä aî  Updatå SSÏ  bit®  Thå Updatå SSÏ biô ió useä tï selecô thå disë sidå foò thå  datá transfeò operationó anä affectó thå logiã statå oæ  thå Sidå Selecô Outpuô (SSO)¬  supplieä tï thå disë drive®  Wheî Õ ió seô tï logiã low¬  thå SSÏ ióãž updateä tï logiã lo÷ (sidå 0)® Wheî Õ ió seô tï logiã high¬ SSÏ ió updateä tï logiã higè (sidå 1). Š Thå Multiplå Recorä Flaç biô selectó whetheò datá transferó arå from/tï  á  singlå  sectoò oò multiplå sectoró  withiî  á  track® Singlå  sectoò transferó arå initiateä wheî thå í Flaç ió seô  tï logiã  low¬  multiplå sectoò transferó wheî thå í Flaç ió seô  tï logiã high. Writå Sector®  Oî receipô oæ thå Writå Sectoò cãž ommand¬  thå  FDà beginó thå procesó oæ searchinç thå sectoò IÄ fieldó oæ thå tracë foò  thå  desireä destinatioî foò thå data®  Wheî aî IÄ fielä  ió founä  witè thå correcô tracë numbeò (aó specifieä bù  thå  Tracë Register)¬  thå correcô sidå numbeò (aó specifieä bù thå Õ biô iî thå  command)¬  thå  correcô sectoò numbeò (aó specifieä  bù  thå Sectoò Register)¬  anä correcô CRà character» thå FDà generateó á DMÁ  requesô viá thå DRÑ output¬  tï inforí thå IOÐ tï writå  thå first datá bytå ãž into the Data Register. Iæ aî IÄ fielä ió noô founä containinç thå correcô  informatioî withiî  fivå revolutionó oæ thå disk¬  thå commanä ió aborteä anä thå Recorä Noô Founä biô iî thå Statuó Registeò seô. Iæ anù oæ thå IÄ fieldó encountered¬  contaiî aî incorrecô  CRà character¬ thió ió alsï recordeä iî thå Statuó Register® Oî receipô oæ thå firsô datá byte¬  thå FDà activateó thå Writå Gatå outpuô anä oî detectinç thå starô oæ thå datá field¬  writeó thå  datá bytå tï thå diskãž ®  Thå procesó theî continueó witè  thå FDà generatinç  DMÁ  requestó everù timå á ne÷ bytå oæ  datá  ió required®  Afteò  thå 512tè datá bytå ió writteî tï thå  disk¬  á two-bytå  CRà characteò ió automaticallù generateä  anä  writteî ontï  thå  disk®  Iæ thå datá writteî tï thå sectoò onlù filló  á parô oæ thå datá field¬  thå remaininç areá shoulä bå  programmeä witè á serieó oæ zeroes¬ tï completå thå wholå datá field® Iæ  á singlå sectoò writå operatioî waó specifieä bù thå  Writåãž Sectoò command¬ thå Writå Gatå outpuô ió theî deactivateä anä thå commanä operatioî terminated. Iæ  thå  Writå  Sectoò  commanä  specifieä  á  multiplå  sectoò transfer¬  thå  Sectoò  Registeò ió incrementeä anä  thå  procesó repeated¬ startinç froí thå verificatioî operatioî oî thå nexô IÄ field®  Thå  multiplå  sectoò transfeò operatioî continueó  untiì terminateä eitheò bù issuinç á Forcå Interrupô command¬  oò afteò thå sectoò numbeò ió incrementeä tï á valuå exceedinç thå  numbeò ãž oæ   sectoró  oî  thå  track®   Iî  thå  latteò  case¬   thå  FDà automaticallù  terminateó thå commanä afteò fivå  revolutionó  oæ thå disk¬ sincå thå verificatioî oæ thå IÄ fielä wilì noô bå ablå tï locatå á matchinç sectoò number® Failurå  oæ  thå IOÐ tï writå thå firsô datá bytå tï  thå  Datá Registeò  beforå thå arrivaì oæ thå sectoò datá fielä causeó  thå FDà to¬  seô thå Losô Datá biô iî thå Statuó  Register¬  activatå thå  INTRÑ output¬  anä aborô thå command®  Failurå oæ thå Iãž OÐ tï supplù  á  datá  bytå tï thå Datá Registeò  oî  receivinç  á  DMÁ requesô afteò thå firsô byte (i.e® withiî 1¶ us)¬  causeó thå FDà tï  writå  á bytå oæ zeroeó ontï thå disë anä alsï seô  thå  Losô ŠDatá bit¬ buô doeó noô terminatå thå commanä sequence® Reaä Sector®  Oî  receipô oæ thå Reaä Sectoò  command¬  thå  FDà beginó thå procesó oæ searchinç thå sectoò IÄ fieldó oæ thå tracë foò  thå desireä sourcå oæ data®  Wheî aî IÄ fielä ió founä ãž witè thå  correcô  tracë numbeò (aó specifieä bù thå Tracë  Register)¬ thå  correcô  sidå  numbeò  (aó specifieä bù thå  Õ  biô  iî  thå command)¬  thå  correcô sectoò numbeò (aó specifieä bù thå Sectoò Register)¬  anä thå correcô CRà character» thå FDà readó thå datá byteó froí thå followinç datá field¬ anä informó thå IOP¬ viá thå DRÑ  output¬  everù  timå  á  datá bytå ió  storeä  iî  thå  Datá Register. Iæ  aî IÄ fielä ió noô founä containinç thå correcô informatioî withiî fivå revãž olutionó oæ thå disk¬  thå commanä ió aborteä  anä thå Recorä Noô Founä biô iî thå Statuó Registeò set® Iæ  anù oæ thå IÄ fieldó encountered¬  contaiî aî incorrecô CRà character¬ thió ió alsï recordeä iî thå Statuó Register. Failurå  oæ  thå IOÐ tï reaä thå contentó oæ thå Datá  Registeò beforå  iô  ió overwritteî witè thå nexô bytå oæ  datá  froí  thå disk¬  causeó  thå  FDà tï seô thå Losô Datá biô iî  thå  Statuó Register® Iæ  á  singlå sectoò reaä operatioî waó specifieä bù ãž thå  Reaä Sectoò command¬  thå sequencå terminateó witè thå FDà testinç thå CRà characteò aô thå enä oæ thå datá field®  Iæ thå CRà characteò ió  incorrect¬  thå  CRà Erroò  biô ió  seô  withiî  thå  Statuó Register. Iæ   thå  Reaä  sectoò  commanä  specifieä  á  multiplå  sectoò transfer¬  thå  Sectoò  Registeò ió incrementeä anä  thå  procesó repeateä foò thå nexô sector¬  providinç thå CRà characteò testeä aô  thå  enä  oæ thå previouó datá fielä waó  true®  Iæ  thå  CRà characteò ãž   waó  incorrect¬   thå  multiplå  sectoò  routinå   ió prematurelù aborted® Iæ nï  CRà Erroró arå detecteä, thå multiplå  sectoò  operatioî continueó  untiì  terminateä eitheò bù issuinç á Forcå  Interrupô command¬  oò  afteò thå sectoò numbeò ió incrementeä tï  á  valuå exceedinç thå numbeò oæ sectoró oî thå track® Iî thå latteò case¬ thå   FDà  automaticallù  terminateó  thå  commanä  afteò   fivå revolutionó oæ thå disk¬  sincå thå verificatioî oæ thå IÄ  fielä wilì noô bå ablå ãž tï locatå á matchinç sectoò number. Statuó Register®  Thå formaô oæ thå Statuó Registeò followinç  á datá transfeò commanä ió aó detaileä below®  Oî issuinç á commanä tï  thå Commanä Register¬  thå FDà resetó thå Statuó Registeò  tï monitoò certaiî statuó conditionó implieä bù thå ne÷ command® Duå tï internaì timinç delays¬  thå Statuó Registeò doeó noô  contaiî valiä  statuó information¬  untiì 1´ uó afteò thå ne÷ commanä  ió issued® ãž Š S7 S6 S5 S4 S3 S2 S1 S0 Status Register Busy DRQ Lost Data CRC Error RNF Logic 0 Protected Not Ready Busù  Á logiã higè oî Buãž sù indicateó thaô thå commanä ió iî progress»  logiã lo÷ indicateó thaô thå commanä sequencå is complete. DRÑ Á copù oæ thå DRÑ outpuô tï thå IOP®  Á logiã higè indicates  thaô thå FDà haó datá availablå durinç á reaä operation¬ anä requireó datá durinç á writå operation. Losô Datá Logiã higè indicateó thaô thå IOÐ diäãž noô responä tï thå DRÑ outpuô iî time¬ anä aó á resulô; valiä datá waó noô writteî ontï thå disë durinç á writå operation¬  valiä datá waó noô reaä froí thå  disë during a read operation. CRà Erroò Durinç thå writå operation¬ á logiã higè indicateó á CRà erroò waó detecteä withiî onå oò morå sectoò IÄ fields® Durinç thå reaä operationãž ¬ a logiã higè indicateó  á CRà erroò waó detecteä eitheò  withiî onå oò morå IÄ fields¬  oò á CRà erroò detecteä aô the end of a data field. RNÆ Recorä Noô Found®  Á logiã higè indicateó thaô thå transfeò  operatioî  waó  unablå tï locatå  aî  IÄ fielä  containinç  thå  correcô  side¬  tracë  anä sector number, with a valid CRC character. ãž Protecteä  Inverteä copù oæ thå WPRÔ inpuô  froí  thå  drive¬ durinç writå operations® Logiã higè indicateó thaô thå selecteä disë drivå containó á writå protecteä disk® During read operations set to logic low. Noô Readù Inverteä copù oæ thå READÙ inpuô froí  thå  drive® Logiã higè  indicateó thaô thå drivå ió noô  readù ãž for a data transfer operation. ŠFormatting Commands Thå  formattinç commandó arå thå threå Typå ³  commands¬  Writå Track¬  Reaä  Tracë anä Reaä Address®  Writå Tracë ió thå commanä foò  formattinç  disks®   Thå  twï  otheò  commandó  enablå   thå programmeò  tï checë thå disë format®  Terminatioî oæ thå commanä ió signifieä bù aî interrupô requesô tï thå Interrupô Controller® Thå  commanä operationó arå terminateä prematurely¬  iæ thå ãž disë drivå ió noô readù foò thå transfeò operatioî aó indicateä bù thå READY input. The format of these commands is detailed below. Type 3 Commands D7 D0 Command 1 1 0 0 0 1 U 0 Read Address 1 1 1 0 0 1 U 0 ãž Read Track 1 1 1 1 0 1 U 0 Write Track U = Update SSO Eacè oæ thå threå commandó contaiî aî Updatå SSÏ bit®  Thió biô ió useä tï selecô thå disë sidå foò thå formattinç operationó anä affectó thå logiã statå oæ thå Sidå Selecô Outpuô (SSO)¬ suppãž lieä tï thå disë drive®  Wheî Õ ió seô tï logiã low¬ SSÏ ió updateä tï logiã lo÷ (sidå 0)®  Wheî Õ ió seô tï logiã high¬  SSÏ ió updateä tï logiã higè (sidå 1)® Tracë Format®  Thå tracë formaô useä oî thå MicroFloppù diskó  ió illustrated at the end of the chapter. Reaä Address®  Oî receipô oæ thå Reaä Addresó command¬  thå  FDà searcheó thå disë foò aî IÄ field® Thå firsô IÄ fielä encountereä ió  theî reaä froãž í thå disk®  Thå FDà transferó thå siø IÄ  fielä byteó detaileä belo÷, froí thå disë tï thå Datá Register onå bytå á  time®  Everù timå á datá bytå ió storeä iî thå Datá  Register¬ thå  FDà generateó á DMÁ requesô tï thå IOP®  Thå IÄ fielä  tracë numbeò ió alsï transferreä tï thå Sectoò Register. Byte Description 1 Track Number 2 Side Number 3 Sector Number ãž 4 Sector Length (02H) 5 CRC 1 6 CRC 2 Š Iæ  thå FDà failó tï locatå aî IÄ fielä withiî fivå revolutionó oæ thå disk¬  thå commanä ió aborteä anä thå Recorä Noô Founä biô iî thå Statuó Registeò set® Iæ thå IÄ fielä containó aî incorrecô CRC character, this is also recorded in the Status Register. Failurå  oæ thå IOÐ tï reaä thå contentó oæ thå Datá  Register¬ beforå  thå  registeò ió overwritteî witè thå nexô bytå  oãž æ  datá froí  thå disk¬  causeó thå FDà tï seô thå Losô Datá biô  iî  thå Status Register. Reaä Track®  Thå  Reaä Tracë commanä allowó á completå tracë  oæ informatioî  (Gaps¬  Headeró anä Datá bytes© tï bå reaä froí  thå disk®  Oî receipô oæ thå Reaä Tracë command¬ thå FDà monitoró thå logiã  statå oî thå Indeø Pulså input®  Oî detectinç thå  leadinç edgå oæ thå pulse¬ thå FDà transferó alì thå Gap¬ Headeò anä Datãž á byteó  froí  thå tracë intï thå Datá Registeò oî á  byte-bù-bytå basis® Everù  timå á bytå ió transferreä intï thå Datá  Register¬  thå FDà informó thå IOÐ thaô á bytå ió available¬ viá thå DMÁ requesô line®  Thå  commanä  terminateó afteò onå fulì revolutioî oæ  thå disk¬  oî detectinç thå Indeø Pulså again®  Nï CRà erroò checkinç ió carrieä out. Everù timå thå FDà detectó thå IÄ fielä anä Datá fielä  addresó marks¬ iô synchroniseó thå internaì decodinç circuitry¬ tï ensurå thaãž ô  alì  informatioî followinç eacè sectoò IÄ addresó  marë  ió valid®  Sincå  the  FDà mighô  noô bå synchroniseä  tï  thå  gað informatioî  previouó  tï  thå IÄ addresó  marë, this informatioî ió noô guaranteeä tï bå valid® Failurå  oæ thå IOÐ tï reaä thå contentó oæ thå Datá  Register¬ beforå  thå  registeò ió overwritteî witè thå nexô bytå  oæ  datá froí  thå disk¬  causeó thå FDà tï seô thå Losô Datá biô  iî  thå Status Register. ãž Writå Track.„ Thå Writå Tracë ió thå commanä useä tï formaô thå trackó  oî thå disk®  Alì datá anä gað informatioî ió supplieä tï thå  disë bù buildinç á imagå oæ thå tracë iî memorù aó  detaileä oî  thå nexô page¬  anä transferrinç thå formaô datá tï thå  Datá Registeò undeò DMÁ control¬ usinç thå IOP® Oî receipô oæ thå Writå Tracë command¬  thå FDà generateó á DMÁ requesô viá thå DRÑ output¬  tï inforí thå IOÐ tï writå thå firsô bytå  froí thå trãž acë imagå intï thå Datá Register®  Oî  detectinç thå leadinç edgå oæ thå Indeø Pulse¬  thå FDà transferó thå firsô bytå  tï  thå disë anä requestó anotheò bytå froí  thå  IOP®  Thå procesó  theî continueó witè thå IOÐ supplyinç thå  formaô  byteó witè  thå  FDà generatinç DMÁ requestó everù timå á ne÷  bytå  ió required®   Thå   commanä  sequencå  terminateó  afteò  onå  fulì revolutioî oæ thå disk¬ oî detectinç thå leadinç edgå oæ thå nexô Index Pulse. .pa Š Track ãž Image Number Byte Description of bytes Value required (Hex) 80 4E Gap 12 00 Sync 3 F6 Control Bytes PREAMBLE 1 FC Index Mark 50 4E Gap 12 00 Sync ³ Fµ Control Bytes 1 FE ID Address Mark 1 00 to 45* ãž Track Number 1 00 or 01 Side Number 1 01 to 09 Sector Number SECTOR 1 02 Sector Length (Repeated 9 1 F7 CRC character command times 2²   4Å       Gað incrementing 12 00 Sync the Sector 3 F5 Control Bytes Number each 1 FB Data Address Mark ãž time) 512 00 Data Bytes 1 F7 CRC character command 84 4E Gap 598** 4E Gap POSTAMBLE * For 70 track disks. ** Nominaì figure¬ writå operatioî continueó untiì terminateä bù the INTRQ output, on detecting the Index Pulse. Somå oæ thå byteó supplieä ãž tï thå Datá Registeò arå noô writteî ontï thå disk¬ buô acô aó controì byteó tï thå FDC® Theså arå thå threå byteó F5H¬ F6È anä F7H® F5È commandó thå FDà tï perforí twï functions» writå á uniquå bytå patterî correspondinç tï A± witè á missinç  clocë  transition¬  ontï thå disk»  initializå  thå  CRà generatoò  circuitry®  F6È  commandó  thå FDà tï writå  á  uniquå patterî correspondinç tï C2È witè á missinç clocë transitioî ontï thå  disk®  Theså patternó enablå thå FDà tï interpreô  thå  bytåãž followinç  thå  threå  bytå patterî aó aî  addresó  mark¬  durinç decodinç operations®  Thå bytå F7È commandó thå FDà tï writå  thå computeä two-bytå CRà characteò ontï thå disk® Š Failurå oæ thå IOÐ tï writå thå firsô bytå tï thå Datá Registeò beforå thå arrivaì oæ thå leadinç edgå oæ thå Indeø Pulså  causeó thå  FDà to¬  seô  thå  Losô Datá biô iî  thå  Statuó  Register¬ activatå thå INTRÑ output¬  anä aborô thå command® Failurå oæ thå IOÐ tï supplù á datá bytå tï thå Datá Registeòãž oî receivinç á DMÁ requesô afteò thå firsô byte¬  causeó thå FDà tï writå á bytå  oæ zeroeó ontï thå disë anä alsï seô thå Losô Datá bit¬ buô doeó noô terminatå thå commanä sequence® Statuó  Register.„ Thå formaô oæ thå Statuó Registeò followinç  á formattinç commanä ió aó detaileä below®  Oî issuinç á commanä tï thå  Commanä  Register¬  thå FDà resetó thå  Statuó  Registeò  tï monitoò certaiî statuó conditionó implieä bù thå ne÷ command® Duå tï  inãž ternaì timinç delays¬  thå Statuó Registeò doeó noô contaiî valiä  statuó information¬  untiì 1´ uó afteò thå ne÷ commanä  ió issued® S7 S6 S5 S4 S3 S2 S1 S0 Status Register ãž Busy DRQ Lost Data CRC Error ãž RNF Logic 0 Protected Nãžot Ready Busù  Á logiã higè oî Busù indicateó thaô thå commanä ió iî progress»  logiã lo÷ indicateó thaô thå commanä sequencå is complete. DRÑ Á copù oæ thå ãžDRÑ outpuô tï thå IOP®  Á logiã higè indicates  thaô thå FDà haó datá availablå durinç thå  Reaä  Track/Reaä  Addresó   operations¬   anä requireó datá durinç á Writå Track operation. Losô Datá Logiã higè indicateó thaô thå IOÐ diä noô responä tï thå DRÑ outpuô iî time¬ anä aó á resulô; valiä ãž datá waó noô writteî ontï thå disë durinç á Writå Track operation/valiä datá waó noô reaä froí thå  disk during a read operation. Š CRà Erroò Durinç thå Read Address operation¬ á logiã higè indicates á CRà erroò waó detecteä withiî the sector IÄ field® Durinç thå Reaä Track and Wriãžte Track operations set to logic low. RNÆ Recorä Noô Found®  Á logiã higè indicateó thaô thå Read Address operatioî  waó  unablå tï locatå  aî IÄ field® Durinç Reaä Tracë anä Writå Tracë seô tï logic low. Protecteä  Inverteä coãžpù oæ thå WPRÔ inpuô  froí  thå  drive¬ durinç thå Writå Tracë operation® Logiã higè indicateó thaô thå selecteä disë drivå containó  á writå  protecteä disk®  Durinç reaä operationó seô tï logiã low® Noô Readù Inverteä copù oæ thå READÙ inpuô froí  thå  drive® Logiã higè  indicateó thaô thå drivå ió noô  readù ãž for a data transfer operation. System Connections Force Interrupt Command Thå Forcå Interrupô commanä ió á Typå ´ commanä anä ió useä  tï forcå  thå FDà tï generatå aî interrupô viá thå INTRÑ  outpuô  oî detectinç  á  certaiî condition®  Thå conditionó arå  defineä  bù settinç certaiî bitó withiî thå commanä bytå aó detaileä below. Type 4 Command D7 D0 ãž 1 1 0 1 I3 I2 I1 I0 Interrupô Condition Flags. Interrupt Condition Flags I3 I2 I1 I0 Interrupt Condition x x x 1 Not Ready to Ready Transition x x 1 x Ready to Not Ready Transition x 1 x x Every Index Pulse ãž 1 x x x Immediate Interrupt 0 0 0 0 No Interrupt Š Morå  thaî  onå  conditioî  caî  bå seô  aô  anù  timå  bù  thå appropriatå combinatioî oæ Interrupô Conditioî Flags. Iæ  anù  oæ  thå Forcå Interrupô commandó arå  issueä  tï  thå Commanä  Registeò  wheî á commanä ió alreadù  iî  operation¬  thå currenô  commanä  ió terminateä anä thå Busù biô  iî  thå  Statuó Registeò  reset®  Alì thå otheò bitó iî thå Statuó  Registeò  arå lefô  unchanged®  ãž Iæ thå commanä ió issueä wheî therå ió nï otheò commanä  currentlù iî operation¬  thå Statuó Registeò ió  seô  tï monitoò  thå samå conditionó aó á Typå ± command¬  aó  previouslù described® Thå  Nï  Interrupô commanä functionó iî aî identicaì manneò  tï thå otheò Forcå Interrupô commands¬ aó describeä iî thå paragrapè above¬ buô doeó noô producå aî interrupô requesô oî INTRQ. Thå INTRÑ outpuô ió reseô followinç anù oæ thå Forcå  Interrupô commands¬  bù  issuinç anù ne÷ commanä tï thå ãžCommanä Registeò oò bù  readinç  thå Statuó Register®  Thå onlù methoä  availablå  tï reseô  thå  INTRÑ outpuô afteò issuinç  thå  Immediatå  Interrupô command¬ ió tï issuå thå Nï Interrupô command. Afteò  issuinç  á  Forcå  Interrupô  commanä  tï  thå   Commanä Register: (a© Anotheò commanä shoulä noô bå issueä foò  aô  leasô ¸ us¬ tï allo÷ thå FDà tï procesó thå interrupô command. (b© Thå Statuó Registeò shoulä noô bå reaä foò 1´ uó  tï ensurãže the register contains valid status information. INTERFACE CONNECTION DETAIL System Connections D° tï D· Datá bus®  Useä tï transfeò data¬ commandó anä statuó informatioî  betweeî thå processinç elementó anä  thå FDC. WÅ Writå Enable®  Writå controì inpuô connecteä tï  thå IOWà controì linå oæ thå systeí controì bus®  Activå state¬ logiã low® Useä iî conjunctiãžoî witè CÓ aîd thå registeò selecô inputó (A0¬ A1© tï transfeò datá anä commandó froí thå datá buó tï thå FDC. RÅ Reaä Enable® Reaä controì inpuô connecteä tï thå IORà controì linå oæ thå systeí controì bus® Activå state¬ logiã  low®  Useä  iî  conjunctioî witè  CÓ  anä  thå registeò selecô inputó (A0¬  A1© tï transfeò datá anä status information ontï thå datá buó froí thå FDC. Š CÓ Chið Select®  Addresó inputãž® Activå state¬ logiã low® Wheî active¬ indicateó thaô thå FDà ió selecteä foò á data/command transfer operation. A0¬ A± Registeò selecô lines® Inputó connecteä tï A± anä A² oæ  thå systeí addresó bus®  Useä tï selecô  internaì registeró  withiî  thå  FDà foò  data/command/statuó transfers¬ viá thå datá buó aó detaileä below® A1 A0 0 0 Status/Command registãžers 0 1 Track register 1 0 Sector register 1 1 Data register INTRQ Interrupô Request® Outpuô connecteä tï aî interrupô            requesô  linå   oæ thå  Interrupô  Controlleò   (PIC©            anä tï thå externaì terminatå linå oæ  channeì  ±  oæ            thå Inpuô Outpuô Processoò (IOP)® Activå state¬ logiã            high®  Wheî  active¬ signifieó thaô thå FDà rãžequireó            attentioî  froí thå processinç systeí  anä  thaô  anù            currenô DMÁ transfeò operatioî shoulä bå terminated. DRÑ  Datá  Request® Outpuô connecteä tï thå DMÁ  requesô linå  oæ channeì ± oæ thå IOP®  Activå  state¬  logiã            high® Wheî activå, signifieó tï thå IOÐ thaô thå  FDà is ready for a DMA transfer operation. MÒ  Masteò Reset®  Inpuô connecteä tï thå  Systeí  Reseô controì line®ãž  Activå state¬  logiã low® Wheî active¬ causes the FDC to reset the internal registers. CË  Clocë  input®  ² MHú clocë witè á 50¥ dutù cyclå  foò internal timing within the FDC. Disk Drive Connections DS°  Drivå  Selecô  0®  Controì signaì supplieä  froí  thå Paralleì  Interfacå viá thå  decoder®  Activå  state¬ logiã  low®  Wheî  active¬  selectó  thå  disë  drivå configureä aó drivå 0. ãž DS±  Drivå  Selecô  1®  Controì signaì supplieä  froí  thå Paralleì  Interfacå viá thå  decoder®  Activå  state¬ logiã  low® Wheî  active¬  selectó  thå  disë  drivå configureä as drivå 1. Š HLÄ  Heaä Load®  Controì signaì supplieä froí thå Paralleì Interface®  Activå state¬  logiã high®  Wheî  active¬ engageó  thå  read/writå heaä oæ  thå  selecteä  disë drivå againsô thå disk® SSÏ Sidå Selecô Output®  Cãž ontroì signaì froí thå FDà useä tï selecô thå sidå ° oò sidå ± oæ double-sideä disks. Followó  thå  statå  oæ  aî  associateä  controì  biô withiî  aî  internaì register®  Á logiã higè  oî  SSÏ selects side 0 and a logic low, side 1. STEР Steð  Pulse® Pulseä outpuô generateä bù thå  FDà foò positioninç  thå disë  drivå  read/writå  head®  Eacè positivå goinç pulså moveó thåãž heaä tï aî  adjacenô tracë  locatioî  iî thå directioî determineä  bù  thå DIRà output. DIRà Directioî Control®  Controì signaì generateä bù  thå FDà tï  determinå thå directioî oæ movemenô  oæ  thå disë drivå read/writå head® Wheî DIRà ió seô tï logiã high¬ eacè steð pulså causeó thå heaä tï steð iî one track (awaù froí tracë 0)®  Wheî DIRà ió seô tï logiã low¬  eacè steð pulså causeó thå heaä tï steð ouãžô onå track (towards track 0). WÇ  Writå  Gate®  Controì signaì generateä  bù  thå  FDC® Activå  state¬   logiã  high®  Wheî  active¬  enableó currenô tï flo÷ intï thå disë drivå read/writå head. WÄ  Writå Data®  Outpuô foò writinç MFÍ encodeä datá  tï thå disë drive. RA× RÄ Ra÷ Read®  Inpuô tï thå FDà foò MFÍ encodeä datá froí thå disë drive® READÙ  Inpuô  tï thå FDà froí thå disë drive®  Wheî seô  tï ãž logiã high¬ indicateó thaô thå selecteä disë ió readù foò datá transfeò operations®  Wheî seô tï logiã low¬ indicateó thaô thå selecteä disë ió noô available® Iî thió  conditioî  attempteä datá  transfeò  operationó betweeî thå FDà anä thå disë drivå arå inhibiteä, anä causå aî activå interrupô requesô tï bå generateä  oî INTRQ®  READÙ  alsï  setó aî associateä  controì  biô withiî  aî internaì registeò accãžordinç tï  thå  logiã statå oî thå controì line® TR0°  Tracë 00®  Controì inpuô froí thå disë  drive®  Wheî TR0° ió seô tï logiã low¬  indicateó tï thå FDà thaô thå   read/writå  heaä  oæ  thå  selecteä  drivå   ió positioneä ïver track 0 of the disk. IÐ Indeø Pulse®  Controì inpuô froí thå disë  drive®  Á negativå going pulså generateä everù revolutioî oæ the disk¬ whicè informó thå FDà oæ thå starô oæãž thå first sectoò oæ eacè track® Š WPRÔ  Writå  Protect®  Controì inpuô froí thå disë  drive® Wheî  WPRÔ ió seô tï logiã low¬  anù attempteä  writå operatioî  tï thå selecteä drivå ió  inhibited®  WPRÔ alsï   setó  aî  associateä  controì  biô  withiî  aî internaì registeò accordinç tï thå logiã statå iî thå control line® TRACK FORMAT Datá  ió  recordeä oî á disë iî concentriã  circles¬  knowî  aó tracks®  Wheîãž  á disë ió inserteä intï thå disë drive¬  thå  Autï Shutteò ió openeä tï allo÷ thå read/writå heaä oæ thå disë  drivå accesó  tï thå disë surface®  Wheî thå heaä ió loaded¬  thå  heaä makeó  physicaì contacô witè thå radiaì sloô oæ magnetiã materiaì exposed¬ wheî thå shutteò ió open® Informatioî oî á tracë ió reaä anä  writteî  seriallù aó thå disë rotateó withiî itó  protectivå plastiã shell. Eacè tracë oæ thå disë ió divideä intï ninå sectoró bù softwarå formattinç (sofô sectoring)®  Tãžhå sectoró arå recordeä ontï  eacè tracë oæ thå disë bù issuinç á formaô commanä tï thå FDà anä theî writinç  alì thå byteó ontï thå disë aó illustrateä iî Figurå  2® Thå starô oæ eacè tracë ió markeä bù á singlå indeø pulse¬  whicè ió generateä bù thå disë drivå everù revolutioî oæ thå disk. Eacè  sectoò haó aî identificatioî (ID© fielä anä á datá field¬ separateä  bù  gapó oæ unintelligenô information®  Thå  gapó  arå requireä  tï  allo÷ thå FDà tï procesó informatioî froí thå  disë durãžinç  disë reads¬  anä alsï tï takå intï accounô variationó  iî drives¬  sucè aó motoò speeä variations® Thå IÄ fielä defineó thå datá  fielä thaô follows¬  bù specifyinç itó tracë  number¬  sidå number¬ sectoò numbeò anä lengtè oæ thå datá fielä iî bytes. Botè  thå IÄ anä datá fieldó begiî witè aî addresó marë anä enä witè  á  two-bytå  cycliã redundancù checë  (CRC©  characteò  foò detectinç erroró iî thå previouó field®  Differenô addresó  markó arå useä tï distinguisè betweeî thå twï fieãž lds® Alì  thå seriaì datá oî thå tracë (IÄ fields¬  datá fieldó  anä gað  information© arå recordeä oî thå disë bù Modifieä  Frequencù Modulatioî  (MFM)®  Iî  MFÍ encoding¬  botè seriaì datá bitó  anä clocë pulseó arå interleaveä intï thå datá stream® Iî ordeò tï distinguisè thå addresó markó oî thå disë froí datá byteó whicè maù bå identical¬ thå addresó markó arå recordeä witè missinç clocë pulseó iî predefineä locations®  Thå addresó  markó arå  thå onlù byteó oî thå disë witè misãžsinç clocë bits¬  anä arå produceä bù thå FDà durinç formatting® Theså arå theî useä bù thå FDà foò recognitioî anä synchronisatioî durinç disë accesses® .pa Š Figure 2. Track Format .pa stream® Iî ordeò tï distinguisè thå addresó markó oî thå disë froí datá byteó whicè maù bå identical¬ thå addresó markó arå recordeä witè missinç clocë pulseó iî predefineä locations®  Thå addresó  markó arå  thå onlù byteó oî thå disë witè misãž.fo # .he KEYBOARD DRIVER KEYBOARD DRIVER INTRODUCTION Thå  keyboarä softwarå ió designeä tï handlå alì communicationó betweeî thå seriaì keyboard¬  real-timå clock¬  mouså anä thå MS- DOÓ 2.° Operatinç system. APPLICATIONS INTEREST Keyboard Lookup Table Thå  keyboarä  lookuð tablå ió useä bù thå BIOÓ tï  obtaiî  thå code(s©  foãžò eacè keù oî thå keyboard®  Thå firsô 10´ wordó (20¸ bytes© ió thå datá foò thå unshifteä mode¬  thå nexô 10´ wordó ió thå datá foò thå shifteä mode¬ thå nexô 10´ wordó ió thå datá foò thå controì mode®  Afteò thió therå arå 40° byteó oæ strinç spacå whicè ió dynamicallù allocateä foò thå strinç keys. Thå tablå iî alì consistó oæ 56¸ words. Eacè worä iî thå tablå provideó thå followinç information: Bit 15   =   0  - keù  produceó á strinç oæ characters¬                      iãžî thió case¬ bitó 0-1´ providå á 15-                      biô  strinç pointeò tï á strinç  helä                      iî memory.             =   1  - keù ió á normaì non-strinç oò speciaì                      keù anä ió handleä iî thå normaì way. Bit 14  =   0  - keù ió noô á speciaì key             =   1  - keù ió á speciaì key¬  iî thió  case¬                      bitó 0-· providå á speciaì keù numbeò                      whicè   defineó  thå  followinç   keù                      tyãžpes:                       00 - NULL key - produces no output                      01 - CAPS LOCK key                      02 - RIGHT-HAND SHIFT key                      03 - LEFT-HAND SHIFT key                      04 - CONTROL key                      05 - STOP key                      06 - CALC key 07 - Mscreen Echo toggle                      08 - FF are undefined  Bit 13 = 0       - Autï  repeaô ió noô alloweä oî  thå key = 1ãž       - Autï repeaô ió allowed .PA ŠBit 12 = 0       - Keù ió noô affecteä bù shift-lock = 1       - Keù ió affecteä bù shift-lock Bit 11 = 0       - Keù ió noô affecteä bù capó Lock = 1       - Keù ió affecteä bù capó lock Bit 10 = 0       - Keù ió noô á locaì key = 1       - Keù  ió locaì - outpuô goeó  direcô                      tï thå screen Bits 9 & 8   - Prefiø type 00 - No prefix                   ãž   01 - "ESC" prefix                      10 - "ESC [" prefix                                        11 - "ESC O" prefix  Bits 7-0 = Key code - usually 7-bit ASCII, with bit 7=0 Foò  á  strinç  keù thå datá pointeä tï bù  thå  15-biô  strinç pointeò haó thå followinç format:- Bytes 1 and 2 = String type and character count word Bitó  0-·  ió  thå counô oæ  characteró  iî  thå                  string (zero is a null string)                  Bits 8-13 correspãžond to the above types.                  Bitó   14-1µ  arå  noô  used Byte 3 = Character 1 : Byte n = Last character. .PA Š Prograí  µ allowó á multi-strinç keù tï bå seô uð  froí  Basic® Thå  keù numberó arå helä iî DATA¬  anä thå routinå ió calleä  bù GOSUB.  10 GOSUB 50000:STOP 999 REM--SOME SAMPLE KEY DATA 1000 DATA 4 'NUMBER OF KEYS 1010 DATA "0:8:RUN-": 'MEMBRANE KEY 1 IS RUN WITH A CR 1020 DATA "1:13:LIST-": 'SHIãž FT MEMBRANE KEY 6 IS LIST CR 1030 DATA "0:2:DIR/W-": 'REPEAT IS DIR/W CR 1040 DATA "0:0:HELP": 'HELP IS HELP, NO CR 1050 REM--THE DATA IS HELD AS FOLLOWS: MODE:KEYNUM:STRING [-] MODE - 0=UNSHIFTED, 1=SHIFTED, 2=CONTROL KEYNUM - THE NUMBER OF THE KEY TO BE RE-DEFINED FROM 1 TO 96 STRING - THE NEW STRING TO APPEAR ON THE KEY, IF A "-" IS APPENDED¬ THEÎ Á CARRIAGÅ RETURÎ IÓ ADDEÄ TÏ THÅ CODE 50000 READ N:FOR E=1 TO N:READ KEY$ 50010 ãžIF RIGHT$(KEY$,1)="-" THEN MID$(KEY$,LEN(KEY$))=CHR$(13) 50020 GOSUB 50030:NEXT E:RETURN 50030 DEF SEG=0:ST=PEEK(&H0712)+256*PEEK(&H0713) 50040 TL=PEEK(&H0716)+256*PEEK(&H0717)-1 50050 KB=PEEK(&H0714)+256*PEEK(&H0715):DEF SEG=KB 50060 M=VAL(KEY$):Y=VAL(MID$(KEY$,INSTR(INSTR(KEY$,":")+1)) 50070 O$=MID$(KEY$,INSTR(INSTR(KEY$,":")+1,KEY$,":")+1):SL=LEN(O$) 50080 L=(ST+(M*208)+Y*2):FOR K=ST+TL TO ST+623 STEP -1: IF PEEK(K)=0 THEN 50090 ELSE 50100 50090 NEXT K:IF K=ST+623 THEN K=K+2 50100ãž K=K+1:POKE K,SL:POKE K+1,0:FOR P=1 TO SL: POKE P+K+1,ASC(MID$(O$,P)):NEXT 50110 DEF SEG:G%=K:P1=PEEK(VARPTR(G%)):P2=PEEK(VARPTR(G%)+1) 50120 DEF SEG=KB:POKE L,P1:POKE L+1,P2:RETURN  SYSTEMS INTEREST Thå softwarå consistó oæ á numbeò oæ modules¬  anä includeó thå followinç specifiã areas:  1. Keyboard Unit to Apricot serial data handler 2. Key make code (down-code) handler 3. Key break code (up-code) handler 4. Keyboard Data Translation Hanãždler 5. Auto-repeat handler 6. Non-make/break code interpreter 7. Queue handlers for data flow to MS-DOS, screen, and keyboard  .pa Š1. Keyboard Unit to Apricot - serial data handler Seriaì  datá froí thå keyboarä uniô ió receiveä intï porô   oæ thå Z8° SIÏ chip¬  whicè causeó á receivå interrupô routinå tï bå activated. Thió  routine¬  iî  thå SIÏ handleò module¬  filteró ouô  valiä codeó  froí  thå keyboarä anä sendó theså tï  thå  maiî  keyboarä handleãžò routine. Thå  handleò routinå iî turî filteró ouô alì codeó noô relatinç tï  keù makå oò breaë operationó (uð oò dowî codes)¬  anä  passeó theså oî thå thå non-make/breaë codå interpreter. 2® Keù MAKÅ CODÅ (down-code© handler. Thió sub-modulå firsô convertó thå ra÷ down-codå tï á numbeò iî thå  rangå  0-10³  (foò  thå possiblå 10´ keù  positionó  oî  thå keyboarä - 9¶ oæ whicè arå currentlù used). Iô  theî  lookó  uð thå keù makå codå iî  thå  keyboarä  lookuð table¬  whicè dãžefinå thå keù outputó iî thå unshifted¬ shifteä oò controì (alt© modes»  anä thå typå oæ keù whicè iô is®  Á keù caî havå anù valiä combinatioî oæ thå folloinç attributeó foò eacè oæ thå threå modes:  Key produces a string of characters (a STRING key) Key is allowed to Auto-repeat Key is affected by Shift Lock Key is affected by CAPS lock Key is "local" - output goes direct to the screen driver Keù haó "ESC¢ prefiø (useä foò escapå sequenceó - usuallù local) ãž Key has "ESC [" prefix (used with the ANSII driver) Key has "ESC O" prefix (also for ANSII) Key is valid for use by the calculator Keù ió special¬  i.e® SHIFT¬ CONTROL¬ CAPÓ LOCK¬ STOP¬ CALC¬ NULL key  Speciaì keyó arå filtered-ofæ tï á speciaì keù subroutinå wherå thå followinç actionó arå taken:- NULÌ       -    ignoreä - nï outpuô ió senô tï anù queue CAPS  LOCK - Iæ  thå  keyboarä ió alreadù iî shifô locë  oò                 capó locë theî thió modå ió cleaãžred¬  anä  thå                 CAPÓ LOCË LEÄ ió extinguished® Iæ thå keyboarä                 ió  iî controì modå theî thå shift-locë statuó                 ió activated¬  otherwiså thå CAPÓ locë  statuó                 ió  activated¬   anä  thå  CAPÓ  locë  LEÄ  ió                 illuminated. .pa ŠSHIFT      -    righô oò lefô - thå SHIFÔ flaç ió set¬  sï thå                 keyboarä ió no÷ iî thå SHIFÔ mode.      CONTROL    -    thå  CONTROÌ flaç ió set¬  sï thå keyboarä  ió    ãž             no÷ iî thå immediatå CONTROÌ mode STOP       -    Iæ thå keyboarä ió iî thå STOÐ mode¬ theî thió                 ió  releaseä anä thå stoð LEÄ ió extinguished¬                 otherwiså thå stoð LEÄ ió illuminated¬ anä thå                 STOÐ modå ió asserted. CALC       -    iæ thå calculatoò ió OFF¬  á "wake-up¢  signaì                 ió  senô tï thå internaì BIOÓ calculatoò whicè                 theî  setó uð thå MicroScreeî displaù  (savinç                 thå originãž aì contents© anä setó thå CALCULATOÒ                 OΠ flag®  Iæ  thå  keù ió  presseä  wheî  thå                 calculatoò  ió on¬  á RESEÔ signaì ió senô  tï                 thå  internaì  calculator¬   whicè  theî   re-                 initialiseó itself.    Foò normaì oò strinç keys¬  thå routinå theî checkó whetheò thå keyboarä  ió iî thå STOÐ mode¬  iæ iô is¬  theî thå STOÐ modå  ió released¬  anä thå STOÐ keù LEÄ ió extinguished®  Thió meanó thaô anù  keù  depressioî (exepô foò ãžá 'special§ key© caî bå  useä  tï releaså thå STOÐ mode. Thå  keù numbeò ió placeä iî á 16-bytå down-buffeò wherå iô  ió helä  untiì thå keù ió released¬  iæ thå buffeò ió fulì theî  thå numbeò  ió simplù forgotteî - iî eitheò case¬  thå counô oæ  keyó helä dowî ió incrementeä bù 1. Iæ  thå numbeò oæ keyó helä dowî ió one¬  theî thå  AUTO-REPEAÔ lead-iî delaù counô ió initialised. Thå CALCULATOÒ OÎ flaç ió theî checkeä tï seå iæ wå arå iî  thå CALCULATOÒ  MODE®  Iæ so¬  theî thå kãžeù ió checkeä viá á  speciaì bit-mað  tï  seå  whetheò  iô shoulä bå senô  tï  thå  calculatoò module¬  iæ iô is¬ theî thå keù numbeò (ra÷ down-codå minuó 1© ió senô  tï  thå calculatoò module®  Thå modulå performó  alì  erroò checking¬ MICROSCREEN outpuô etc. Thå  keù  ió theî checkeä foò "local¢ typå - iæ iô ió theî  thå internaì  destinatioî flaç ió seô tï screeî output¬  ratheò  thaî MS-DOÓ output. .pa Š Thå  prefix-bitó  oæ  thå keù typå arå  theî  checkeä  anä  thå appropriatå  ESãžà prefiø (ESC¬  ESÃ Û oò ESà O© codeó arå senô  tï thå outpuô queue. Thå  keù typå ió theî checkeä foò á strinç keù - iæ iô ió  theî thå strinç ió extracteä froí memory¬  anä sent¬  á characteò aô á time¬  tï  thå outpuô queuå - iæ therå ió room®  Iæ therå ió  noô enougè rooí tï fiô thå strinç in¬  theî thå outpuô ió aborteä anä thå internaì belì ió soundeä tï servå aó aî alarm. Otherwiså thå keù codå ió senô tï thå outpuô queue. 3. Key Break code (up-code) handler Ra÷  up-coãždeó arå firsô converteä bù thió routinå tï thå  rangå 0-103¬  theù arå theî converteä viá thå keyboarä lookuð tableó tï givå thå keù typå anä datá (aó iî thå down-codå handler). Speciaì keyó arå filtereä ouô anä handleä aó follows: CAPS LOCK, STOP, CALC  - ignoreä  (sincå  theså  arå  togglinç                        keys¬  onlù  thå makå codå needó tï  bå                        acteä upon). NULÌ keù               - ignored CONTROL                - Thå  CONTROÌ KEÙ flaç ió reãžseô  - thå                        keyboarä ió no÷ iî thå normaì mode. LEFT  or  RIGHT SHIFT - Thå  SHIFÔ  KEÙ flaç  ió  reseô  - thå                        keyboarä ió no÷ iî thå normaì mode. Á normal¬  oò strinç key¬ haó itó entrù iî thå down-codå buffeò removeä  (iæ  iô  ió there© anä thå counô oæ keyó  helä  dowî  ió decrementeä bù one. Iæ  thå down-counô ió no÷ one¬  thå lead-iî Autï  Repeaô  delaù counô ió intialised. 4. Translation of data routines Theså  routineó ãžuså thå keyboarä lookuð tableó tï establisè thå datá anä attributeó oæ á key. 5. Auto Repeat handler Thå  autï  repeaô  handleò ió calleä  bù  thå  timeò  interrupô routinå everù 20ms¬ thå routinå firsô checkó tï seå iæ thå numbeò oæ keyó dowî ió onå - iæ noô iô aborts. Iæ  thå  counô ió ± theî thå clocë ratå ió divideä tï givå  thå basiã  autï repeaô perioä (e.g®  10cpó ½ 100mó peò chaò - µ  20mó periods). Š Iæ  aî  auto-repeaô  ratå perioä haó  beeî  reached¬  theî  thå curreãžnô  modå  ió checkeä tï seå iæ thå keyboarä ió iî  thå  STOÐ modå - iæ sï theî thå routinå doeó noô repeat. Thå lead-iî delaù counô ió theî decremented¬  iæ iô ió noô zerï theî thå routinå aborts¬  otherwiså aî "auto-repeat¢ operatioî ió performed: Thå CALCULATOÒ OÎ flaç ió checkeä - iæ thå calculatoò ió on¬ oò thå keù ió á speciaì keù theî nï autï repeaô ió done. Iæ alì ió okay¬ thå previouó keù sequencå ió repeated¬ theî thå Autï Repeaô modulå ió re-entered® Thió continueó untiì tãžhå keù ió releaseä (up-code). 6. Non make/break code interpreter Thió  parô oæ thå keyboarä softwarå ió useä aó á  junctioî  foò otheò keyboard-relateä operationó sucè aó date/time¬  mouså codeó anä  Mscreeî  feedback®  Iî  eacè caså controì ió passeä  tï  thå relevant device driver. 7. Queue handlers for data flow to MS-DOS or screen. Thå keyboarä softwarå containó ³ rinç buffers¬  oò  queues¬  tï pasó datá betweeî variouó asynchronouó softwarå modules. These are: a. Quãž eued data from the keyboard handler to MS-DOS b® Queueä datá tï thå screeî handleò (locaì keyó froí thå keyboard) c® Queueä datá froí thå MicroScreeî driver¬ LEÄ driver¬ Timå anä Datå handler. a. The MS-DOS queue: Thió consistó oæ threå routines¬  á queuå filler¬  á look-aheaä characteò checker¬ anä á queuå reader.     Thå  queuå filleò ió calleä froí thå maiî keyboarä handleò  anä placeó thå characteò iî thå 80-bytå buffer. Thå calleò alsï passeó á counô oæ ho÷ãž manù characteró iô wisheó tï placå sequentiallù iî thå buffer¬  iæ therå ió noô enougè rooí foò  thå entirå strinç iî thå buffer¬  theî thå queuå filleò doeó noô accepô thå character¬  soundó thå bell¬  anä returnó aî erroò status. Thå characteò look-aheaä routinå ió calleä froí thå MS-DOÓ BIOÓ interfacå routineó tï providå á keyboarä look-ahead¬  anä  simplù returnó thå nexô outpuô characteò iî thå queue¬  withouô removinç iô froí thå queuå (iæ nï characteò ió availablå iô returnó á nulãžì code). Š Thå  queuå  readeò ió calleä bù MS-DOÓ witè aî addresó wherå  á characteò  froí thå queuå shoulä bå placed¬  iæ nï  characteò  ió available¬ thå routinå waitó foò one. b® Locaì queue: Thå  locaì  queuå filleò ió calleä bù thå keyboarä  handleò  tï pasó  characteró tï thå screeî driver¬  anä operateó iî mucè  thå samå waù aó thå MS-DOÓ queuå handler. c® Keyboarä Uniô queue: Thió  queuå  ió  useä  tï pipå datá froí  thå  Apricoô  tï  thå keyboarä unit®  Thå queuå fiãžlleò placeó á singlå characteò iî thå buffer¬  iæ therå ió nï room¬ thå characteò ió ignored¬ otherwiså thå characteò ió transmitteä tï thå keyboard¬  wherå iô ió eitheò displayeä oî thå Microscreeî or¬ iæ iô ió á controì character¬ ió executed.  c® Keyboarä Uniô queue: Thió  queuå  ió  useä  tï pipå datá froí  thå  Apricoô  tï  thå keyboarä unit®  Thå queuå fiãž.he APPENDIX A .fo # .op CIRCUIT DIAGRAMS Figure 1. SYSTEM BOARD CPU SECTION Figure 2. SYSTEM BOARD DRAM AND CRTC LOGIC Figure 3. 128k DRAM SECTION Figure 4. EXPANSION SLOTS Figure 5. KEYBOARD .PAãž.fo # .he CALCULATOR CALCULATOR INTRODUCTION Thå Apricot'ó Internaì Calculatoò ió designeä tï bå useä eitheò beforå  thå  systeí ió booted-up¬  withouô thå neeä tï  inserô  á disk¬  oò  froí  withiî aî applicatioî wherå calculationó caî  bå performeä  anä thå resultó (eitheò intermediatå oò final© caî  bå senô tï thå MS-DOÓ inpuô queuå aóãž iæ theù haä beeî typeä iî  froí thå keyboard. APPLICATIONS INTEREST Thå  Calculatoò caî bå operationaì iî onå oæ twï modesº  Beforå boot-uð  iî  isolatioî  oò  wheî  thå  BIOÓ  ió  loadeä  anä   aî applicatioî ió running. Thå Calculatoò codå itselæ resideó permanentlù iî thå booô ROM¬ anä  wheî thå prå boot-uð sequencå ió iî operation¬  thå keyboarä ió scanneä oncå everù 20mó tï checë iæ thå CALà keù ió depressed® Iæ so¬ thå calculatoò functioî ió engaged¬ thå MicroScreeî ió seô ãž uð anä calculations caî begin. Withiî thå calculatoò code¬ mathematicó ió performeä upoî ASCIÉ numberó  usinç thå standarä Inteì 808¶ floatinç poinô  arithmetiã routines® Iæ  thå  calculatoò ió useä froí withiî thå BIOÓ theî  slightlù differenô Microscreeî setuð routineó arå useä (foò example¬  thå SENÄ legenä ió displayeä oî thå MicroScreen¬  anä thå seconä  LEÄ oî  thå membranå paä ió illuminated)®  Also¬  aî extrá featurå ió incorporateä  wherebù  iæ  Membranå Keù ²  ió  presseäãž  theî  thå currenô  contentó oæ thå Microscreen¬  startinç froí thå top-lefô anä  continuinç  righô  untiì anythinç buô á valiä  numbeò  oò  á decimaì  poinô ió encountereä getó senô (á characteò aô  á  time© intï thå MS-DOÓ inpuô queue. SYSTEMS INTEREST Eacè timå á keù ió pressed¬ thå BIOÓ consultó thå CALCULATOÒ OÎ flaç  tï seå iæ thå calculatoò ió switcheä on®  Iæ so¬  theî  thå Calculatoò  bit-mað  (seå  thå Keyboarä Tableó sectioî  foò  morå information© ió checkeä againsô thå ãž numbeò oæ thå keù helä  down® Iæ  therå ió á "1¢ iî thå biô map¬  theî thå keù ió designateä tï bå calculatoò specifiã sï thå Autï repeaô routinå ió bypasseä anä thå  ra÷ downcodå ió senô tï thå calculator®  Iô soulä  bå  noteä thaô  thå calculatoò specifiã keyó caî bå defineä iî thå tablå aó anything¬  buô thå calculatoò wilì stilì interpreô thå  down-codå anä producå thå correcô action¬ thå onlù keù thaô musô noô bå re- defineä  ió thå CALà key¬  whicè haó tï producå thå speciaì "É aí thå CãžALà key¢ code® .pa Šå Autï repeaô routinå ió bypasseä anä thå  ra÷ downcodå ió senô tï thå calculator®  Iô soulä  bå  noteä thaô  thå calculatoò specifiã keyó caî bå defineä iî thå tablå aó anything¬  buô thå calculatoò wilì stilì interpreô thå  down-codå anä producå thå correcô action¬ thå onlù keù thaô musô noô bå re- defineä  ió thå CALà key¬  whicè haó tï producå thå speciaì "É aí thå Cãž.fo # .he MICROSCREEN MICROSCREEN DRIVER INTRODUCTION Thå  MicroScreeî ió treateä bù thå BIOÓ aó á  serially-accesseä device®  Noô  onlù  texô  outpuô  ió  supported¬  buô  thå  LED'ó associateä witè thå membranå keyó caî bå switcheä oî anä off®  Iô acceptó characteró senô tï it¬ somå oæ whicè arå speciaì controló (sucè  aó  cleaò screen¬ ãž positioî cursoò etc.© Thå BIOÓ  haó  aî internaì  tablå  oæ  thå Sirius-compatiblå  escapå  codes¬  whicè operatå aó aî "interpreter¢ foò thå user¬  sï nï actuaì  machine- leveì direcô accesó tï thå MicroScreeî ió required® APPLICATIONS INTEREST Withiî  thå  BIOÓ  anä MS-DOÓ devicå table¬  thå  ASCIÉ  strinç "MSCREEN¢  ió useä aó á devicå namå sï thaô iô caî bå  referenceä wheî á filå ió opened¬ anä subsequenô outpuô tï thaô filå senô tï thå MicroScreen® Herå ió á programminç example:ãž  1° OPEÎ "O",1,"MSCREEN" 2° PRINT#1,"Thió Ió Thå MICROSCREEN!" 3° CLOSÅ 1  Iô  wilì  bå  noteä  thaô thå outpuô wilì  noô  appeaò  oî  thå MicroScreeî  untiì  thå filå ió CLOSEd®  Thió ió duå  tï  MS-DOS¬ whicè  saveó  alì seriaì outpuô oæ thió kinä untiì  itó  internaì bufferó  arå  full¬  theî iô sendó thå datá tï  thå  screen®  Foò alternativå  wayó  oæ  accessinç thå MicroScreen¬  refeò  tï  thå Devicå  I/Ï - Controì Devicå section®  Tablå ± ió á lisô oæ  thå escapå  codeó  tãžhaô  thå  MicroScreeî  recognises®   Iæ  aî   un- recognisablå  escapå sequencå (includinç ANSI© ió  recieved¬  thå cursoò positioî remainó unchanged¬ anä nï actioî ió taken. .pa Š Tablå 1 -- MicroScreeî Escapå sequences. ESà /n‚ - Seô membranå keù LED's                            wherå  î  ió  á  binarù  numbeò  whicè                            denoteó thå LEÄ tï bå switcheä on® Thå                            lasô  siø bitó oæ thå bytå arå onå foò              ãž              eacè  LED¬  thå  firsô  twï  bitó  arå                            arbitary® Foò example¬ thió numbeò :                            (Binary© 0000000±                            wilì switcè oî thå left-hanä LED¬ thió                            number                            (Binary© 00100000                            wilì switcè oî thå right-hanä LED.                            Characteò  °  switcheó  OFÆ  alì   thå                            LED's¬  characteò 25µ switcheó OΠ alìãž                            LED's® -- Seå Prograí example ESC < - Switch on time and date display ESC A - Moves the cursor UP one line ESC B - Moves the cursor DOWN one line ESC C - Moves the cursor RIGHT one position ESC D - Moves the cursor BACK one position ESà Å - Clear thå screen¬ homeó the cursor ESC H - Homes the cursor only ESC J ãž - Erase from cursor to end of MicroScreen ESC K - Erase from cursor to end of line ESC U - Enable LCD screen echo ESC V - Disable screen echo to MicroScreen ESà × - Send output to the MicroScreen only ESC Y y x - Senä cursoò columî numbeò (x)®  (y© ió                            ignored ESC b - Erase from cursor to start of MicroScreen ESC c - Disabãž lå    scrollinç   - wheî   cursoò                            reacheó thå bottoí right-hanä  corner¬                            iô ió returneä tï thå top-left¬ anä nï                            MicroScreen scrolling takes place. ESC d - Enable MicroScreen scrolling ESC e - Cursor ON ESC f - Cursor OFF ESC j - Save cursor position ESà ë - Restorå cursoò tï previouslù saved position ESC l ãž - Erase entire line, leave cursor ESC o - Erase from cursor to beginning of line ESC r - Echo Enable ESC s - Echo Disable ESC z - Clear Mscreen & enable screen output. .pa ŠProgram example: Thió prograí presentó aî easù waù oæ selectinç whicè LEÄ oî thå membranå paä ió illuminated® Placå thå requireä patterî oæ LED'ó intï  LED¤  aó 0'ó anä 1's¬  anä GOSU 2000®  Thãžå  examplå  belo÷ illuminateó LEÄ ± anä LEÄ 6.  10 led$="100001":gosub 2000 2000 m=0:for k=1 to 6:m=m+val(mid$(led$,k,1))*2^(k-1):next 2010 print chr$(27)+"/"+chr$(m or 192); Some of the standard ASCII control codes are also supported: Backspace - Character 8 - Move the cursor BACK one position Linefeed - Character 10 - Iæ thå cursoò ió oî thå firsô line¬ iô                            ió   moveä  dowî  tï  thå  nexô  line¬                            otherwiså á scrolì UÐ takãžeó place¬ anä                            the bottom line is cleared. Vertab - Character 11 - As linefeed Formfeed - Character 12 - As linefeed Returî  - Characteò 1³ - Movå thå cursoò tï thå starô  oæ  thå current line. Á  standarä 25¶ characteò seô ió supplied¬  containinç alì  thå standarä ASCII¬ anä somå extrá graphicó characters®  Characters 0 to 31 - Non printing control codes Characters 32 to 127 - Standard ASCII character set Chãžaracters 128 to 159 - Special graphics characters Characters 160 to 255 - Repeat of the standard ASCII set  SYSTEMS INTEREST Thå MicroScreen ió accesseä bù thå BIOÓ aó á seriaì device® Thå keyboarä  queuå  buffeò  ió  useä foò alì  communicatioî  tï  thå MicroScreen¬ whicè ió aî outpuô devicå only. .pa Š The MicroScreen Character set .paers®  Characters 0 to 31 - Non printing control codes Characters 32 to 127 - Standard ASCII character set Chãž.fo # .he GSX SYSTEM GRAPHICS SYSTEMS EXTENSION SYSTEM INTRODUCTION Thå  Apricoô  has¬  aó  standard¬  aî 80° bù  40°  pixeì  high- resolutioî  screen®  Thió giveó thå useò 32° thousanä individuaì pointó  which¬  iî thå high-resolutioî mode¬  caî bå  individualù switcheä oî oò ofæ aó required. Thå  Graphicó Systemó Extensioî module¬  froí Digitaìãž Research¬ allowó  thå useò tï writå programó whicè caî uså thå  fulì  high- resolutioî screen® Programó writteî iî high-leveì languageó (sucè aó  Pascaì anä Basic© whicè uså Graphicó Systemó Extensioî caî bå compileä oî thå Apricoô anä theî executed. APPLICATIONS INTEREST Graphics Systems Extension Functions Alì  graphicó  deviceó  werå  noô  createä  equal®   Terminals¬ plotteró anä printeró alì dra÷ lines¬  filì iî areaó anä  producå texô differently. Alì  computeò graphiãžcó arå displayeä oî á coordinatå systeí  oæ onå  sorô oò another®  Graphicó Systemó Extensionó joâ ió tï makå surå  thå  coordinatå  systeí thaô onå devicå  useó  matcheó  thå coordinatå  systeí  useä bù another®  Foò example¬  witè  GSØ  aî applicationó  prograí  produceó  thå samå graphicó  imagå  oî  aî Apricoô aó iô doeó oî aî IBÍ PCº  thå linetypeó arå thå same¬ thå characteò sizå thå same¬ etc. How To Use Graphics Systems Extension Applicationó  programó  worë witè  Graphicó  Sysãžtemó  Extensioî througè   á  standarä  callinç  sequence®   GSØ  translateó   thå parameteró   passeä   bù   theså  standarä  calló  tï   fiô   thå peculiaritieó  oæ eacè graphicó device®  Iô ió  thió  translatioî procesó thaô makeó applicationó programó device-independent. What is Graphics Systems Extension? Eacè   graphicó   devicå  ió  mechanicallù   anä   electricallù different¬ anä requireó á speciaì prograí tï ruî it® Thió prograí ió calleä á Devicå Driver®  Graphicó Systemó Extãž ensioî  consistó oæ  á Devicå Driveò writteî bù ACÔ (calleä thå GIOÓ - oò Graphicó Input/Outpuô  System©  anä á Useò Interfacå supplieä  bù  Digitaì Researcè calleä thå GDOÓ (Graphicó Devicå Operatinç System)® Foò  detailó  oî ho÷ tï instalì Graphicó Systemó Extensioî  anä thå  relevanô  prograí  functionó  tï  uså  it¬  seå  thå  GSX-8¶ Programmer'ó manual. .pa ŠSYSTEMS INTEREST Thå  Graphicó Systemó Extensioî Apricoô Graphicó Devicå  driveò consistó oæ threå files:  ãž 1 - GRAPHICS EXE 2 - ASSIGN SYS 3 - DDACRT SYS  1. GRAPHICS.EXE Thió  ió  thå  filå whicè containó thå  Digitaì  Researcè  GDOÓ module®  Wheî loaded¬  iô wilì firsô allocatå abouô 32ë oæ  useò RAÍ  foò  itselæ anä thå GIOS®  Theî iô wilì opeî ASSIGN.SYÓ  anä reaä  thå Devicå numbeò anä thå namå oæ thå filå  containinç  thå GIOÓ  devicå driveò froí it®  Afteò doinç thió iô wilì opeî  thå GIOÓ  filå anä loaä iô iãžntï RAÍ sï thaô iô ió withiî thå 32ë thaô GDOÓ haó allocated®  Interrupô 22³ ió seô uð tï poinô tï thå GDOÓ commanä structurå entrù point¬  theî thå prograí terminateó  witè aî  MS-DOÓ "Staù Resident¢ calì thuó movinç thå starô oæ thå  TPÁ uð bù 32k. 2. ASSIGN.SYS Aó describeä above¬ thió filå containó thå numbeò anä namå namå oæ thå logicaì Devicå Driveò thaô thå Apricoô uses. When TYPEd it should display the following: A>TYPE ASSIGN.SYS 01 ddacrt.sys Aãž>_ Thå 0± indicateó thaô thå driveò ió á CRÔ devicå driver¬ anä ió thå primarù onå thaô ió useä foò output. Thå namå oæ thå filå thaô containó thå Devicå Driveò ió next. 3. DDACRT.SYS Thió filå ió thå ACÔ Graphicó Inpuô Outpuô System®  Iô ió whaô enableó  GDOÓ tï dra÷ lines¬  ploô pointó anä filì  areas®  Thå Devicå Driveò waó writteî iî 808¶ Assembleò anä Pascal® .pa ŠTHE ACT GRAPHICS SYSTEM - DDACRT.SYS Oî  thå Apricot¬  thå followinç functionó arå provideä thaô arãžå classeä  aó "Machinå Dependent¢ iî thå Graphicó Systemó Extensioî Programmer'ó guide: * Line Attributes: a. 7 Line Styles, 1 to 7 b. 5 Line Widths, 1, 3, 5, 7, and 9 (In Pixels) * Marker Attributes: a. 5 Markers, 1 to 5 b. 16 Sizes, 1, 3, 5 .. 31 (In Pixels) * Text Attributes a. 1 character font b. 4 heights 14, 28, 42, 56 (In Pixels) c. Rotation, with the smallest angle 1 degree * Fill Attributes ãž a. 4 interior styles: 0 - Hollow, 1 - Solid, 2 - Pattern, 3 - Hatch. b. 6 style indices for Pattern and Hatch interior styles * Input Locator One device is available, using a cross-hair cursor: Thå keyboard¬  usinç thå standarä cursoò keyó oò thå numeriã      pad® Thå µ keù oò thå Cleaò keù actó aó á togglå foò varyinç      the cursor speed. * Input Valuator Onå devicå ió availablå here® Thå devicå ió giveîãž aî initiaì      valuå whicè thå useò maù incremenô oò decremenô bù usinç thå      '+§ oò '-§ keys® Thå defaulô incremenô ió 1¬ buô thió caî bå      changeä  bù typinç á numeriã key®  Anù non-numeriã keù aparô      from + and - will terminate the input. .pa Š*    Input Choice      Thå  useò maù enteò á numbeò betweeî ° anä 99®  Iæ á  singlå      digiô ió entered¬  iô shoulä bå followeä bù anù  non-numeriã      keù tï terminatå thå input®  Thå ¶ membranå keyó constitutå      thå seconä iãžnpuô choicå device®        *     Input String Usinç  thå  keyboard®   Stringó  arå  terminateä  bù  typinç      carriagå return. Elementó anä facilitieó noô implementeä iî thå firsô releaså oæ thå graphicó systeí arå aó follows:    1: Colour      2: Inquire cell array      3: General Drawing Primitives: (a) Arc (b) Pie Slice (c) Circle (d) Graphicó characteró foò uså witè printers.     4: Escape Op-codes: ãž (a) Tablet Status (b) Hard Copy carriagå return. Elementó anä facilitieó noô implementeä iî thå firsô releaså oæ thå graphicó systeí arå aó follows:    1: Colour      2: Inquire cell array      3: General Drawing Primitives: (a) Arc (b) Pie Slice (c) Circle (d) Graphicó characteró foò uså witè printers.     4: Escape Op-codes: ãž .HE DISK DRIVE .OP .FO # DISK DRIVE List of Contents Page INTRODUCTION 2 DESCRIPTION 2 General 2 Interfacãže Connections 3 Disk Drive Mechanism 6 Read/Write Head 6 Head Positioning Mechanism 6 Head Load Mechanism 6 Sensors and Detectors 6 Drive Switch Settings 6 Drive Specification ãž 8 DISKS 9 General 9 Disk Precautions 9 Disk Insertion/Removal 9 Write Protecting 10 Disk Format 10 List of Illustrations ãžFigure MicroFloppy Disk Drive 1 Interface block diagram 2 Connector location 3 Disk Drive Switch Settings 4 MicroFloppy Disk 5 .pa Š Figure 1. MicroFloppy Disk Drive INTRODUCTION Thió  chapteò  provideó informatioî oî thå standarä disë  driãžvå fitteä  withiî  thå Apricot¬  thå Sonù OA-D31Ö  MicroFloppù  Disë Drive¬   whicè   ió  characteriseä  bù  incorporatinç  á   singlå read/writå  heaä anä utilisinç 7° tracë single-sideä  MicroFloppù disks. Thå disë drivå ió mounteä oî á metaì chassió assemblù abovå thå Systeí Boarä iî thå Systeí Uniô anä helä iî positioî bù twï pairó of screws in each of the chassis side plates. Connectionó  froí thå disë drivå controller¬  thå  Floppù  Disë Interfacå oî thå Systeí Board¬  arå linkãžeä tï thå drivå viá á 26- waù ribboî cablå assembly®  Poweò supplù connectionó tï thå drivå alsï originatå froí thå Systeí Boarä anä arå provideä bù á 4-wirå cable assembly. DESCRIPTION General Thå  disë  drivå  containó alì thå  necessarù  electronicó  anä mechanicó  foò  transferrinç MFÍ encodeä seriaì datá betweeî  thå MicroFloppù diskó anä thå Systeí Board. Thå electronicó consisô oæ: (a© Thå interfacå tï thå disë controlleò ¨houseä  oî  á singlå prinãžteä circuiô controì boarä locateä aô thå baså oæ thå drive). (b© Á serieó oæ sensoró foò detectinç variouó conditionó withiî thå drivå (e.g®  Wheî thå heaä ió positioneä oveò Track 0 of the disk, when a disk is in the drive, etc.). (c© Thå read/writå heaä tranduceò circuitrù foò  readinç anä writinç datá from/tï thå disk. Š Thå  mechanicó  consisô oæ thå disë drivå mechanism¬  thå  disë loading/ejecô mechanisí,  anä thå mechanismó foò positãžioninç  anä engaginç thå read/writå heaä. Interface Connections Connectionó betweeî thå disë drivå anä thå Systeí Boarä consisô oæ fouò types»  MFÍ encodeä datá signals¬  controì inpuô signals¬ statuó  outpuô  signaló  anä poweò supplù lines®  Thå  latteò  ió supplieä  viá thå fouò wirå cablå assembly»  thå remaininç  threå typeó viá thå 26-waù ribboî cable®  Alì signaló supplieä viá  thå 26-waù ribboî cablå arå aô TTÌ logiã levels, aparô froí thå Indeø Pulse, which is driven by an oãžpen collector. Thå  functioî oæ eacè connectioî ió detaileä iî tabulaò  formaô followinç thå interfacå connectioî blocë diagraí below. Figure 2. Interface block diagram Š Figure 3. Connector Location Interface Connections OUTPUTS Readù Activå state¬ logiã low® Wheî activå, indicateó thaô ãž á disë ió withiî thå drive¬  thå drivå ió selected¬  anä thå  drivå motoò ió rotatinç aô thå normaì operationaì speeä (i.e® thå drivå ió availablå foò á datá transfeò operation)®  Thå timå takeî foò Readù tï bå seô activå afteò receivinç thå inpuô tï selecô thå drivå witè thå twï  otheò conditionó alreadù meô, ió oæ thå ordeò  oæ 0.µ us®  Thå  timå takeî foò Readù tï bå  seô  activå afteò  insertinç á diãžsë intï thå drivå witè thå  drivå alreadù selecteä, ió thå ordeò oæ onå second. Writå Activå state¬  logiã low® Wheî active¬ indicateó thaô Protecô  thå  disë  ió writå protected®  Iæ thå  drivå  ió  noô selected¬  thå outpuô ió seô tï logiã high¬ regardlesó of the disk status® Indeø  Indeø pulså whicè actó aó thå referencå foò thå starô oæ  á  track®  Shorô  duratioî  negativå  goinç  pulså (15° ãžtï 35° us)¬  generateä oncå peò revolutioî oæ thå disk (i.e® everù 100 mó aô normaì operationaì speed)® If thå drivå ió noô selected¬ thå outpuô ió helä aô logic high® Tracë 0° Activå state¬  logiã low® Wheî active¬ indicateó thaô thå  heaä ió positioneä oveò Tracë 0®  Iæ thå drivå ió noô  selected¬   thå  outpuô  ió  seô  tï  logiã  higè regardless of the position of the head. Reaä  MFÍ encodeä seriaì datá stãžreaí froí thå disk®  Iæ  thå Data drivå ió noô selected¬  thå outpuô ió forceä tï  logiã high® Š Interface Connections INPUTS Drivå Activå state¬  logiã low®  Wheî active¬  selectó  thå Select 0 drivå  foò operatioî, iæ thå drivå ió  configureä  aó drivå ° bù á switcè aô thå reaò oæ thå unit®  Drivå  Activå state¬  logiã low®  Wheî active¬  selectó thå Select 1 dãžrivå  foò operation¬  iæ thå drivå ió configureä  aó drivå 1 by a switch at the rear of the unit. Motoò Oî  Activå state¬  logiã low®  Hardwireä tï 0Ö  oî  thå Systeí Board®  Thå drivå ió configureä bù á switcè oî thå undersidå oæ thå uniô sï thaô thå drivå motoò  ió switcheä oî onlù wheî á disë ió withiî thå drive® Steð  Á  negativå goinç pulså generateä bù thå  disë  drivå controlleò  whicè moveó thå read/ãžwritå head¬  iæ  thå drivå  ió selecteä.  Eacè pulså causeó thå heaä tï bå moveä tï aî adjacenô tracë location¬ iî thå directioî specifieä bù thå directioî input. Directioî  Foò  eacè valiä steð pulse¬  thå heaä moveó  iî  onå tracë  locatioî towardó tracë 69¬  iæ  thå  directioî controì  linå ió aô logiã low» and onå tracë locatioî towardó  tracë 0¬  iæ aô logiã high®  Iæ thå heaä  ió alreadù  aô  eitheòãž tracë ° oò tracë 6¹  anä  á  steð pulså ió issueä witè thå directioî inpuô seô tï movå thå  heaä outsidå thå normaì tracë range¬  thå  heaä is held stationary. Heaä Activå state¬ logiã low® Wheî active¬ causeó thå disë Load tï makå contacô witè thå drivå head¬  iæ thå drivå ió selected®  Aî  indicatioî thaô thå heaä ió loadeä ió provideä  bù  thå  activitù indicatoò  oî  thå  fronô panel®  ãžIæ  thå drivå ió deselected¬  whilsô thå heaä loaä signaì ió stilì active¬ thå heaä remainó loaded® Writå Activå state¬  logiã low®  Wheî active;  enableó thå Gatå drivå  writå controì circuitó tï receivå  thå  writå datá  froí  thå  disë  controller»  switcheó  currenô througè tï thå read/writå head»  anä alsï enableó thå tunneì  eraså  head®  Seô tï thå inactivå higè  statå durinç disë reaä and all head positioningãž operations. Writå MFÍ encodeä seriaì data®  Changeó thå polaritù oæ thå Datá  currenô flowinç througè thå read/writå heaä oî  eacè negative-goinç transition¬  providinç thå  followinç conditionó arå met: 1. The drive is selected. 2. The Write Gate input is active. 3. A write unprotected disk is inserted. 4® Thå drivå motoò ió rotatinç aô operationaì speed® 5. The head has been loadedãž  and is stationary. ŠDisk Drive Mechanism Thå  disë  drivå mechanisí ió á brushlesó direcô  drivå  motor¬ whicè employó á velocitù servï controì circuiô tï ensurå thaô thå disë  rotateó  aô  á  constanô speeä oæ 60°  rpm®  Thå  drivå  ió configureä  sï thaô thå motoò rotateó onlù wheî á disë ió  withiî thå unit®  Removaì oæ thå disë froí thå drivå causeó thå motoò tï stop®  Thå timå takeî foò thå motoò tï reacè thå normaì operatinç speed¬  followinç  thå insertioî oæ á disk¬  ió thå ordeòãž oæ  onå second® Thå  servï controì circuiô alsï generateó thå indeø pulså  oncå peò revolutioî oæ thå disk® Read/Write Head Thå  heaä consistó oæ á read/writå elemenô anä á paiò of tunneì eraså  headó  whicè  providå guarä bandó  foò  adjacenô  tracks® Currenô  ió  supplieä tï thå read/writå elemenô oî receipô oæ  aî activå  Writå Gatå signaì froí thå disë  controller¬  whicè  alsï activateó thå tunneì eraså section® Head Positioning Mechanism Thå  heaä  positioniãžnç  mechanisí useó á steppinç motoò  anä  á guidå arí controlleä bù á needlå scre÷ tï preciselù positioî  thå read/writå  heaä  oveò  thå trackó oî thå disk®  Controì  oæ  thå movemenô  oæ  thå  heaä ió supplieä bù thå  Steð  anä  Directioî inputó  froí  thå disë controller®  Oî applicatioî oæ  thå  poweò supplies¬  thå  drivå automaticallù generates controì signaló  tï positioî thå heaä oveò Tracë 0® Head Load Mechanism Heaä  loadinç  ió controlleä bù thå Heaä Loaä signaì  froí  thãžå Systeí  Board®  Wheî  thå signaì ió active¬  á plungeò  causeó  á pressurå  paä  tï presó thå disë againsô thå head®  Thå  activitù indicatoò oî thå fronô paneì oæ thå uniô remainó illuminated¬  aó lonç aó thå heaä remainó loaded® Sensors and Detectors Á  serieó oæ photo-sensoró anä associateä detectoò circuitó arå fitteä iî thå drive®  Theså generatå statuó outpuô signaló tï thå disë controller¬ oî detectinç thå conditionó detaileä below. (a) A disk is within the driveãž (Ready). (b) The disk is write protected (Write Protect). (c) The head is positioned over Track 0 (Track 00). (d) The start of each track (Index Pulse). Drive Switch Settings Twï switcheó arå locateä oî thå drive¬  whicè arå seô accordinç tï  thå  applicatioî oæ thå drivå withiî thå system®  Onå  switcè Š(SW1©  determineó  whicè  oæ thå twï drivå selecô  inpuô  signaló switcè thå drivå tï aî operationaì condition®  Thå seconä  switcè (SW2© determineó thå methoä ãžoæ switchinç oî thå disë drivå motor. Thå drivå selecô switcè ió locateä aô thå reaò oæ thå uniô (seå Figurå 4)®  Iî singlå disë drivå systems¬  thå switcè ió seô  tï drivå positioî 0®  Iî duaì drivå systems¬ thå lefô hanä drivå (aó vieweä froí thå fronô oæ thå Systeí Unit© ió configureä aó  Drivå 0¬ anä thå righô hanä drivå is configureä aó Drivå 1. Thå motoò controì switcè ió locateä oî thå circuiô boarä iî thå baså oæ thå unit¬ jusô behinä thå fronô paneì (seå Figurå 4)® Thå switcèãž musô bå seô tï positioî B¬  sï thå disë motoò rotateó onlù wheî  á disë ió withiî thå drive®  Settinç thå switcè tï positioî A¬  wilì causå thå disë motoò tï rotate¬  regardlesó oæ whetheò á disë ió withiî thå unit or not® Drive Select Control Drive Motor Control Figure 4. Disk Drive Switch Settings .pa ŠDrive Specification Mediá  3.µ  incè  7° tracãžë  single-sideä  MicroFloppù Disks® Soft-sectoreä witè ¹ sectoró peò track¬ 51²   byteó   peò  sector¬  producinç  a totaì formatteä  datá  capacitù oæ  31µ  Kbytes  peò disk® Encodeä witè doublå densitù MFÍ data. Data Transfer 500 kbits/s. Rate Media Life More than 106passes/track. Track density 135 tracks per inch. Track-to-track 15 ms. access time Head Load Timãže 60 ms. Head Settling 15 ms. Time Disë Rotationaì 60° rpí (power-uð timå approx®  ± seconä afteò Speed insertion of the disk). Dimensions: Height 2.0 inches (51mm). Width 4.0 inches (102mm). Depth 5.1 inches (130mm). Weight 1.5 lbs. (700g). Current +12V supply: Typically 0.4A (max. 1.5A) Consumption +5V supply: Typically 0.6A (max. 0.8A) Environmental ãž  Conditionó: 1. Operating Temperature 40F to 115F (5C to 45C). Humiditù 20¥ tï 80¥ relativå humidity¬ witè á weô bulâ temperaturå oæ 85Æ (29C© anä nï condensation® 2. Storage Temperature -40F to 140F (-40C to 60C) Humiditù 5¥ tï 95¥ relativå humidity,(nï condensation). ŠDISKS General Notãžeº Tï ensurå completå compatibilitù witè thå Apricot¬ onlù ACÔ approveä  MicroFloppù diskó shoulä bå useä witè thå  disë  drive® Usinç non-ACÔ disks¬  noô manufactureä tï thå samå higè standard¬ maù  resulô  iî  intermittenô reaä anä  writå  errors¬  renderinç information stored on the disk totally unintelligible. Thå Sonù OA-D31Ö disë drivå useó 3.µ incè 7° tracë single-sideä MicroFloppù disks® Thå diskó arå encaseä iî á rigiä plastiã shelì anä  featurå aî automatiã shutteò anä á metaì cãženterinç hub® Twï  versionó  oæ MicroFloppù diskó exist¬  whicè  arå  directlù compatiblå  anä  interchangeable¬  thå onlù differenceó beinç  iî minoò  mechanicaì  details®  Thå  autï  shutteò  oæ  thå  earlieò versionó oæ thå diskó caî bå latcheä open¬  exposinç á portioî oæ thå disë surface®  Thå latcè ió releaseä bù squeezinç thå  corneò oæ  thå  disk¬  markeä bù thå arro÷ labelleä  "PINCH"®  Oî  lateò versionó oæ thå disk¬ thå shutteò cannoô bå latcheä open® Thå shutteò protectó thãžå disë mediá froí contaminatioî bù dust¬ dirô  oò  fingerprints¬  allowinç thå disë tï bå  easilù  handleä withouô  affectinç  thå integritù oæ storeä data®  Wheî  inserteä intï thå drivå, thå shutteò automaticallù slideó  open¬  allowinç thå  read/writå heaä oæ thå drivå accesó tï thå recordinç  media® Removaì froí thå drivå automaticallù closeó thå shutter. Thå  metaì  centerinç huâ ensureó thaô thå disë  ió  accuratelù positioned oî thå disë drivå motoò spindle® Disk Precautions ãž Thå  samå  precautionó applù tï thå MicroFloppù  diskó  aó  anù other magnetic recording media. Do not: (a) Touch the disk surface. (b© Allo÷ thå disë tï bå placeä iî thå proximitù oæ otheò magnetic materials or other sources of magnetic fields. (c) Expose the disks to heat or direct sunlight. (d) Attempt to clean the disk surface. Disk Insertion/Removal Inserô  thå  disë intï thå drivå shutteò sidå first¬  witè  thå metaì centerinç huâ faãžcinç downwards®  Thå disë shoulä slidå intï thå drivå witè thå minimuí degreå oæ force®  Immediatelù thå disë ió  inserted¬  thå  heaä ió momentarilù loadeä tï seaô  thå  disë properlù  ontï  thå drivå spindle®  Thió causeó thå  fronô  paneì activitù indicatoò tï bå brieflù illuminated®  Impropeò insertioî resultó iî thå disë noô beinç accepteä bù thå drive® Removå  thå disë bù pressinç thå fronô paneì disë ejecô button® Thå disë ejecô buttoî shoulä noô bå pressed¬  whilsô thå activitù Šiãžndicatoò ió illuminated. Write Protecting Thå methoä oæ writå protectinç thå disë ió differenô oî thå twï versionó  oæ disk®  Thå earlieò versionó featurå á Writå  Protecô tab¬  locateä  oî thå reaò oæ thå disë iî thå loweò right corner® Breakinç ofæ thå taâ preventó anù furtheò datá beinç writteî ontï thå disk®  Thå taâ theî shoulä bå inserteä intï thå bottoí oæ thå recesó aô righô angleó tï itó originaì orientatioî (i.e® aó closå aó possiblå tï thå loweò edgå oæ thå disk)® Writå protãžecteä diskó caî bå rewritteî on¬ bù movinç thå taâ tï thå toð oæ thå recess. Oî thå lateò versionó oæ thå disk¬ writå protectinç thå disë ió achieveä  bù  slidinç thå taâ tï thå loweò position¬  creatinç  á windo÷ iî thå loweò lefô corneò oæ thå disk® Tï allo÷ thå disë tï bå rewritteî onto¬ slidå thå tab bacë oveò thå window® Disk Format Eacè oæ thå 7° trackó oî thå disë ió divideä intï sectoró undeò softwarå controì (i.e® sofô sectored)¬ witè thå beginninç oæ eacè tracë  indicaãžteä bù thå indeø pulså generateä bù thå drivå  motoò assembly®   Thå  softwarå  formaô  choseî  foò  thå  diskó  ió  á derivatioî  oæ thå IBÍ systeí 3´ formaô foò ¸  incè  disks®  Thió useó  doublå densitù MFÍ encodeä data¬  witè ¹ sectoró peò  tracë anä  51² byteó peò sector®  Thå totaì storagå capacitù oæ thå  7° tracë disë ió thuó 31µ Kbytes oæ formatteä datá (9x70x51² bytes). Figurå 5® Microfloppù Disks ãž .HE SOUND GENERATION .FO # SOUND GENERATI0N List of Contents Page INTRODUCTION 2 DESCRIPTION 3 General 3 Tone ãžGeneration 4 Noise Generation 6 List of Illustrations Figure Sound Generator block diagram 1 .pa ŠINTRODUCTION Thå Sounä Generatoò ió locateä oî thå Systeí Boarä anä consistó oæ  thå elementó oæ circuitrù aó illustrateä oî thå blocëãž diagraí above®  Thå  Sounä Generatoò caî bå programmeä tï  producå  audiï frequencù  toneó (oæ uð tï 1µ kHz)¬  audiï noise¬  oò synthesizeä sounds¬ anä ió utiliseä by the BIOS tï generate: (a) Thå keyboarä keyclick. (b©  Á belì tonå tï acô aó á generaì warninç signaì by á number oæ applications. Figure 1. Sound Generator block diagram SG Pin Definitionãž D0 to D7 Data bus connection CK 2 MHz clock input CE Chip Enable input WE Write Enable input READY Ready status output AUDIO OUT Audio drive signal ŠDESCRIPTION General Thå  Texaó  Instrumentó SÎ 7648¹ Programmablå  Sounä  Generatoò (SG©   formó  thå  basió  oæ  thå  sounä  generatioî   circuitry® Internallù thå devicå consistóãž of: (a© Threå  programmablå  tonå  generators¬   eacè   witè associateä controì registers. (Tone generators 1, 2 , 3). (b© Á singlå programmablå noiså generatoò witè associateä controì registers. (c© Aî 8-biô paralleì interfacå foò transferrinç datá froí thå datá buó tï thå controì registers. (d) An audio output buffer stage. Eacè  generatoò consistó oæ twï cascadeä  sections»  á  sectioî whicè  produceó thå audiï signal» ãž anä á programmablå  attenuatoò sectioî whicè determineó thå audiï signaì outpuô leveì anä  alsï provideó thå controì foò switchinç thå generatoò off. Thå   audiï   outpuô  buffeò  ió  á   summinç   networë   whicè automaticallù  combineó  thå audiï signaì outputó froí thå  threå tonå generatoró anä thå noiså generatoò. Thå  systeí softwarå viewó thå Sounä Generatoò aó á  peripheraì port¬ witè aî addresó locatioî oæ 50È aó defineä bù thå SÇ selecô connection®  Duå tï thå relatãživelù slo÷ datá loadinç timå oæ thå SÇ  device¬ consecutivå  byteó oæ datá writteî tï thå Sounä Generatoò  shoulä bå  normallù separateä bù á delaù oæ aô leasô 3² clocë cycleó  oæ thå SÇ devicå inpuô clocë frequencù (16 us¬ i.e® approximatelù 8° processoò clocë cycles)® Tï  matcè thå slo÷ datá loadinç timå oæ thå Sounä Generatoò  tï thå  speeä oæ operatioî oæ thå CPÕ withouô introducinç  processoò waiô  states¬  thå controì datá ió noô writteî directlù tï thå SÇ devicå  buô latcheä throãžugè tï thå devicå inputó viá aî octaì  D- typå  latch®  Thå  SÇ theî loadó thå controì datá storeä  aô  thå outputó oæ thå octaì latcè intï thå selecteä controì register¬ bù issuinç  á  logiã  lo÷ statå oî thå  readù  controì  outpuô  anä utilisinç thå controì logiã circuitry. Thå  logiã  lo÷ statå oî thå readù controì  output¬  indicatinç thaô  thå  SÇ  ió  transferrinç controì  datá  intï  aî  internaì register¬  ió  automaticallù generateä oî receipô oæ á logiã  lo÷ statå aô thå CÅ inãžput® Thå effecô produceä bù thå logiã lo÷ statå oî thå readù controì outpuô ió tï extenä thå SÇ inpuô writå cyclå time¬  bù holdinç thå writå enablå inpuô iî thå activå lo÷  statå foò  approximatelù 3² periodó oæ thå 2MHú inpuô clocë  frequency® Thå  readù  outpuô  returnó tï logiã higè oî  completioî  oæ  thå internaì datá transfeò process. ŠTone Generation Tï generatå á audiï tone¬ initiallù requireó thå tonå generatoò tï  bå programmeä witè threå byteó oæ information¬  anä thå threãž å otheò  generatoró  tï  bå  switcheä  off®  Thå  firsô  twï  byteó determinå  thå  frequencù oæ thå audiï tonå anä  thå  thirä  bytå determineó thå leveì oæ thå produceä audiï tone® Oncå programmeä witè thå frequencù data¬ thå tonå generatoò caî bå switcheä oî anä off¬ usinç thå leveì controì bytå alone. Thå  frequencù oæ thå audiï tonå ió seô bù á 10-biô worä  whicè formó  parô  oæ thå firsô twï bytes®  Thå remaininç bitó  oæ  thå frequencù   byteó   selecô  thå  tonå  geneãžratoò   registeò   anä differentiatå  betweeî thå bytå containinç selectioî bitó anä thå bytå containinç frequencù datá only®  Thå formaô oæ thå frequencù byteó anä thå expressioî useä tï calculatå thå tonå frequencù  ió aó follows. Æ  ½  106 ¯ 16î wherå Æ ió  thå  tonå  frequencù anä   î  ió  thå  10-biô  binarù numbeò iî ãždecimaì format. D7 D0 1 R2 R1 R0 F3 F2 F1 F1 FIRST FREQUENCY BYTE LSB Frequency bits Register selection Byte differentiation D7 D0 0 x F9 F8 F7 F6 F5 F4 SECOND FREQUENCY BYTE ãž MSB Frequency bits Logic state immaterial Byte differentiation Š Register selection R2 R1 R0 Register 0 0 0 Tone Generator 1 Frequency 0 0 1 Tone Generator 1 Attenuation 0 1 0 Tone Generator 2 Frequency 0 1 1 Tone Generator 2 Attenuatiãžon 1 0 0 Tone Generator 3 Frequency 1 0 1 Tone Generator 3 Attenuation 1 1 0 Noise Generator Control 1 1 1 Noise Generator Attenuation Thå leveì oæ thå audiï tonå ió determineä bù á 4-biô worä whicè formó parô oæ thå leveì controì byte® Threå oæ thå remaininç bitó selecô thå generatoò attenuatoò registeò (aó detaileä above)¬ anä thå lasô remaininç biô signifieó thaô thå bytå containó generatoò registeò selãžectioî bits®  Thå formaô oæ thå leveì controì bytå ió aó follows. D7 D0 1 R2 R1 R0 A3 A2 A1 A0 LEVEL CONTROL BYTE Attenuation control Register selection Byte differentiation Thå  attenuatioî  controì  bitó allo÷ 1µ differenô  leveló  oæ attenuatioî tï bå switcheä iî fãžroí 0d tï 28d iî 2d steps¬  anä alsï  allo÷  thå  tonå  generatoò  tï  bå  switcheä   off®   Eacè individuaì  attenuatioî controì biô introduceó á differenô amounô oæ attenuatioî as detailed below. Attenuation Control A3 A2 A1 A0 Attenuation x x x 1 Introduces 2dB of attenuation x x 1 x Introduces 4dB of attenuation x 1 x x Introduces 8db of attenuatiãžon 1 x x x Introduces 16dB of attenuation 1 1 1 1 Switches Generator OFF NOTEº  Tonå generatoò ± ió normallù assigneä tï producå thå  belì tone®  Thå  frequencù  oæ thå belì tonå (800Hz© ió seô uð  durinç initialisatioî anä theî activateä anä inhibiteä usinç thå  leveì controì byte.„ ŠNoise Generation Thå  noiså  generatoò ió ablå tï functioî iî eitheò onå oæ  twï modes®  Thå firsô modå produceó "whitå noise¢ anä thå seconä modå produãžceó "periodiã noise"® Thå noiså sourcå foò thå generatoò ió baseä oî á feedbacë shifô registeò  networë witè thå shifô ratå determineä bù á  referencå frequency®  Thå  referencå  frequencù caî bå eitheò onå oæ  threå preseô  frequencies¬   oò  bå  determineä  bù  thå  audiï  signaì frequencù outpuô froí tonå generatoò 3. Thå choicå oæ modå anä referencå frequencù foò thå noiså sourcå ió  determineä  bù á singlå noiså controì byte®  Twï bitó oæ  thå noiså  controì  bytå definå thå refãž erencå frequencù anä  onå  biô defineó thå mode®  Threå oæ thå remaininç bitó arå useä tï selecô thå noiså generatoò controì registeò (aó defineä bù thå  registeò selectioî  tablå  iî thå tonå generatoò sectioî above)¬  anä  thå remaininç biô signifieó thaô thå bytå containó registeò selectioî bits® Thå formaô oæ thå noiså controì bytå ió aó follows. D7 D0 1 R2 R1 R0 x FB NF1 NF0 NOISE CONTROL BYTE ãž Selectó referencå Selects mode Immaterial Register selection Byte differentiation Reference selection NF1 NF0 Reference 0 0 3.90 kHz 0 1 1.95 kHz 1 0 ãž 975 Hz. 1 1 Tone Generator 3 .pa Š Mode selection FB Mode 0 "Periodic noise" 1 "White noise" Thå  leveì oæ thå noiså signaì ió determineä bù á leveì controì bytå whicè allowó á choicå oæ 1µ differenô leveló oæ noiså signaì tï  bå set¬  anä alsï enableó thå noiså generatoò tï bå  switcheä off®  Thå  formaô  oæ thå leveì controì bytå ió ideãžnticaì tï  thå formaô oæ thå leveì controì bytå describeä iî thå tonå  generatoò sectioî above® NOTEº  Thå  noiså  generatoò ió normallù assigneä  tï  producå  á keyclick¬  eacè  timå á keù ió presseä bù updatinç botè thå noiså generator register and the noise attenuator register. signaì tï  bå set¬  anä alsï enableó thå noiså generatoò tï bå  switcheä off®  Thå  formaô  oæ thå leveì controì bytå ió ideãž.HE SERIAL INTERFACE .fo # SERIAL INTERFACE List of Contents Page INTRODUCTION 2 DESCRIPTION 3 General ãž 3 SIO Overview 4 SIO Architecture  5 Processor Interface 8 Write Register Definition 9 Read Register Definition 19 SIO Interrupt Sequence 23 KEYBOARD COMMUNICATIONS 24 General ãž 24 Keyboard Connector Detail 25 Channel B Programming Details 26 PARALLEL INTERFACE INTERRUPTS 28 RS 232C COMMUNICATIONS 29 General 29 RS232C Connector Detail 30 Channel A Programming Details ãž 30 SIO PIN DETAIL 33 System Connections 34 Channel A Connections 35 Channel B Connections 37 List of Illustrations Figure Serial Interface block diagram 1 Keyboard Connector detail ãž 2 RS232C Connector detail 3 .pa Š Figure 1. Serial Interface block diagram .pa ŠINTRODUCTION Thå  Seriaì  Interfacå  ió  locateä oî  thå  Systeí  Boarä  anä consistó oæ thå elementó oæ circuitrù aó illustrateä oî thå blocë diagraí opposite®  Thå interfacå  provideó  twï  separatå  seriaì channels»  onå chanãž neì foò communicatioî betweeî thå Keyboarä anä thå Systeí Unit¬ thå seconä channeì foò communicatioî betweeî thå Apricoô anä externaì equipmenô viá aî RS232à link. Thå  seriaì  channeì betweeî thå Keyboarä anä thå  Systeí  Uniô supportó  fulì dupleø asynchronouó communicationó aô á fixeä bauä rate¬  anä  alsï carrieó thå hardwarå systeí reseô controì signaì whicè ió multiplexeä ontï thå Datá iî linå froí thå Keyboard. Thå  RS232à channeì  caî bå programmeä tï  operatå  iî  eitheò asynãžchronouó oò synchronouó modes¬ witè transmiô anä receivå bauä rateó  determineä  eitheò  viá thå  Programmablå  Intervaì  Timeò (TMR)¬ oò viá thå externaì datá communicationó equipment. Thå RS232C interfacå ió ablå tï support: (a© Asynchronouó communicationó witè 5¬  6¬  · oò ¸ bitó peò  characteò  anä  variouó choiceó oæ  stoð  bitó  anä paritù sense. (b© Biô  orienteä synchronouó communications¬  sucè  aó SDLà anä HDLC. ãž (c© Bytå orienteä synchronouó  communications¬  sucè  aó Monosynã anä Bisync. Á  furtheò functioî oæ thå Seriaì Interfacå ió tï  providå  thå Paralleì Interfacå oî thå Systeí Boarä witè á meanó oæ generatinç interrupô vectors¬  whicè acô aó pointeró tï associateä interrupô servicå routines®  Thió ió achieveä bù utilisinç sparå facilitieó in thå keyboarä seriaì channel® DESCRIPTION General Thå  Seriaì  Interfacå  consistó  of»   á  seriaì  input/outpuô contãžroller¬  á datá selector¬ á numbeò oæ linå drivers/receiveró anä  twï  connectoró (á 2µ piî D-typå femalå connectoò foò  thå RS232à channeì  anä  á ¹ piî D-typå  femalå  connectoò  foò  thå keyboarä link). Thå majoò circuiô elemenô oæ thå Seriaì Interfacå ió thå seriaì input/outpuô controlleò whicè ió á Ziloç Z8° SIO/0®  Thå SIÏ ió á programmablå  devicå  whicè  incorporateó alì thå  circuitrù  foò interfacinç  betweeî  thå systeí processoró anä  thå  twï  seriaì communicatioî  channeãžls®  Á descriptioî oæ eacè connectioî tï thå SIÏ ió provideä aô thå enä oæ the chapter. Thå  datá  selectoò allowó thå programmeò tï selecô  thå  clocë sourcå  whicè determineó thå transmiô anä receivå bauä rateó  foò thå RS232à channel. Š Duå  tï thå relativå complexitù oæ thå SIÏ compareä witè  otheò programmablå deviceó oî thå Systeí Board¬ á brieæ overvie÷ oæ thå devicå  ió  presenteä  iî thå  followinç  paragraphs®  Subsequenô paragraphó describå thå internaì structurå anä thå utilisaãžtioî oæ thå devicå withiî thå systeí iî morå detail. SIO Overview Thå SIÏ ió á peripheraì device¬  whicè performó thå functioî oæ aî  intelligenô two-channeì paralleì tï serial/seriaì tï paralleì converter®  Thå twï channeló (designateä Channeì Á anä Channeì B© arå  totallù independenô oæ eacè otheò anä caî bå  programmeä  tï operatå   iî  eitheò  asynchronouó  oò  synchronouó  seriaì  datá communicationó modes. Oncå  programmeä  witè thå requireä seriaì datá  communicationó moãžde¬  thå  processoró  arå ablå tï vie÷ thå SIÏ  aó  twï  simplå paralleì  input/outpuô  portó foò thå majoritù oæ  datá  transfeò operations»  onå  bi-directionaì porô foò eacè channel®  Thå  SIÏ provideó  alì  thå  necessarù  facilitieó  foò  organisinç   datá transferó oveò thå twï seriaì channels® Theså include: (a© Conversioî  oæ thå paralleì datá  intï  thå  correcô seriaì  datá  formaô foò transmissioî oveò thå  selecteä seriaì channel® Iî asynchronouó modes¬ãž thió involves thå automatiã  insertioî oæ start¬ stoð anä paritù bitó, anä assemblinç  thå paralleì datá intï thå correcô numbeò oæ serial bitó peò character® (b© Conversioî oæ the inpuô seriaì datá froí  thå  seriaì channeló intï paralleì form¬  anä checkinç thå  incominç datá foò errors®  Iî asynchronouó modes¬  thió  involveó strippinç  thå  start¬  stoð  anä paritù bitó  froí  thå serial daãžta anä checkinç for parity and framing errors. Wheî   operatinç  iî  synchronouó  modes¬   similaò   automatiã facilitieó  arå  availablå  withiî  thå  SIO¬  dependenô  oî  thå selecteä  mode® Iî Bisynã anä Monosync¬  pre-programmeä synã characteró anä CRà characteró  arå automaticallù inserteä durinç transmissions®  Thå SIÏ stripó synã characteró froí receiveä data¬  anä alsï analyseó thå  receiveä  datá  foò  errors¬   utilisinç  thå  receiveä  CRà characters. In SDLC and HDLC,ãž  the SIO performs the following functions: (a) Abort sequence generation and detection. (b) Zero insertion and deletion. (c) Flag insertion between messages. (d) Address field recognition. (e) I-field residue handling. (f) CRC generation and detection. Thå  bauä  rateó foò thå twï seriaì channeló arå determineä  bù clocë  sourceó externaì tï thå SIO®  Iî asynchronouó  modes¬  thå Šclockó  caî  bå divideä internallù withiî thå SIÏ  undeò  proãž graí control¬ prioò tï beinç useä tï seô thå bauä rates® Thió facilitù is not available in synchronous modes. Eacè  channeì  alsï  provideó  inputó  anä  outputó  whicè  arå specificallù tailoreä tï functioî aó modeí controì lineó foò  co- ordinatinç seriaì datá transfeò operations® Thå outputó arå undeò direcô  controì  bù thå programmer®  Thå inputó caî bå  monitoreä undeò  softwarå controì bù polling¬  oò bå programmeä tï generatå aî  interrupô  tï  thå  CPU®  Theså controì  lineó  caãž î  alsï  bå redefineä aó generaì purposå input and output controì signals® Thå SIÏ caî alsï bå programmeä tï generatå interruptó tï signaì tï  thå  processoró thå statuó oæ variouó  transmiô  anä  receivå conditionó  iî  thå twï communicatioî  channels®  Theså  include¬ receivå datá available¬ transmiô datá required¬ anä thå detectioî oæ variouó erroò conditions. Thå  interrupô structurå oæ thå SIÏ ió sucè thaô oî  generatinç aî interrupô tï thå CPU¬  iô caî alsï producå aî interrupô vãž ectoò internally¬  whicè defineó thå causå oæ thå interrupt®  Thió caî theî  bå  useä  bù thå CPÕ tï poinô  tï  aî  associateä  servicå routine®  Thå  vectoò  ió obtaineä froí thå SIÏ bù performinç  aî interrupô acknowledgå cycle. Thå  interrupô methoä oæ communicatioî betweeî thå SIO anä  thå CPÕ  ió  thå  onå  adopteä oî thå  Systeí  Board®  Thå  SIÏ  onlù generateó  aî  interrupô tï thå CPÕ wheî thå  devicå  requireó  á specifiã  servicinç  routinå  tï  bå  carrieä  out¬  leavinç  thãž å processoró freå tï servicå thå otheò deviceó oî thå board. Thå  SIÏ  interrupô  ió  noô wireä directlù tï thå  CPÕ  buô  ió supplieä viá thå Interrupô Controlleò (PIC)®  Thå PIà provideó  á vectoò tï thå CPÕ tï indicate thå devicå generatinç thå interrupt® Iæ  thå devicå ió thå SIO¬  thå actuaì procesó withiî thå  devicå requirinç  attentioî  ió theî specifieä bù thå  interrupô  vectoò froí thå SIO. SIÏ Architecture Internally, the SIO consists of four areas of ciãž rcuitry: (a) A Processor interface. (b) Internal interrupt control logic. (c© Thå twï independenô fulì dupleø seriaì communicatioî channels, channel A and channel B. Thå processoò interfacå handleó alì communicationó viá thå datá buó  betweeî thå processoró anä á serieó oæ internaì  registers¬ associateä  witè eacè oæ thå twï seriaì channels®  Theså  arå  oæ threå  differenô  types»  datá registers¬  commanä registeró  anä stãž atuó registers® Botè channeló havå twï datá registeró each¬  whicè arå accesseä bù  thå  processors»  onå  handleó thå  transmiô  datá  froí  thå Šprocessoró  (transmiô buffer)¬  anä onå storeó receivå datá  froí thå seriaì channel (receivå buffer)® Thå  modå  anä operatioî oæ eacè channeì ió determineä  bù  thå contentó  oæ thå command registeró (Writå Registers)®  Theså  arå initialiseä  witè  controì  wordó  prioò  tï  anù  datá  transfeò oveò  thå  twï  seriaì channels¬  anä maãž ù  bå  modifieä  aó  datá transfeò operationó proceed® Seveî Writå Registeró arå associateä witè eacè channel®  Aî eightè Writå Register¬ whicè ió locateä iî channeì  ió shareä bù botè channels® Thå   informatioî  containeä  iî  thå  statuó  registeró  (Reaä Registers©  indicatå  thå statuó withiî eacè  channel®  Twï  Reaä Registeró  arå  associateä witè eacè channel®  Á  thirä  registeò accesseä viá channeì  ió commoî tï botè channels® Thå  interrupô  controì logiã sectioãž î oæ thå  SIÏ  assignó  thå prioritù  tï  thå variouó sourceó oæ  interrupts¬  generateó  thå interrupô  outpuô  tï thå PIC anä produceó thå interrupô  vector® Thå  prioritù  oæ thå interruptó ió fixeä witè channeì  Á  alwayó assigneä á higheò prioritù thaî channeì B®  Thå ordeò oæ prioritù assigneä  withiî  eacè channeì ió  receiveò  interruptó  (highesô priority)¬   followeä  bù  transmitteò  interrupts¬  followeä  bù external/statuó interruptó (lowesô priority)® Separatå  transmiô aãž nä receivå datá pathó arå  provideä  withiî thå twï seriaì communications channels. Thå  receiveò  portó arå quadruplù buffereä bù aî  inpuô  shifô registeò anä threå storagå registers® Thå shifô registeò convertó thå incominç receivå serial datá intï á paralleì byte®  Thå threå storagå  registeró arå configureä iî á FIFÏ (firsô iî firsô  out© arrangement® Thå firsô paralleì datá bytå froí thå shifô registeò ió  loadeä  intï  thå bottoí oæ thå FIFÏ stacë anä  theî  shifteä througè tï thå ãž!toð aô á rate¬ determineä bù aî internaì clock® Thå  registeò  aô  thå toð oæ thå stacë ió thå  receivå  buffeò whicè actó aó thå storagå buffeò foò thå receivå characteò  untiì reaä  bù  thå processors®  Readinç thå characteò iî  thå  receivå buffeò automaticallù transferó thå nexô characteò (iæ any© tï thå toð oæ thå stack. Erroò  flagó  associateä witè eacè receivå characteò  arå  alsï buffereä  bù  á similaò arrangement®  Theså arå loadeä  intï  thå registeò  oæ á paralleì receivãž!å erroò FIFÏ stacë aô thå samå timå aó  thå  character®  Eacè timå thå receivå characteò  ió  shifteä througè  thå  characteò FIFÏ stack¬  thå erroò  flagó  arå  moveä accordingly®  Thå  toð oæ thå receivå erroò FIFÏ stacë ió onå  oæ thå Reaä Registers. Thå  contentó  oæ thió Reaä Registeò reflecô thå statuó oæ  thå characteò storeä iî thå receivå buffer¬  buô maù alsï contaiî anù receiveò  overruî  anä  paritù  erroró  receiveä  froí   previouó characters®  Theså twï erroò conditionó remãž!aiî withiî thå  statuó registeò, eveî wheî ne÷ characteò erroò flagó arå  loaded¬  untiì Šcleareä bù aî erroò reseô command® Iæ thå  characteò  FIFÏ  stacë  ió  fulì  (i.e. containó  threå characters©  anä  thå CPÕ failó tï reaä thå characteò withiî  thå receivå  buffeò  beforå anotheò receivå characteò ió supplieä  tï thå stack¬  thå lasô characteò placeä iî thå stacë ió overwritteî witè thå ne÷ character¬ anä thå receiveò overruî flaç ió recordeä iî  thå  correspondinç registeò iîãž! thå receivå erroò FIFÏ  stack® Thå firsô twï characteró iî thå stacë arå neveò overwritten¬ eveî iæ   morå  characteró  arå  received»   thå  lasô  characteò   ió continuouslù overwritten. Erroò  conditionó storeä iî thå FIFÏ stacë caî bå programmeä tï generatå aî interrupô tï thå CPU¬  oî beinç loadeä intï thå  Reaä Registeò aô thå toð oæ thå stack® Iî  thå  asynchronouó mode¬  usinç 8 bitó  peò  character¬  thå seriaì  receivå datá ió strippeä oæ thå start¬  stoð  anä  paritù ãž! bits¬  prioò tï beinç supplieä tï thå seriaì shifô register®  Foò characteò  lengthó  oæ lesó thaî ¸ bits¬  thå  receiveò  circuitó automaticallù inserô logiã 1'ó iî thå mosô significanô placeó  tï assemblå  á bytå oæ data¬  iæ á paritù biô ió noô includeä  witè thå  character®  Iæ á paritù biô ió included¬  thå paritù biô  ió alsï assembleä witè thå bitó oæ thå character¬ witè anù remaininç bitó seô tï logiã 1®  Foò example¬ á 5-biô receivå characteò witè á  paritù biô ió assembleä iî thå ãž!receivå buffeò iî thå followinç format: 1 1 P D4 D3 D2 D1 D0 D = 5-bit character. P = Parity bit. Iî  thå bytå orienteä synchronouó modes¬  Monosynã anä  Bisync¬ receivå  datá  ió noô transferreä tï thå  receivå  FIFÏ  registeò stacë untiì characteò synchronisatioî ió established® Detectinç á bytå  oæ receivå datá whicè matcheó á synã characteò storeä iî  áãž! Writå Registeò establisheó synchronisatioî iî Monosync® Detectinç twï  consecutivå  byteó  oæ  receivå datá whicè  matcè  thå  synã characteró  storeä  iî  twï oæ thå  Writå  Registeró  establisheó synchronisatioî iî Bisync. Searchinç  foò  thå characteò synã ió achieveä bù  programminç thå  channeì  tï operatå iî thå firsô phaså  oæ  thå  synchronouó receptioî process¬ termeä thå hunô phase® Thå seconä phaså ió thå actuaì   receptioî   oæ  data¬   wherå  thå  receivå  datá   ió autãž!omaticallù transferreä tï thå FIFÏ stack¬  afteò detectinç thå characteò sync® Alsï  includeä iî thå receivå patè iî synchronouó modes¬  ió  á CRà erroò detectioî circuiô whicè setó aî erroò flaç accordinç tï thå resulô oæ CRà comparisons. Š Thå  receiveò  circuitó iî thå biô orienteä  synchronouó  modeó operatå   iî  á  similaò  manneò  tï  thå  bytå  orienteä  modes¬ operatinç  witè twï separatå phases¬  á hunô phaså anä á  receivå phase®  Receivå  datá  ió  noô transferreä tï  thå  reãž !ceivå  FIFÏ registeò  stacë  untiì thå hunô phaså ió  sucessfullù  completed® Thió requireó detectinç aî openinç flaç sequencå correspondinç tï á flaç pattern¬  storeä iî onå oæ thå Writå Registers®  Receptioî ió  terminateä  oî detectinç thå closinç flaç aô thå enä  oæ  thå messagå  (EOM)®  Thió preventó anù furtheò datá beinç supplieä tï thå FIFÏ registeò stack® Thå receivå datá ió alsï supplieä tï thå CRà erroò detectioî circuits. Thå  transmitteò sectioî oæ thå seriaì channels¬  consiãž"sô oæ aî 8-biô  datá  registeò  (thå  transmiô  buffer)¬   supplieä   witè characteò  datá froí thå processors¬  anä á 20-biô transmiô shifô register®  Thå  shifô registeò convertó thå paralleì datá iî  thå transmiô buffeò intï seriaì formaô anä alsï performó á varietù oæ otheò functionó dependinç oî thå modå oæ operation® Iî thå asynchronouó mode¬  thå datá froí thå transmiô buffeò ió automaticallù  formatteä witè start¬  stoð anä paritù bitó withiî thå shifô register¬ prioò tï transmisãž"sion® Iî Monosynã anä Bisync¬  thå shifô registeò ió loadeä witè  thå synã characteró storeä iî thå Writå Registers¬  aô thå  beginninç oæ  thå  message¬  anä  theî  datá froí thå  transmiô  buffeò  aó transmissioî  proceeds®  Thå  shifô registeò  alsï  supplieó  thå seriaì datá tï thå CRà generator¬ whicè produceó thå twï bytå CRà aô thå enä oæ thå message. Iî  thå biô orienteä modes¬  thå shifô registeò ió loadeä  witè thå flagó storeä iî thå Writå Register¬  aô thå beginninç anä enãž"ä oæ  thå message®  Thå shifô registeò supplieó thå seriaì datá  tï thå  CRà generatoò whicè generateó thå 2-bytå CRà aô thå enä  oæ thå data field¬ anä tï thå transmiô datá output® Foò  characteò lengthó oæ lesó thaî 8 bits¬ thå characteòs senô tï  thå  transmiô  buffeò havå tï  bå  righô  justified¬  bù  thå programmer®  Thå  logiã  statå  oæ thå unuseä  bitó  withiî  eacè characteò  bytå  (MSB© arå immateriaì foò characteò lengthó oæ  ¶ anä 7 bits¬ sincå thå extrá bitó arå automaticaãž"llù ignoreä bù thå SIO® Foò á 5-biô character¬ thå unuseä bitó havå tï bå programmeä witè logiã 0's®  Characteò lengthó oæ lesó thaî 5 bitó requirå  á combinatioî oæ logiã 1'ó anä logiã 0's¬ tï bå inserteä iî thå MS as detailed in a later section. Processor Interface Thå connectionó tï thå SIÏ processoò interfacå arå detaileä  iî thå  tablå  "Systeí Connections¢ aô thå enä oæ thå  section®  Thå interfacå  handleó  thå transfeò oæ  data¬  commandó  anä  statuó informatioî (viá thå ãž"8-biô bi-directionaì peripheraló  datá bus)¬ betweeî  thå  processoró anä thå serieó oæ addressablå  registeró withiî thå SIO. Š Thå  systeí  softwarå  viewó thå  SIÏ  aó  fouò  bi-directionaì peripheraì ports¬  locateä iî thå systeí input/outpuô space®  Thå porô  addresses¬  aó  defineä  bù thå SIÏ selecô anä  thå  systeí addresó buó connections¬ arå detaileä below® Address Port 60H Channel A transmit/receive data 62H ãž" Channel A commands/status 64H Channel B transmit/receive data 66H Channel B commands/status Writinç  datá  tï thå I/Ï addresó locatioî 60È loadó datá  intï thå  transmiô  buffeò oæ channeì A»  readinç datá froí  thå  samå locatioî accesseó datá storeä iî thå receivå buffeò oæ channeì A® Similarly¬  writinç  datá tï thå I/Ï addresó locatioî  64È  loadó datá intï thå transmiô buffeò oæ channeì B» readinç datá froí thå samå  locatioî  accesseó  datá storeãž"ä iî thå  receivå  buffeò  oæ channeì B® Writinç  datá  tï thå Writå Registeró (commanä  registers©  anä readinç  datá  froí thå Reaä Registeró (statuó registers© iî  thå twï channels¬  generallù requireó twï datá transfers®  Thå  firsô transfeò  ió  á  writå  tï thå  commands/statuó  addresó  oæ  thå channel¬  anä  provideó  thå SIÏ witè á pointeò tï determinå  thå registeò foò thå nexô reaä oò writå operation. Iæ thå nexô operatioî ió writinç tï thå command/statuó  addresó locatioãž"n¬  á  commanä  bytå  ió loadeä intï  thå  Writå  Registeò specifieä  bù thå pointer®  Iæ thå nexô operatioî ió readinç froí thå commands/statuó location¬  á statuó bytå ió accesseä froí thå Reaä Registeò specifieä bù thå pointer® Followinç  thå seconä transfeò operatioî thå pointeò withiî thå SIÏ ió alwayó cleareä tï zero. Write Register Definition Botè  channeló  contaiî  seveî  Writå  Registeró  each¬   whicè configurå thå SIÏ tï matcè thå desireä modå anä application® Fivå ãž " oæ  theså registeró arå commanä registeró whicè definå thå  basiã modå oæ operatioî (e.g®  asynchronous)¬  anä configuratioî oæ thå channeì  withiî  thå modå (e.g®  numbeò oæ  bitó  peò  character¬ etc.)®  Thå twï otheò registeró arå synã characteò registers®  Aî eightè  register¬  whicè ió writteî tï viá channeì  ió commoî tï botè  channeló  anä ió programmeä witè thå baså  addresó  oæ  thå interrupô vector. Á  summarù oæ thå functionó oæ thå Writå Registeró ió  provideä iî  tabulaò fãž#ormaô oî thå nexô page®  Thió ió followeä bù á  morå detaileä   descriptioî  oæ  thå  commandó  foò  eacè   individuaì Šregister. Thå  onlù constrainô oî thå ordeò oæ programminç thå  registeró ió thaô initialisinç eacè channeì oæ thå SIÏ followinç á hardwarå systeí reseô oò á softwarå channeì reset¬ requireó thå parameteró oæ  Writå Registeò ´ tï bå issueä beforå thå  parameters/commandó oæ Writå Registeró 1¬ 3¬ 5¬ (¶ anä · iæ used). Aó   á   generaì  rule¬   iæ  changinç  froí  onå   ãž#operationaì configuratioî  tï  anotheò  (e.g®  8-biô  asynchronouó  tï  7-biô asynchronous)¬   thå  wholå  initialisatioî  sequencå  shoulä  bå repeateä witè thå ne÷ parameters® Write Register Summary Writå  Allowó thå programmeò tï perforí á numbeò oæ  basiã Registeò ° reseô functionó iî additioî tï actinç aó thå pointeò tï  selecô thå registeò foò thå nexô  command/statuó transfeò operation. Wriãž#tå  Containó thå bitó whicè, selecô thå interrupô modå, Registeò ± allo÷ thå interruptó tï bå enabled/masked¬  anä alsï controì  thå  functioî  oæ thå DMÁ  controì  output¬ W/RDY® Writå Thió registeò ió programmeä witè thå baså addresó oæ Registeò ² aî interrupô vectoò anä ió addresseä througè channeì  only. Writå  Thå  bitó  writteî tï thió  registeò  configurå  anä Registeò ³ control thå channeì receiveò circuitry. ãž# Writå  Thió registeò ió programmeä witè bitó whicè  selecô Registeò ´ thå modå oæ operatioî (asynchronouó oò synchronous)¬ anä  somå  oæ  thå  operationaì  parameteró  oæ  thå selecteä mode. Writå  Thå  bitó  writteî tï thió  registeò  configurå  anä Registeò µ control the channeì transmiô circuitry. Writå Thió registeò ió programmeä witè á synã characteò iî Registeò ¶ Monosynã anä Bisync¬ anä á checë addresó iî thå  biô ãž# orienteä synchronouó modes. Writå Thió registeò ió programmeä witè á synã characteò iî Registeò · Monosynã anä Bisync¬ anä á flaç characteò iî thå biô orienteä synchronouó modes® .pa Š Writå Registeò 0.„ D7 D6 D5 D4 D3 D2 D1 D0 WR0 Pointers ãž# 0 0 0 Register 0 0 0 1 Register 1 ° ± ° Registeò ² 0 1 1 Register 3 1 0 0 Register 4 1 0 1 Register 5 1 1 0 Register 6 1 1 1ãž# Register 7 Command Operation 0 0 0 Null code Command Operation 0 0 1 SDLC Send Abort ° ± ° Reseô Ext/Status Interrupts 0 1 1 Channel Reset ãž# 1 0 0 Reset Rx Int. on 1st character 1 0 1 Reset Tx Int. pending 1 1 0 Error reset ± ± ± Returî froí Interrupô (Ch.A only) Auxiliary Resets 0 0 Null code 0 1 Reset Rx CRC checker 1 0 Reset Tx CRC generator 1 1 Reset Transmit Underrun/EOM latch Pointeró (ãž #D° tï D2).„ Theså bitó signifù thå registeò foò thå nexô command/statuó  transfeò operation®  Iæ thå nexô operatioî  ió  á write¬  thå  pointeò  specifieó  á writå register®  Iæ  thå  nexô operatioî  ió  á  read¬  thå pointeò specifieó á  reaä  register® Followinç  á  reaä oò writå tï anù  registeò  (excepô  WR0)¬  thå pointeò  pointó  tï  registeò ° (i.e®  Writå Registeò °  oò  Reaä Registeò 0). Commandó (D³ tï D5).„ Theså bitó specifù eighô differenô commands¬ the function of which are dãž$etailed below. 1® Nulì Code® Thió commanä enableó thå programmeò tï specifù thå nexô  registeò  foò á command/statuó transfeò usinç thå  pointeò bits¬ withouô affectinç thå operatioî oæ thå SIO. 2® SDLà Senä Abort®  Useä onlù iî thå biô orienteä  synchronouó modes®  Thå  commanä causeó thå SIÏ tï generatå aî aborô sequencå whicè  informó  thå  receiveò oæ datá froí thå SIÏ  tï  terminatå reception. Š3® Reseô  Ext/Statuó  Interrupts®  Afteò aî Externaì  interrupô (causeä  bù  á changãž$å oæ statå oî á modeí controì  input)¬  oò  á Statuó interrupô (causeä bù detectinç á break/abort¯ conditioî iî receivå  datá  oò á transmiô underrun/EOÍ conditioî  iî  transmiô data)¬  correspondinç  statuó  bitó withiî Reaä  Registeò  °  arå latched®  Thió  commanä  re-enableó thå bitó anä  allowó  furtheò interruptó tï occur® 4® Channeì Reset®  Thió commanä performó thå samå functioî aó á hardwarå  reseô buô oî thå specifieä channeì  only®  Issuinç  thå commanä  tï channeì Á alsï rãž$esetó thå interrupô  logic¬  clearinç anù  currenô anä alì pendinç interrupts®  Alì Writå Registeró iî thå channeì musô bå reprogrammed¬ followinç thå command. 5® Reseô Rø Interrupô oî Firsô Character®  Iæ thå Interrupô oî Firsô  Receivå  Characteò Modå ió iî operatioî (bitó ³ anä  ´  oæ WR1)¬ aî interrupô ió generateä oî receivinç thå firsô character® Aô thå enä oæ thå message¬  thió commanä ió issueä tï  reactivatå thå mode. 6® Reseô  Tø Interrupô Pending®  Iæ thå Transmiô Interãž$rupô ió enableä (biô ± oæ WR1)¬ thå SIÏ generateó aî interrupô everù timå thå  transmiô  buffeò ió empty®  Issuinç thå Reseô  Tø  Interrupô Pendinç command¬ resetó thå transmiô interrupt¬ anä preventó thå interrupô beinç raiseä agaiî untiì thå transmiô buffeò ió loadeä witè á characteò anä becomeó emptù again. 7® Erroò Reset®  Paritù anä Overruî erroró arå latcheä intï Reaä Registeò  ± (thå statuó registeò aô thå toð oæ thå receivå  erroò FIFÏ  stack)®  Theså erroò conditionó remaiî withãž$iî thå  registeò untiì thå Erroò Reseô Commanä ió issued. 8® Returî froí Interrupt® Thió commanä ió useä tï signifù tï thå SIÏ  thaô thå interrupô routinå iî servicå specifieä bù thå  lasô interrupô  vectoò supplieä tï thå CPÕ haó  beeî  completed®  Thå commanä  ió  issueä  througè channeì Á onlù anä resetó  thå  in- servicå interrupô withiî thå SIO¬ anä allowó thå highesô prioritù interrupô pendinç (iæ any© tï interrupô thå CPU® Auxiliarù Resetó (D6¬  D7).„ Theså bitó specifù fouòãž$ commands¬ thå functioî oæ whicè arå as described below. 1® Nulì Codå performó thå samå functioî aó previouslù describeä foò thå Nulì Codå oæ thå Commanä bits® 2® Reseô Rø CRà Checker®  Thió commanä resetó  thå  CRà erroò detectioî circuitrù located iî thå channel receivår circuit. 3® Reseô Tø CRà Generator® Thió commanä resetó thå CRà generatoò located in the channel transmitter circuit. 4® Reseô Tø Underrun/EOM® Wheî thå SIÏ detectó eitheò á Transmiô Underruî conditioî oò ãž$thå Enä oæ á Messagå (EOM)¬ á correspondinç biô  ió seô withiî Reaä Registeò ° (biô 6)®  Thå biô ió reseô  bù issuinç thió command® Š Write Register 1 D7 D6 D5 D4 D3 D2 D1 D0 WR1 Ext. Int Enable Tx Int Enable Statuó affectó vectoò (Channel B only) ãž$ Rx Int control 0 0 Mask Rx Interrupts. 0 1 Interrupt on 1st. Rx character. ±  °  Interrupô oî alì  Rx characters¬ paritù affectó vectoò. ± ± Interrupô oî alì Rx characters¬ ãž $ paritù does not affect vector. Ready Control (ch.A only) Ready on Rx/Tx Ready Function Ready Enable Ext® Inô Enablå (D0)®  Thå logiã statå oæ thió biô  determineó whetheò  thå External/Statuó interruptó arå enableä (logiã  high© oò maskeä (logiã low)®  Iæ enabled¬ aî interrupô ió produceä aó á result of the following conditions. 1. Transiãž%tions on the modem control lines; DCD, CTS, or SYNC. 2. Detecting a break or abort condition in the receive data. 3® Aô thå starô oæ transmissioî oæ eitheò CRà oò synã characters¬ iî  synchronouó  modes¬  wheî  thå  Transmiô  Underrun/EOÍ  latcè becomes set. Tø Inô Enablå (D1)®  Thå logiã statå oî  thió  biô  determineó whetheò  thå transmiô interrupô ió enableä (logiã high© oò maskeä (logiã  low)®  Iæ  enabled¬  aî interrrupô ió produceä  wheî  thå transmit buffer becomes empty. ãž%Statuó Affectó Vectoò (D2)® Thió biô ió activå onlù iî channeì B® Iæ  seô tï logiã low¬  thå interrupô vectoò programmeä  iî  Writå Registeò  ²  ió  supplieä  tï  thå  CPU¬   durinç  thå  interrupô acknowledgå  cycle®  Iæ seô tï logiã high¬  thå interrupô  vectoò supplieä  tï  thå CPÕ ió modifieä accordinç tï  thå  interruptinç condition as detailed on the next page. Š V7 V6 V5 V4 V3 V2 V1 V0 Interrupt Vector Modified ãž%Vector bits Vectoò bitó aó programmeä into Write Register 2 Modified Vector Bits V3 V2 V1 Interrupt Condition 0 0 0 Ch.B Transmit buffer empty 0 0 1 Ch.B Ext/status Interrupt 0 1 0 Ch.B Receive Character Available 0 1 1 Ch.B Special Receive Condition * ãž% 1 0 0 Ch.A Transmit buffer empty 1 0 1 Ch.A Ext/status Interrupt 1 1 0 Ch.A Receive Character Available 1 1 1 Ch.A Special Receive Condition * ª  Speciaì  Receivå  Conditionó  includå  Paritù  error¬  Rø Overrun Error, Framing Error, End of Frame (SDLC). Rø Inô Controì bitó (D3¬ D4)® Theså twï bitó selecô thå variouó receivå conditionó ablå to generate aî interrupô. 1® Masë Rø Interrupts® Disableó alì receivå interãž%rupts. 2® Interrupô oî 1sô Rø Character®  Enableó aî interrupô tï  bå generateä oî detecting: (a) Thå firsô receivå characteò in the receive buffer. (b) Any speciaì receivå condition. 3® Interrupô oî alì Rø Characters¬ paritù affectó vector® Enableó aî interrupô tï bå generateä oî detecting: (a) Any receive character within the receive buffer. (b) Any special receive condition. 4® Interrupô oî alì Rø Characters¬ paritù doeó noô affecô vector® Enãž%ables an interrupt to be generated on detecting: (a) Any receive character within the receive buffer. (b© Anù  speciaì receivå conditioî aparô froí  á  Paritù error. Readù Controló (Dµ tï D7).„ Theså threå bitó controì thå statå oæ thå  W/RDYÁ outpuô oæ channeì A¬  whicè ió connecteä tï  thå  DMÁ requesô  linå DRQ² oæ thå Inpuô Outpuô Processoò (IOP)®  Á W/RDY Šoutpuô  ió  noô  provideä  oî á Z8°  SIO/0¬  sï  theså  bitó  arå redundanô  iî channeì B®  Thå funãž%ctioî oæ thå threå bitó  arå  aó detaileä below. 1® Readù Oî Rx/Tø (D5)® Witè thå Readù Functioî anä Readù Enablå bitó  seô  tï  logiã high¬  thå conditioî foò  generatinç  á  DMÁ requesô ió dependenô oî thå statå oæ thå Readù Oî Rx/Tø  bit¬  aó follows: (a© Wheî programmed tï logiã low¬ thå DMÁ requesô linå ió seô anä reseô accordinç tï whetheò thå transmiô  buffeò ió  emptù  oò full®  Everù timå thå transmiô  buffeò  ió empty¬ thå SIÏ setó W/RDYãž%Á tï logiã low¬ whicè signifieó tï  thå IOÐ thaô transmiô datá ió required®  Everù timå thå  IOÐ respondó bù writing a new bytå oæ  datá  intï thå transmiô buffer¬ thå SIÏ resetó thå W/RDYÁ outpuô tï logiã high® (b© Wheî programmeä tï logiã high¬ thå DMÁ requesô linå ió seô anä reseô accordinç tï whetheò thå receivå buffeò ió emptù oò full® Everù timå thå receivå buffeò ió full¬ thå SIÏ setó W/RDãž %YÁ tï logiã low¬ whicè signifieó tï thå IOР thaô receivå datá ió available®  Everù timå thå IOÐ respondó bù readinç thå bytå oæ data¬ thå SIÏ resetó thå W/RDYA output to logic high. 2. Readù Functioî (D6)®  Thió biô determineó whetheò thå  W/RDYÁ outpuô  functionó aó á Readù outpuô (biô seô tï logiã  high©  foò DMÁ transferó oò á Waiô outpuô (biô seô tï logiã low© tï thå CPU® Sincå  thå outpuô ió wireä tï thå IOP¬  thå functioî requireä  ió Ready. ãž&3® Readù Enablå (D7)®  Iæ thió biô ió seô tï logiã  high¬  thå W/RDYÁ  outpuô  ió  ablå tï initiatå DMÁ  transferó  aó  detaileä above®  Iæ seô tï logiã low¬ thå statå oî thå DMÁ requesô linå ió set permanently inactive (logic high). Write Register 2 D7 D6 D5 D4 D3 D2 D1 D0 WR2 Interrupô Vectoò (Channel B only) Writå  Registeò  ² ió programmeä witè thå baså addresó foò  thå interrupôãž&  vectoò  supplieä  tï  thå  CPÕ  durinç  thå  interrupô acknowledgå cycle®  Iæ thå Statuó Affectó Vectoò biô withiî Writå Registeò ± (WR1¬ D2© ió seô tï logiã high¬  thå interrupô vectoò supplieä  tï thå CPÕ ió thå baså addresó witè thå LS modifieä aó previouslù described®  Iæ thå Statuó Affectó Vectoò biô ió seô tï logiã low¬  thå interrupô vectoò supplieä tï thå CPÕ ió thå  baså addresó unmodified® Š Write Register 3 D7 D6 D5 D4 D3 D2 D1 ãž& D0 WR3 Rx Enable Sync Char Load Inhibit Address search mode (SDLC) Rx CRC Enable Enter Hunt mode Auto Enables 0 0 5 bits/character ãž& 1 0 6 bits/character 0 1 7 bits/character 1 1 8 bits/character Rø Enablå (D0)®  Iæ seô tï logiã high¬  thå receiveò circuitó arå enableä tï accepô datá froí thå seriaì link® Iæ seô tï logiã low¬ thå receiveò circuitó arå disabled® Synã Characteò Loaä Inhibiô (D1)®  Settinç thió biô tï logiã higè preventó  anù synã characteró beinç loadeä intï thå receivå  FIFÏ stack.   Addresó Searcè Modå (D2)®  Iæ á biô orienteä syncronouó modå  ióãž& selecteä anä thió biô ió seô tï logiã high¬  onlù messageó  witè aî  addresó  (followinç  thå openinç flag©  matchinç  eitheò  thå programmeä  addresó  iî  Writå Registeò ¶ oò thå  globaì addresó (FFH)¬  arå  accepteä bù thå receiveò circuits®  Iæ seô tï  logiã low¬ nï address searcè ió carrieä out. Rø CRà Enablå (D3)® Thió biô enableó (logiã high)/disableó (logiã low) the receiver CRC error detection circuits. Enteò Hunô Modå (D4)®  Thå Hunô modå iî  synchronouó  modeó  ió autoãž&maticallù   entereä   followinç   á   reset®   Iæ   characteò synchronisatioî  ió losô (anù Synã mode© oò thå incominç datá  ió noô requireä (SDLC)¬  thå hunô phaså caî bå re-entereä bù settinç D´ tï logiã high® Autï Enableó (D5).„ Settinç thió biô tï logic higè allowó thå  twï modeí inpuô controì lines¬  DCÄ anä CTÓ tï controì datá transferó oveò  thå  seriaì  datá  link®  DCÄ  controló  thå  SIÏ  receiveò circuits¬ CTÓ thå transmitteò circuits® Rø bits/characteò (D6¬ D7)®  Thå coãž&mbinatioî oæ theså twï  bitó determinå  thå  numbeò  oæ  receivå  bitó  assembleä  tï  forí  á character. Š Write Register 4 D7 D6 D5 D4 D3 D2 D1 D0 WR4 Parity Enable Parity Even/odd Mode Select 0 0 Enable Sync Mode ãž& 0 1 1 stop bit/character 1 0 1.5 stop bits/character 1 1 2 stop bits/character Sync Mode 0 0 Monosync 0 1 Bisync 1 0 SDLC/HDLC 1 1 External sync 0 0 x1 clock rate 0 1 x16 clock rate 1 0 x32 clocãž &k rate 1 1 x64 clock rate Paritù Enablå (D0)®  Iæ thió biô ió seô tï logiã high¬  á paritù biô  ió addeä tï thå transmiô characteò datá anä ió  expecteä  iî receivå data. Paritù Even/Odä (D1)® Thió biô ió useä wheî thå Paritù Enablå biô ió seô tï logiã higè tï determinå thå senså oæ thå paritù codå iî thå  transmiô datá anä thå expecteä paritù codå iî receivå  data® Eveî paritù ió signifieä bù settinç thió biô tï logiã  high¬  odä parity by setting the bit to logãž'ic low. Modå Selecô (D2¬ D3)®  Thå  combinatioî   oæ  theså  twï  bitó differentiatå  betweeî  asynchronouó  anä  synchronouó  modeó  oæ operatioî  anä alsï specifù thå numbeò oæ stoð bitó addeä tï  thå transmiô  datá  iî thå asynchronouó mode®  Thå receiveò  circuitó alwayó checë foò onå stoð biô iî thå receivå data¬  regardlesó oæ the number of stop bits in the transmit data. Synã Modå (D4¬ D5)® Iæ synchronouó modå ió selecteä bù thå Modå Selecô bits¬  theså bitó determinå thå ãž'typå oæ synchronouó  mode¬ for transmit and receive data. Clocë Ratå (D6¬ D7)®  Theså bitó specifù thå multiplieò applieä tï botè thå transmiô anä receiveò inpuô clocë ratå prioò tï beinç useä tï seô thå transmiô anä receivå bauä rates®  Foò synchronouó modeó  thå  x±  clocë  ratå musô bå selected®  Anù  ratå  maù  bå selected for the asynchronous mode, apart from the x1 rate. Š Write Register 5 D7 D6 D5 D4 D3 D2 D1 D0 WR5 ãž' Tx CRC Enable RTS CRC-16 Tx Enable Send Break Tx bits/character 0 0 5 bits/character or less 1 0 6 bits/character 0 1 7 bits/character 1 1 8 bits/character DTR Tãž'ø CRà Enablå (D0)® Thió biô enableó (logiã high)/disableó (logiã low© thå CRà generatoò iî thå transmiô datá path® RTÓ (D1)® Thió biô controló thå statå oæ thå modeí controì outpuô Requesô tï Senä (RTS)® Wheî thå RTÓ biô ió seô tï logiã high¬ thå RTÓ  outpuô ió seô activå (logiã low/linå spacing)®  Wheî thå RTÓ biô  ió  reseô  tï logiã low¬  thå RTÓ outpuô  ió  reseô  tï  thå inactivå  logiã higè statå (linå marking)®  Iî asynchronouó mode¬ thå  RTÓ outpuô ió noô reseô bù settinç thå RTÓ ãž' biô  low¬  untiì afteò transmissioî oæ thå characteò iî thå transmiô buffer® CRC-1¶ (D2)®  Thió  biô selectó thå CRà polynomiaì useä  bù  thå transmitteò  anä receiveò circuits®  Iæ seô tï logiã  high¬  thå CRC-1¶  polynomiaì  (X16” « X12” « X5” +1© ió selected®  Iæ  seô  tï logiã low¬ thå SDLà polynomiaì (X16” « X15” « X2” +1© ió selected® Tø Enablå (D3).„  Thió biô actó aó  thå  enable/disablå  controì signaì  foò  thå  transmitteò output®  Characteò datá  iî  thå tãž'ransmiô  buffeò cannoô bå transmitteä oò á breaë conditioî  senô unlesó thió biô ió seô tï logiã high®  Iæ seô tï logiã  low¬  thå transmiô outpuô ió helä iî thå line idle markinç condition. Senä Breaë (D4)®  Wheî seô tï logiã higè anä thå transmitteò  ió enabled¬  thå  transmiô  datá  outpuô ió forceä  tï  thå  spacinç condition, regardless of any data transmission in progress. Tø bits/characteò (D5¬ D6)®  Thå combinatioî oæ theså twï  bitó specifù  thå  numbeò oæ bitó peò characteò ãž'iî thå transmiô  data® Characteró  havå  tï bå assembleä intï thå correcô formaô bù  thå Šprogrammer®  Alì characteò lengthó oæ lesó thaî ¸ bitó havå tï bå righô justified, with the following format® D7 D6 D5 D4 D3 D2 D1 D0 Bits/Character 0 D D D D D D D 7 0 0 D D D D D D 6 0 0 0 D D D D D 5 1 0 0 0 D D D Dãž' 4 1 1 0 0 0 D D D 3 1 1 1 0 0 0 D D 2 1 1 1 1 0 0 0 D 1 D = Character data bits DTÒ (D7)®  Thió  biô  controló thå  modeí  controì  outpuô  Datá Terminaì Readù (DTR)®  Wheî thå DTÒ biô ió seô tï logiã high¬ thå DTÒ outpuô ió seô tï thå activå statå (logiã low)®  Wheî reseô tï logiã  low¬  thå  DTÒ outpuô ió reseô tï thå inactivå logiã  higè state. ãž ' Write Register 6 D7 D6 D5 D4 D3 D2 D1 D0 WR6 Sync bits/Address Write Register 6 is programmed with: (a) The transmit sync character in Monosync. (b) The 8 LSB of the 16-bit sync character in Bisync. (c) The 8-bit frame address byte in bit oriented modes. Write Register 7 D7 D6 D5 D4 D3 D2 ãž(D1 D0 WR7 Sync bits/Flag Write Register 7 is programmed with: (a) The receive sync character in Monosync. (b) The 8 MSB of the 16-bit sync character in Bisync. (c) A flag character in bit oriented modes. ŠRead Register Definition Botè  channeló contaiî twï Reaä Registeró eacè (RR°  anä  RR1)¬ whicè definå thå statuó withiî thå channel® ãž(Á thirä Reaä Registeò (RR2© accesseä througè channeì  containó á copù oæ thå interrupô vector¬  whicè  indicateó  thå  SIÏ interrupô routinå  (iæ  any)¬ currentlù iî service. Readinç  thå contentó oæ Reaä Registeró ± anä ² requireó á  twï bytå  transfeò operation®  Thå first¬  á writå operatioî  tï  thå commands/statuó  addresó locatioî usinç thå pointeò bitó oæ Writå Registeò ° tï specifù thå Reaä Register»  thå second¬  thå actuaì reaä  operatioî  froí thå samå addresó tï accesó thå coãž(ntentó  oæ thå register®  Followinç anù reaä oò writå operatioî (aparô  froí writinç tï Writå Registeò 0)¬  thå addresó pointeò withiî thå SIÏ ió alwayó cleareä tï zero¬ allowinç thå contentó oæ Reaä Registeò 0 tï bå accesseä using a single read operation. The definition of each register is detailed below. Read Register 0 D7 D6 D5 D4 D3 D2 D1 D0 RR0 ãž( Rx Char Available Interrupt Pending Transmit Buffer Empty DCD Sync/Hunt CTS Transmit Underrun/EOM Break/Abort Rø Chaò Availablå (D0)® Thió biô ió helä aô logiã high¬ untiì alì characteró  withiî thå receivå FIFÏ stack¬  arå ãž(read®  Logiã  lo÷ indicates that no more receive characters are available. Interrupô Pendinç (D1)® Thió biô onlù haó significancå iî channeì A®  Iî  channeì B¬  thå biô ió alwayó aô logiã low®  Wheî seô  tï logiã  high¬  thå  biô indicateó thaô aî interrupô  conditioî  ió present within the SIO. Transmiô Buffeò Emptù (D2)® Thió biô ió seô tï logiã higè everù timå á characteò ió transmitteä ouô oæ thå transmiô buffer® Iô ió Šreseô  tï thå logiã lo÷ inactivå statå bù reloadinç thå  traãž(nsmiô buffer with a new data character. DCÄ (D3)®  Thå DCÄ biô indicateó thå statå oæ thå modeí  controì inpuô Datá Carrieò Detecô (DCD)® Thió statå ió latcheä everù timå anù  external/statuó interrupô conditioî occurs¬  anä remainó  iî thå   latcheä   statå   untiì  reseô   bù   writinç   thå   reseô external/statuó interrupô commanä tï Writå Registeò 0® Therefore, tï  ensurå thaô thå currenô statå oæ thå DCÄ inpuô ió  obtained¬ thå   biô   shoulä  bå  read¬   immediatelù  followinç  ãž(á   reseô external/statuó  interrupô  command®  Thå DCÄ biô  indicateó  thå inverså oæ thå statå oî thå DCÄ input. Sync/Hunô (D4)®  Iî asynchronouó modes¬  thió biô indicateó  thå statå  oæ thå Synã inpuô anä operateó iî á similaò manneò tï  thå DCÄ  bit¬  witè  regarä  tï thå latchinç process®  Thå  Synã  biô indicateó  thå  inverså  oæ thå statå  oî  thå  Synã  input®  Iî synchronouó modes¬  thå biô reflectó thå phaså oæ thå synchronouó receivå operation® Initiatinç thå Hunô phaså causãž(eó thå biô tï bå seô tï logiã high®  (i.e® Oî reseô oò settinç thå enteò hunô modå biô iî Writå Registeò 3)® Oî achievinç characteò synchronisation¬ thå  biô  ió  seô tï logiã lo÷ aó thå receivå  phaså  beginó  anä remainó  iî thió conditioî unlesó thå Hunô phaså  ió  initialiseä again® CTÓ (D5).„ Thió biô functionó iî á similaò manneò tï thå DCÄ  biô witè regarä tï thå latchinç process¬ buô indicateó thå inverså oæ thå statå oî thå Cleaò tï Senä inpuô (CTS). Transmiô Underrun/EOãž (Í (D6)® Iî synchronouó modes¬ thå biô ió set tï  logiã  higè  followinç  á  system/channeì   reset¬   allowinç sync/flaç  characteró tï bå senô wheî thå transmiô buffeò becomeó empty®  Wheî thå reseô transmiô underrun/EOÍ commanä ió issueä tï Writå Registeò 0¬  thå transmiô underrun/EOÍ biô ió seô tï  logiã low® Thió enableó CRà characteró tï bå automaticallù senô insteaä of the sync/flag characters. Break/Aborô (D7).„ Iî asynchronouó modes¬ thió biô ió seô tï logiã high¬  wheî  á  breaãž)ë ió detecteä iî thå receivå  data®  Thå  biô ió  noô reseô untiì, á reseô external/statuó commanä ió issueä tï Writå Registeò ° anä thå breaë conditioî ió removed®  Iî thå  biô orienteä  modes¬  thå  biô ió seô tï logiã higè oî  detectinç  aî aborô sequencå iî thå receivå data® Thå biô ió reseô tï logiã lo÷ oî  loadinç  Writå  Registeò  ° witè  thå  reseô  external/statuó command®  Thå  biô ió noô useä iî thå bytå  orienteä  synchronouó modes. .pa Š Read Registerãž) 1 D7 D6 D5 D4 D3 D2 D1 D0 RR1 All Sent Residue Codes Parity Error Rx Overrun Error CRC/Framing Error End of Frame (SDLC) Alì Senô (D0)®  Iî asynchronouó modes¬  thió biô ió seô tï  logiã higè  wheî  ãž)alì thå bitó oæ thå characteò havå  beeî  transmitteä ontï thå seriaì link® Iî synchronouó modeó thå biô ió permanentlù set to logic high. Residuå Codeó (D± tï D3)®  Thå combinatioî oæ theså threå  bitó indicatå  thå  lengtè  oæ thå I-fielä iî thå biô  orienteä  modeó wherå  thå I-fielä ió noô aî integraì multiplå oæ  thå  characteò length. Paritù Erroò (D4)®  Wheî paritù ió enabled¬  thió biô ió seô  tï logiã higè oî detectinç á receivå characteò whoså paritù doeó noô matcè thå ãž)senså programmeä bù biô ± oæ Writå Registeò 4®  Thå biô remainó  seô  iî thå erroò conditioî untiì reseô bù  loadinç  thå erroò reseô commanä intï Writå Registeò 0. Rø Overruî Erroò (D5).„ Thió biô ió seô tï logiã higè wheî onå oò morå receivå characteró havå beeî overwritteî iî thå receivå FIFÏ buffer®  Thå  biô remainó seô iî thå erroò conditioî untiì reseô bù loadinç thå erroò reseô commanä intï Writå Registeò 0. CRC/Framinç Erroò (D6)®  Thå functioî oæ thió biô ió dependenô oî thåãž) modå selected® Iî asynchronouó modes¬ thå biô ió seô tï logiã higè  oî  detectinç á receivå characteò witè incorrecô stoð  bitó (framinç  error)®  Thå  erroò  conditioî onlù persistó  foò  thå particulaò characteò storeä iî thå receivå buffer. Iî synchronouó modes¬  thå  biô indicateó thå resulô froí thå receivå CRà erroò detectioî circuit®  Á logiã higè indicateó á CRà error® Thå erroò conditionó  arå reseô tï thå inactivå lo÷ statå afteò issuinç thå erroò reseô commanä tï Writå Registeò 0ãž)® Enä oæ Framå (D7).„ Iî thå biô orienteä modes¬  thió biô indicateó thaô á valiä closinç flaç haó beeî detecteä anä thå CRà Erroò anä residuå codeó arå no÷ valid® Thå biô ió reseô bù issuinç aî erroò reseô commanä tï WR0. Š Read Register 2 D7 D6 D5 D4 D3 D2 D1 D0 RR2 Interrupt Vector (channel B only) Reaä  Rãž)egisteò  ²  containó the interrupô vectoò  anä  ió  reaä througè  channeì  only®  Iæ thå statuó affecô vectoò biô ió  seô (D2¬  Writå  Registeò  1)¬  thå registeò  indicateó  thå  currenô interrupô servicå routinå (iæ any© iî operation¬ anä ió á copù oæ thå  interrupô vectoò supplieä tï thå CPU®  Iæ nï interruptó  arå pending¬ thå vectoò ió seô tï thå conditioî foò á speciaì receivå conditioî iî channeì  (seå Writå Registeò ± description)® Iæ thå statuó  affecô vectoò biô ió noô seô (logiã  ãž)low)¬  thå  registeò containó  á  copù oæ thå vectoò writteî intï Writå Registeò ²  iî channeì B® SIO Interrupt Sequence Thå  SIÏ incorporateó aî elaboratå interrupô  structure¬  whicè actó  aó aî extensioî tï thå interrupô structurå provideä bù  thå Interrupô  Controlleò  (PIC©  oî  thå  Systeí  Board®   Á  singlå interrupô outpuô linå (INT© connectó thå SIÏ tï thå PIC. Eacè  channeì withiî thå SIÏ ió ablå tï generatå  aî  interrupô foò  á  varietù oæ conditions®  Alì inteãž )rruptinç sourceó  caî  bå enableä  oò disableä (masked© bù software¬  anä arå ordereä oî  á prioritù  basis®  Alì  sourceó  withiî Channeì Á arå  assigneä  á higheò prioritù thaî Channeì B® Withiî eacè channel¬ thå assigneä prioritù ió aó detaileä below: 1. Special receive condition (Highest). 2. Receive character available. 3. External/status interrupt. 4. Transmit data required (Lowest). Iæ  á  SIÏ  interrupô  ió iî servicå  wheî  á  higheò  priãž*oritù interrupô  conditioî  occurs¬  thå higheò prioritù  conditioî  ió granteä service®  Thå SIÏ storeó thå loweò prioritù conditioî anä resumeó thå interrupô servicå routinå oî completioî oæ thå higheò priority interrupt routine. Á  speciaì receivå interrupô ió generateä wheî thå SIÏ  detectó anù oæ thå followinç conditionó iî thå receivå data: 1. Parity errors. 2. Receiver overrun. 3. Framing errors (asynchronous modes). 4. End of Frame (SDLC/HDLC onlyãž*). Š Receivå  characteò  availablå interruptó caî bå  programmeä  tï generatå aî interrupô oî everù receivå characteò oò foò thå firsô characteò onlù (synchronouó modes)® Aî  external/statuó  interrupô  caî bå causeä  bù  anù  oæ  thå followinç conditions: 1® Transitionó oî thå modeí controì lines»  DCD¬ CTÓ anä SYNC. 2. A break in receive data (asynchronous modes). 3® Aî  aborô  sequencå iî receivå datá (biô  synchronouó modes). ãž* 4® Transmiô  underrun/EOÍ  conditioî   iî  transmiô  datá (synchronous modes). Thå  actuaì sequencå oæ eventó performeä oî thå occurrencå oæ á SIÏ interrupô conditioî ió aó follows. Thå SIÏ compareó thå ne÷ interrupô witè anù interrupô currentlù iî service® Iæ thå ne÷ interrupô ió oæ á higheò prioritù thaî thå currenô interrupt¬  thå INÔ outpuô ió seô activå (logiã low)®  Iæ thå ne÷ interrupô ió oæ á loweò priority¬ thå interrupô conditioî is stored until it bãž*ecomes the highest priority. Thå INÔ output¬  afteò inversion¬  formó thå interrupô  requesô linå  (IR5©  tï thå PIC®  Providinç IRµ ió thå  highesô  prioritù unmaskeä interrupô requesô tï thå PIC¬  aî interrupô ió issueä tï thå CPU®  Thå CPÕ determineó thå devicå generatinç thå  interrupô bù  performinç á PIà interrupô acknowledgå sequence¬  whicè  theî provideó aî associateä interrupô vector. Foò  thå  CPÕ  tï  determinå thå  SIÏ  procesó  generatinç  thå interrupt¬  thå  CPÕ  haãž*ó  tï  perforí á  speciaì  SIÏ  interrupô acknowledgå sequence® Thió ió achieveä bù issuinç á "locked¢ reaä cycle¬ aó defineä bù thå followinç 808¶ instruction: LOCK IN AL,60H Thió instructioî accesseó thå SIÏ interrupô vector¬  whicè ió á baså  addresó previouslù supplieä tï thå SIO¬  modifieä accordinç tï  thå conditioî generatinç thå interrupt®  Thå  SIÏ  interrupt¬ thuó  allowó thå CPÕ tï selecô thå appropriatå interrupô  servicå routine® Oî completioî oæ thå SIÏãž* servicå routine¬ thå CPÕ haó tï issuå  á  returî froí interrupô commanä (tï WR0)¬  tï enablå  anù lesseò   prioritù  pendinç  interruptó  tï  generatå  aî   activå interrupô output® Thå  SIÏ  ió ablå tï producå eighô differenô interrupô  vectoró accordinç  tï thå typå oæ interrupô aó detaileä oî  thå  previouó pagå  (´  vectoró  foò  eacè channel)®  Iî  thå  caså  wherå  thå interrupô caî bå causeä bù á numbeò oæ differenô conditionó (i.e® speciaì  receivå  anä external/status)¬  thåãž* actuaì causå caî  bå detecteä bù readinç thå appropriatå statuó register® .pa ŠKEYBOARD COMMUNICATIONS General Transfeò  oæ  datá betweeî thå keyboarä anä thå  processoró  ió supplieä viá channeì  oæ thå SIO®  Thå channeì ió programmeä  tï supporô  fulì dupleø asynchronouó communicationó aô á fixeä  datá ratå (approximatelù 780° bitó peò second)® Thå formaô oæ thå datá oveò thå seriaì linë ió aó follows: Transmit data to Receive data from ãž* the keyboard the keyboard 8 bits per character. 8 bits per character. 1.5 stop bits. 1 stop bit. No parity. No parity. Nï  handshakinç  signaló arå provideä betweeî thå Keyboarä  anä thå Systeí Unit® Controì oæ datá flo÷ oveò thå seriaì linë tï thå keyboarä ió controlleä bù characteò codeó froí thå Keyboard®  Thå Keyboarä  supplieó á "transmiô off¢ characteò tï thå Systeí  Uniô wheî  ãž *itó receivå buffeò stacë ió nearlù full®  Thå SIÏ caî  theî onlù  transmiô fouò morå characteró withouô thå Keyboarä  receivå buffeò  overflowing¬  resultinç  iî thå losó oæ  data®  Wheî  thå Keyboarä   receivå  buffeò  stacë  becomeó  emptù  followinç  thå transmissioî  oæ  á  "transmiô  off¢  character¬   thå   Keyboarä transmitó  á  "transmiô on¢ characteò tï inforí thå  Systeí  Uniô thaô datá transmissioî caî resume. Therå ió nï controì oæ datá flo÷ oveò thå seriaì linë froí  thå Keybãž+oard®  Tï  prevenô losó oæ data¬  thå processoró havå tï reaä thå  keyboarä datá beforå iô ió overwritteî iî thå  receivå  FIFÏ stacë  oæ channeì B®  Thió requireó thå software tï bå capablå of processinç  keyboarä datá storeä iî thå SIÏ receivå buffeò aô thå maximuí   possiblå  receivå  datá  ratå  oæ   approximatelù   78° characteró peò second® Á  descriptioî  oæ alì thå possiblå characteò codeó  anä  theiò significance¬  supplieä  betweeî  thå  Keyboarä  anä  thå  systeí softwarå ãž+ió detaileä iî thå Keyboarä documentation. Iî additioî tï carryinç characteò codes¬  thå datá iî linå froí thå Keyboarä alsï carrieó thå systeí hardwarå  reset®  Activatinç thå  reseô  overrideó thå transmissioî oæ anù datá tï thå SIÏ  bù holdinç thå datá iî linå tï thå spacinç condition®  Thå linå idlå conditioî iî botè directionó ió indicateä bù continuouó  marking® Keyboard Connection Detail Thå  datá  linë  betweeî thå Keyboarä anä thå  Systeí  Uniô  ió provideä  viá  9-piî  ãž+D-typå  connectoró  anä  á  5-wirå   cablå assembly®  Thå  cablå  supportó  thå fulì  dupleø  communicationó channeì  anä alsï provideó « 12Ö anä -12Ö supplù voltageó tï  thå ŠKeyboard®  Thå definitioî oæ eacè piî oæ thå D-typå connectoò  ió detaileä iî thå tablå below. Thå  seriaì datá ió transferreä oveò thå keyboarä linë  aô  V2¸ levels. These are defined as follows: 1® Linå marking»  Betweeî -3Ö anä -15Ö relativå tï  0V¬ (typicallù -11V). 2® Linå spacing» ãž+ Betweeî +3Ö anä +15Ö relativå tï 0V¬ (typically +11V). Keyboard Connector Pin Definition Pin Description 1 +12V Out via a 4.7 ohm series resistor. 2 Serial Data Out. 3 Serial Data In. 4 0V. 5 N.C. 6 Frame Ground. 7 -12V Out via an 100 ohm series resistor. 8 0V. 9 N.C. ãž+ Figure 2. Keyboard Connector Detail Channel B Programming Details Iî  additioî  tï  providinç  á serieó  oæ  Writå  Registeró  tï configurå  thå SIÏ tï interfacå witè thå keyboard¬  á  numbeò  oæ otheò parameteró anä controì featureó arå alsï programmeä througè channeì B® These include: (a) The base address for the SIO interrupt vector. (b© Enablinç  anä  disablinç oæ thå  Paralleì  Interfacå interrupô controì inpuô lines. (c© Selectãž+ioî controì foò thå bauä rateó foò thå  RS232à channel. .pa Š Thå  parameteró issueä tï thå Writå Registeró oæ channeì   foò interfacinç  thå SIÏ tï thå Keyboard¬  anä thå  interrupô  vectoò baså  addresó arå programmeä durinç aî initialisatioî routinå  bù thå  BIOS®  Theså arå fixeä anä neveò requirå anù modificatioî bù thå  software®  Thå  controì  bitó  foò  thå  Paralleì  Interfacå interruptó  anä selectinç thå bauä rateó foò thå  RS232à channeì arå  seô tï defaulô stateó durãž+inç initialisation®  Changinç theså undeò softwarå controì arå describeä iî subsequenô sections. Oncå channeì  ió initialiseä witè thå keyboarä parameteró  anä thå baså addresó foò thå interrupô vectoò (00È tï Writå  Registeò 2)¬  transfeò oæ datá betweeî thå Keyboarä anä thå processoró caî proceed®  Thå  formaô oæ thå commanä byteó supplieä tï thå  Writå Registeró  oæ channeì  durinç initialisatioî arå detaileä below® Thå  addresó locationó utiliseä bù channeì  arå describeä  iî  á prãž+eviouó section¬ undeò thå headinç "Processoò Interface"® D7 D0 1 0 x x 1 0 x 0 Write Register 4 Parity Off. 1.5 stop bits/Tx character x32 clock rate D7 D0 0 1 1 0 1 x 0 xãž + Write Register 5 RTÓ (RS232à bauä ratå selecô bit) Tx Enable Send Break inhibited 8 bits/Tx character DTR (RS232C Baud rate select bit) ø ½ noô applicablå tï modå anä application¬ program to 0. .pa Š D7 D0 ãž, 1 1 0 x x x x 1 Write Register 3 Rx Enable Auto Enables off 8 bits/Rx character D7 D0 x x x 1 1 1 0 0 Write Register 1 ãž, Ext® Interrupt masked (Paralleì Interfacå interrupts) Tx Interrupt Enabled Statuó affectó vectoò Rx Interrupts Enabled ãž, PARALLEL INTERFACE INTERRUPTS Threå  printeò controì outpuô lineó froí thå Paralleì Interfacå (Fault¬  Acknowledgå  anä  Busy© arå wireä tï thå SIÏ  channeì  Â modeí controì inputó (SYNCB¬  CTS anä DCD respectively)®  Theså inputó  caî  bå programmeä tï generatå aî interrupô tï  thå  CPU¬ everù timå á transitioî occuró oî anù oæ thå printeò  lines®  Thå logiã  statå oî alì threå printeò inputó arå alsï indicateä bù  á correspondinç biô withiî Reaä Registeò 0. ãž, Thå  logiã  stateó  oæ thå bitó iî thå  registeò  caî  onlù  bå regardeä  aó reflectinç thå truå statå oæ thå printeò  lines¬  iæ prioò tï readinç thå register¬ á reseô external/statuó commanä ió issueä tï Writå Registeò 0® Thå bitó withiî thå registeò indicatå the inverse of the logic state on the control input. Tï  enablå  transitionó  oî thå threå  inputó  tï  generatå  aî interrupt¬  requireó thå external/statuó interrupô biô originallù seô  tï logiã ° durinç channeì  initialiãž,sation¬  tï bå  updated® Thió  ió achieveä bù reprogramminç biô D° oæ Writå Registeò ±  tï logiã 1® Thå  correspondinç interrupô vectoò accesseä bù thå CPÕ  durinç aî  interrupô  acknowledgå  cyclå  associateä  witè  thå  printeò controì  lines¬  ió  thå  channeì  ext/statuó  interrupô  vectoò Š(02H)¬  aó describeä iî thå sectioî oî thå Writå  Registers®  Thå otheò  conditions¬  whicè arå specifieä aó beinç ablå tï generatå aî external/statuó interrupt¬ arå noô enableä iî channeì B® ãž, RS232C COMMUNICATIONS General Thå  interfacå  tï  thå RS232à seriaì linë  ió  implementeä  bù channeì  Á  oæ  thå SIO¬  whicè caî bå programmeä tï  operatå  iî eitheò  asynchronouó  oò synchronouó  communicationó  modeó  witè transmiô  anä  receivå  bauä  rateó  determineä  eitheò  viá  thå Programmablå  Intervaì  Timeò  (TMR)¬  oò viá thå  externaì  datá communicationó equipment® Thå  clocë inputó tï thå SIÏ pinó TxCÁ anä RxCA¬  arå  useä  tï determinå  thå  transmiô  ãž,anä receivå bauä rateó foò  thå  RS232à linë anä arå supplieä viá thå datá selector® Thå selecô lineó tï thå  datá  selectoò arå provideä bù twï generaì  purposå  outputó (DTR anä RTSB© availablå througè channeì B¬ whicè arå controlleä bù software® Thió allowó thå programmeò tï selectº (a© Differenô rateó foò transmiô anä receivå,  witè  thå thå  receivå ratå determineä bù thå clocë output OUT1 of thå Intervaì Timeò anä thå transmiô rate¬ determineä bù ãž, OUT2. (b© Thå samå ratå foò transmiô anä receivå aó determineä by OUT2 of the timer. (c© Thå samå ratå foò transmiô anä receivå aó determineä bù  thå externaì datá communications  equipmenô  (RS232à connector pin, Rx Clock). Detailó oæ thå timeò anä thå appropriatå programminç valueó  tï producå thå majoritù oæ thå commonlù useä bauä rateó arå detaileä iî  thå  TIMEÒ  chapter®  Theså  valueó  applù  tï  asynchronouó communicationó onlù anä rãž ,equirå channeì Á tï bå programmeä iî thå x1¶  clocë ratå modå tï achievå thå correcô bauä rate®  Threå  oæ thå  valueó  detaileä  iî thå TIMEÒ chapteò producå á  bauä  ratå valuå  whicè ió marginallù outsidå thå +/- 5¥ tolerancå  normallù alloweä  foò communicationó oveò aî RS232à link®  Theså  values¬ 3600¬  720°  anä  1920° baudó shoulä thereforå bå useä  onlù  foò Apricot-to-Apricoô communications® Thå selecteä transmiô ratå clocë (TxCA© ió alsï supplieä tï thå RS232à connectoò  (cãž-onnectoò  pin¬  Tø clock)¬  foò uså  bù  thå externaì datá communicationó equipment® Fivå  oæ thå mosô commonlù useä RS232à modeí controì lineó  arå connecteä  tï variouó inputó anä outputó oæ channeì Á oæ thå SIO¬ availablå  foò coordinatinç datá transferó oveò thå seriaì  link® Theså includå thå outputó RTÓ anä DTR¬  anä thå inputó  DSR¬  CTÓ anä  DCD®  Uså oæ eacè individuaì modeí controì linå ió dependenô oî   compatiblå   facilitieó  withiî  thå   externaì   equipment® Generatioî   oãž-æ  thå  outpuô  modeí  controì  lineó  anä   statuó monitorinç  oæ  thå inpuô modeí controì lineó ió  directlù  undeò Šprograí  control®  Thå  SIÏ  caî bå  programmeä  tï  generatå  aî interrupô tï thå CPÕ everù timå á transitioî occuró oî anù oæ thå inpuô controì lines. DSR is not available in synchronous modes. RS232C Connector Detail Thå definitioî oæ thå availablå RS232à connectionó provideä  bù thå 25-waù D-typå connectoò arå detaileä iî thå followinç  table® Thå  RS232à voltagå  ãž-leveló arå defineä  below®  Thå  linå  idlå conditioî ió indicateä bù continuouó marking. 1. Line marking; Between -3V and -15V relative to 0V. 2. Line spacing; Between +3V and +15V relative to 0V. RS232C Connector Pin Definition Piî Descriptioî Piî Description 1 Frame Ground. 9 to 14 N.C. 2 Tx Data. 15 Rx Clock. 3 Rx Data. 16 to 19 N.C ãž- 4 RTS. 20 DTR. 5 CTS. 21 to 23 N.C. 6 DSR. 24 Tx Clock 7 0V (Signal GND). 25 N.C. 8 DCD. Figure 3. RS232C Connector Detail. Programming Details Thå  followinç  paragraphó  detaiì  thå  formaô  oæ  thå  Writå Registeró  foò  settinç channeì Á tï operatå  iî the asynchronouó modå  anä alsï thå variouó optionó aãž-vailablå foò controllinç  thå transfeò oæ datá oveò thå seriaì link® Foò detailó oæ programminç thå  channeì foò synchronouó communications¬  referencå shoulä bå madå tï thå appropriatå Ziloç documentation. Thå  addresó locationó utiliseä bù channeì Á anä thå methoä foò writinç  datá tï thå Writå Registeró arå describeä iî á  previouó section under the heading "Processor Interface". Š Tï  receivå  anä transmiô datá iî thå  asynchronouó  mode¬  thå following conditions have to be determinedãž-: 1. The transmit and receive baud rates. 2. The character length. 3® Thå numbeò oæ stoð bitó iî thå transmiô character.(± stoð biô ió alwayó expecteä iî thå receivå data). 4. The sense of the parity, if any. 5. The interrupt mode. 6. The line protocol. Bauä  Ratå  Selection.„  Thå  clocë  sourcå  foò   determininç  thå transmiô  anä  receivå  bauä rateó ió selecteä accordinç  tï  thå programmeä  statå oæ thå RTÓ anä DTÒ biãž-tó oæ Writå Registeò µ  iî channeì B¬ aó follows. RTS DTR Rx Clock Tx Clock 0 0 OUT1 (TMR) OUT2 (TMR) 0 1 External Clock External Clock 1 0 OUT2 (TMR) OUT2 (TMR) 1 1 0V 0V Writå Registeò 4.„ Thió registeò determines¬  thå numbeò oæ  stoð bitó  iî thå transmiô data¬  thå senså oæ thå paritù (iæ any©  iî thå  transmiô datá anä thå expãž-ecteä paritù iî thå  receivå  data¬ thå  multiplieò  applieä tï botè thå transmiô anä  receivå  inpuô clocë rates prior to setting the baud rates. D7 D0 0 1 x x D3 D2 D1 D0 Write Register 4 x 0 Parity Off 0 1 Parity Odd 1 1 Parity Even ãž - 0 1 1 stop bit 1 0 1.5 stop bits 1 1 2 stop bits x16 clock rate .pa ŠWritå Registeò 5® Thió registeò determineó thå transmiô characteò length¬  controló  thå  modeí  outputó RTÓ anä  DTR¬  allowó  thå programmeò  tï enable/disablå transmission¬  anä alsï generatå  á breaë iî transmission. D7 D0 D7 ãž. D6 D5 D4 D3 x D1 x Write Register 5 0 RTÓ marking selecô bit) 1 RTS spacing 0 Tx disabled (output marking) 1 Tx enabled for data or break 0 Send break inhibited 1 Send break enabled-Tx output spacing 0 0 5 bitsãž. per character 1 0 6 bits per character 0 1 7 bits per character 1 1 8 bits per character 0 DTR marking 1 DTR spacing Writå Registeò 3®  Thió registeò determineó thå numbeò oæ receivå bitó  assembleä  tï forí á character¬  allowó thå  programmeò  tï enable/disablå  receptioî  anä  alsï selectó  whetheò  thå  modeí controì   lineó  CTÓ  anä  DCÄ  controì  datá  transmissioî  anä receãž.ptioî oveò thå seriaì link (Auto Enable). D7 D0 D7 D6 D5 x x x x D0 Write Register 3 0 Rx disabled 1 Rx enabled 0 Auto Enable off 1 Auto Enable on 0 0 5 bits per character 1 0 6 bits per character ãž. 0 1 7 bits per character 1 1 8 bits per character ŠWritå Registeò 1®  Thió registeò enables/disableó thå  transmit¬ receivå anä external/statuó interruptó anä alsï controló thå  DMÁ request output. D7 D0 0 x x D5 D4 x D1 D0 Write Register 1 0 Ext® Interrupt maskãž.ed 1 Ext. Interrupt enabled 0 Tx Interrupt masked 1 Tx Interrupt enabled 0 0 Rx Interrupts masked ±  °  Interrupô oî alì  Rx characters¬ paritù affectó vectoò. ± ± ãž. Interrupô oî alì Rx characters¬ paritù does not affect vector. DMA output inhibited SIO PIN DETAIL Thå  twï  SIÏ communicatioî channeló arå designateä  channeì  Á (useä  foò thå RS232à link© anä channeì  (useä foò thå  keyboarä link)®  Oî  thå  blocë diagraí aô thå beginninç oæ  thå  chapter¬ connectionó  tï  channeì  Á arå denoteä bù thå  suffiø  Á  (e.g® TxDA)¬  anãž.ä  tï channeì  bù thå suffiø  (e.g®  RxDB)®  Alì  thå remaininç  inputó  anä outputó oæ thå SIÏ arå connectionó tï  thå processors®  Á  descriptioî  oæ  eacè  piî  ió  detaileä  oî  thå followinç pages. .pa ŠSystem Connections D° tï D·  Datá  bus¬  useä tï  transfeò  datá  anä  commandó betweeî thå processors anä thå SIO® IORÑ Input/Outpuô Request®  Controì input¬ activå statå logiã low¬ deriveä bù combininç thå reaä anä writå ãž. commandó  froí thå systeí controì buó  (AIOWà anä IORC©  usinç aî AND gate® Useä iî conjunctioî witè RÄ  anä  thå addresó inputó B/A¬  C/Ä  anä  CÅ  tï controì  thå transfeò oæ datá anä commandó betweeî thå SIÏ anä thå procesors® Aî activå statå oî IORÑ indicateó á transfeò operatioî oî thå datá bus» RÄ  signifieó thå  directioî  oæ  datá  transfeò  (seå below)® IORÑ  alsï haó anotheò function¬ wheî  ãž .seô activå aô thå samå timå aó M± ió seô active®  Thió conditioî  actó aó  aî acknowledgemenô  oæ  á  SIÏ interrupt¬ causinç thå SIÏ tï releaså aî interrupô vectoò ontï thå datá bus. M± Machinå Cyclå 1® Controì input¬ activå statå logiã low® Functioî aó describeä above. RÄ Read® Controì input® Useä iî conjunctioî witè IORÑ anä thå addresó inputó B/A¬  C/Ä anä CÅ tï controì thå  transfeòãž/ oæ datá anä commandó betweeî thå SIÏ anä  processinç elements® If botè IORÑ anä RÄ arå seô  lo÷  anä  á valiä  addresó  ió  seô  up¬  thå directioî  oæ  data/commanä transfeò ió  froí  thå SIÏ (reaä operation)® Iæ IORÑ ió seô lo÷ anä RÄ ió seô  high¬  witè  á  valiä  addresó  seô  up¬  thå directioî  oæ data/commanä transfeò ió tï thå  SIÏ (write operation). CÅ Chið Enable®  Addresó input¬  actiãž/vå statå  logiã low®  Wheî  active¬  indicateó  thaô  thå  SIÏ  ió selecteä foò á data/commanä transfeò operation® B/Á Channeì B/Channeì Á select® Addresó input® Á logiã lo÷ oî B/Á witè CÅ alsï seô lo÷ indicateó thaô thå data/commanä  transfeò operatioî involveó  channeì A®  Á logiã higè oî B/Á witè CÅ seô lo÷  indicateó thaô  thå data/commanä transfeò operatioî involveó channel B. ãž/ C/Ä Control/Datá select® Addresó input® Á logiã lo÷ oî C/Ä  witè  CÅ  alsï seô  lo÷  indicateó  thaô  thå informatioî  oî  thå datá buó  ió  interpreteä  aó data®  Á  logiã  higè  oî  C/Ä  witè  CÅ  seô  lo÷ indicateó thaô thå informatioî oî thå datá buó  ió interpreteä aó commands® CLË Systeí clocë input®  2.µ MHú clocë witè á 50¥ dutù cycle for internãž/al timing within the SIO. Š RESEÔ  Systeí reset®  Input¬  activå  low®  Wheî  active¬ disableó thå receivå anä transmiô sectionó oæ botè channels and sets  thå  transmiô  lineó  tï  thå markinç condition¬  requirinç thå registeró withiî thå  SIÏ  tï bå re-initializeä  beforå  performinç datá transfeò operations. INÔ Interrupô request® Output¬  activå low® Seô activå wheî aî interrupô conditioãž/î ió detecteä internallù within the SIO. Channeì Á Connections TxDÁ  Transmiô  Data®  Seriaì datá outpuô tï thå  RS232à interfacå  viá á linå driver®  Á marë ió indicateä by logic high on TxDA and a space, by logic low. RxDÁ Receivå Data®  Seriaì datá inpuô froí thå  RS232à interfacå viá á linå receiver® Á marë ió indicateä bù a logiã higè anä á space¬ bù logiã low® ãž/ TxCÁ  Transmitteò  Clock®  Inpuô useä tï  determinå  thå transmiô  bauä ratå oæ thå  RS232à channel®  Wheî operatinç iî asynchronouó mode¬  á facilitù existó withiî thå SIÏ tï dividå thå inpuô clocë frequencù internally¬  prioò tï being used to set thå bauä rate®  Thå  divideò ió controlleä bù softwarå  anä allowó  seriaì datá tï bå transmitteä aô á ratå oæ 1¬  1/16th¬  1/32nä oò ãž/1/64tè oæ thå ratå supplieä tï TxCA®  Iî synchronouó modes¬  thió facilitù  ió noô availablå, sï thaô TxCÁ correspondó directlù to thå transmiô bauä rate. RxCÁ Receiveò Clock® Inpuô useä tï seô thå receivå bauä ratå oæ thå internaì datá receiveò  circuitry®  Iî asynchronouó modes¬  thå receiveò clocë ió divideä bù thå samå divisoò programmeä foò thå transmitteò clock®   Iî   synchronouó  modes¬   ãž/RxCÁ  directlù setó  thå receivå bauä ratå oæ thå  datá  receiveò circuitry. DCDÁ Datá Carrieò Detect® Controì inpuô froí thå RS232à interfacå  viá á linå receiver®  Wheî useä witè  á modem¬ thå activå statå (logiã low© indicateó thaô thå modeí haó datá tï send® DCDÁ caî bå programmeä tï  operatå  iî onå oæ twï modes® The first mode allowó  DCDÁ tï acô aó thå enablå controì linå  tï ãž / thå receivå sectioî oæ channel A® Thå seconä  modå setó  á  controì biô withiî aî  internaì  registeò accordinç  tï thå statå oæ DCDÁ anä alsï  haó  thå facilitù tï generatå aî interrupô requesô tï  thå Interrupô Controller¬ everù DCDA transitioî. Š DTRÁ Datá Terminaì Ready® Controì outpuô tï thå RS232à interfacå  viá  á linå driver®  Wheî useä  witè  á modem¬ thå activå statå (logiã low© indicateó thaô ãž0 thå SIÏ ió readù tï starô handlinç data®  DTRÁ  ió controlleä bù softwarå ¬ followinç thå logiã statå oæ  aî  associateä controì biô withiî aî  internaì register. SYNCÁ Synchronization®  Controì  inpuô froí  thå  RS232à interfacå  viá  á linå driver®  Wheî useä  witè  á modem¬ thå activå statå (logiã low© indicateó thaô thå  modeí ió readù tï starô handlinç  data®  Thióãž0 inpuô ió onlù availablå iî thå asynchronouó  mode® SYNCÁ  setó  aî associateä controì biô  withiî  aî internaì registeò accordinç tï thå statå oæ SYNCA¬ anä alsï haó thå facilitù tï generatå aî interrupô requesô tï thå Interrupô Controller¬  everù timå á transitioî occuró oî SYNCA® RTSÁ  Requesô  tï  send®  Controì outpuô tï  thå  RS232à interfacå  viá  á linå driver®  Wheî useä  ãž0witè  á modeí, thå activå statå (logiã low) indicateó thaô thå SIÏ haó datá readù tï send® RTSÁ ió controlleä bù  software¬  followinç  thå  logiã statå  oæ  aî associateä   controì   biô  withiî   aî   internaì register. CTSÁ  Cleaò  tï send®  Controì inpuô  froí  thå  RS232à interfacå  viá á linå receiver®  Wheî useä witè  á modeí, thå activå statå (logiã low) indicateó thaô thå  modeíãž0 ió readù tï receivå data®  CTSÁ caî  bå programmeä  tï operatå iî onå oæ  twï  modes®  Thå firsô  modå  allowó  CTSÁ  tï acô  aó  thå  enablå controì linå tï thå transmiô sectioî oæ channeì A® Thå  seconä  modå setó aî associateä  controì  biô withiî aî internaì registeò accordinç tï thå statå oæ  CTSÁ anä alsï haó thå facilitù tï generatå  aî interrupô  requesô  tï thå  Interrupô  Controller¬ evãž0ery time a transition occurs on CTSA. W/RDYÁ  Wait/Readù A®  Controì outpuô tï thå DMÁ  requesô linå  oæ  thå Inpuô Outpuô Processoò  (IOР DRQ2)® Wheî activå (logiã low)¬ indicateó tï thå IOÐ thaô thå  SIÏ  ió readù foò á DMÁ  transfeò  operatioî to/froí thå SIÏ. .pa ŠChanneì  Connections TxD Transmiô Data® Seriaì datá outpuô tï thå  Keyboarä viá  á linå driver®  Á marë ió indicateä bù  logiã hãž0igè on TxDB anä a space, by logic low. RxD Receivå Data® Seriaì datá inpuô froí thå  Keyboarä viá á linå receiver®  Á marë ió indicateä bù logiã higè on RxDB anä á space¬ bù logiã low® RxTxC  Receiver/Transmitteò Clock® Fixeä frequencù clocë inpuô  oæ  0.2µ  MHú (50¥  dutù  cycle)¬  useä  tï determinå  thå  transmiô bauä ratå oæ thå datá  tï thå  keyboarä  anä thå receivå bauä  ratå  oæ  thå ãž0 internaì receiveò circuitry®  Thå clocë  frequencù ió  divideä internallù bù 3² tï matcè thå Keyboarä bauä ratå oæ 7.812µ kHz. RTS Requesô tï send®  Useä aó á generaì purposå outpuô iî  conjunctioî  witè  DTR tï  selecô  thå  clocë sourcå  foò thå transmiô anä receivå clocë  inputó oæ channeì Á (TxCÁ anä RxCA)®  Thå logiã statå  oî RTS  ió  controlleä bù  software¬  foãž0llowinç  thå statå  oæ  aî  associateä controì  biô  withiî  aî internal register. DTR  Datá  terminaì ready®  Useä aó á  generaì  purposå outpuô  iî  conjunctioî witè RTS  tï  selecô  thå clocë  sourcå  foò thå transmiô anä receivå  clocë inputó  oæ  channeì  A®  Thå logiã statå  oî  DTR ió controlleä bù software¬  followinç thå statå oæ aî  associateä  controì  biô  withiî  aî  inteãž 0rnaì register. SYNC  Synchronisation®  Controì inpuô connecteä  tï  thå Faulô  controì  linå  oæ thå  Paralleì  Interface® Inpuô programmeä tï seô aî associateä controì  biô withiî aî internaì registeò accordinç tï thå statå oæ SYNCB¬ anä alsï haó thå facilitù tï generatå aî interrupô  requesô  tï thå  Interrupô  Controller¬ every time a transition occurs on SYNCB. CTS  Cleaò tï send®  Cãž1ontroì inpuô connecteä tï thå ACË controì  linå  oæ thå  Paralleì  Interface®  Inpuô programmed in an identical manner to SYNCB. DCD  Datá carrieò detect®  Controì inpuô connecteä  tï thå  Busù controì linå oæ thå Paralleì  Interface® Input programmed in an identical manner to SYNCB. .pa quesô  tï thå  Interrupô  Controller¬ every time a transition occurs on SYNCB. CTS  Cleaò tï send®  Cãž1.fo .he .op Software Detail About This Section Thió  sectioî oæ thå Technicaì Referencå manuaì dealó witè  thå Softwarå  foò thå Apricoô computer®  Itó contentó arå  primarilù intendeä  foò  softwarå  writeró whï wisè tï  uså  thå  Apricot'ó advanceä featureó froí withiî theiò owî programs®  Thå functionaì operatioî  oæ  thå machinå caî alsï bå appreciateä tï  á  greateò extenô  oncå  á basiã understandinç oæ thå softwarå anä  harãž1dwarå integratioî ió achieved. Thå  firsô  sub-sectioî  ió á basiã overvie÷  tï  thå  Softwarå systeí  iî thå Apricot®  Therå theî follo÷ á numbeò  oæ  chapteró whicè  detaiì eacè oæ thå "devicå drivers"¬  whicè arå pieceó  oæ softwarå  designeä tï handlå variouó itemó oæ hardware¬  sucè  aó thå Keyboarä oò MicroScreen® Eacè  chapteò  ió sub-divideä intï threå  individuaì  portions¬ titleä  "INTRODUCTION"¬   "APPLICATIONÓ  INTEREST¢  anä  "SYSTEMÓ INTEREST". "INTRODãž1UCTIOΠ ió  intendeä tï bå reaä bù anyonå witè  á  basiã understandinç  oæ  computeò  concepts¬  anä  giveó  á  functionaì specificatioî oæ whaô thå relateä softwarå actuallù does. "APPLICATIONÓ INTEREST¢ essentiallù detailó ho÷ tï uså á devicå througè  thå existinç code¬  iô ió thió sectioî whicè wilì bå  oæ mosô interesô tï softwarå developers. "SYSTEMÓ  INTEREST¢ describeó whaô thå softwarå ió anä  ho÷  iô actuallù  works¬  iô alsï giveó aî insighô intï thå waù thaô  thå harãž1dwarå anä softwarå combinå togetheò tï makå thå Apricot. .papecificatioî oæ whaô thå relateä softwarå actuallù does. "APPLICATIONÓ INTEREST¢ essentiallù detailó ho÷ tï uså á devicå througè  thå existinç code¬  iô ió thió sectioî whicè wilì bå  oæ mosô interesô tï softwarå developers. "SYSTEMÓ  INTEREST¢ describeó whaô thå softwarå ió anä  ho÷  iô actuallù  works¬  iô alsï giveó aî insighô intï thå waù thaô  thå harãž1.he SOFTWARE .fo # .op SOFTWARE List of Contents Page INTRODUCTION 2 BIOS FEATURES - OVERVIEW OF CAPABILITIES 2 Foreground and Background Operations ãž1 3 Multi-sector Reads and Writes 3 Tri-buffer 3 Apricot Control Device 4 System Configuration Block 4 MicroScreen Driver 4 Time and Date Clock 4 Calculator 4 General Hardware Support ãž1 5 .pa ŠINTRODUCTION Thå  controì softwarå foò thå Apricoô Computeò consistó oæ  twï modulesº  thå  BIOÓ anä thå DOS¬  collectivelù referreä tï aó thå OPERATINÇ  SYSTEM®  Thå BIOÓ (aî acronyí foò Basiã  Inpuô  Outpuô System© ió generallù 'iî charge§ oæ thå hardwarå iî thå computer® Thå  DOÓ  (Disë  Operatinç System© ió thå interfacå  betweeî  thå user¬  applicatioî prograí anä thå BIOS®  Thå DOÓ ió loadeä  intï memorù  bù  thå BIOÓ wheî thå systeí ió booteä ãž 1uð anä theî  takeó controì  oæ thå entirå system®  Iô caî bå considereä aó á  "blacë box"¬  whicè  caî  requesô variouó serviceó froí  thå  BIOS®  Foò example¬  iæ thå DOÓ wantó tï prinô á characteò oî thå screen¬ iô haó tï interrupô thå BIOÓ anä givå iô thå necessarù  instructionó tï carrù ouô thå operation® Thå  DOÓ  ió Microsoft'ó MS-DOÓ Versioî  2.0¬  whicè  haó  manù advanceä  featureó  tï makå thå runninç oæ  applicatioî  softwarå extremelù  efficient®  Thå  BIOÓ  waó writteî  bù  ãž2ACÔ  (Advanceä Technology©  Ltd®  specificallù tï ruî iî conjunctioî witè MS-DOÓ 2.°  oî thå Apricot¬  anä containó á numbeò oæ additionó tï  makå applicationó softwarå botè morå powerfuì anä morå user-friendly. MS-DOÓ  2.° ió á direcô descendanô oæ MS-DOÓ 1.2µ whicè  becamå widelù  useä oî 3rä generatioî 16-biô microcomputeró sucè aó  thå ACÔ Siriuó 1¬  anä (aó PC-DOS© oî thå IBÍ PC®  Iô waó writteî bù MicroSofô Corporation¬  onå oæ thå worldó leadinç  micro-computeò softwarå  houses®  ãž2Cosmeticallù  similaò tï  CP/M-likå  operatinç systems¬  mosô  oæ itó advantageó arå witè itó internaì commands¬ sucè  aó  UNIX-typå featureó  includinç  Piping¬  tree-structureä directorieó anä Backgrounä operations. Thå BIOÓ consistó oæ á numbeò oæ hardwarå devicå driveró  whicè MS-DOÓ makeó uså of®  Therå arå driveró foò thå keyboard¬ screen¬ MicroScreen¬  communicationó ports¬ clock¬ disë drives¬ sounä anä variouó hardwarå add-ons®  Therå arå alsï softwarå drivers¬ whicè controì graphãž2ics¬ backgrounä printing¬ disë cachå anä calculator. Thå BIOÓ waó writteî iî 808¶ assemblù languagå anä Pascal® Mosô oæ  thå hardwarå interfacinç code¬  sucè aó thå  keyboard¬  videï displaù driveò anä low-leveì devicå I/Ï waó writteî iî assembler¬ leavinç thå codå whicè involveó large-scalå decisioî makinç  sucè aó thå disë handleò tï bå writteî iî Pascal®  Iî sourcå form¬  iô consistó  oæ á numbeò oæ moduleó whicè havå tï bå linkeä togetheò tï forí thå BIOS® BIOS FEATURES - OVERVIEW ãž2OF CAPABILITIES Thå  Apricoô BIOÓ ió á modulaò systeí writteî usinç thå  latesô structureä programminç techniques®  Iô ió á fast¬ efficienô piecå oæ  codå whicè ió capablå oæ makinç maximuí uså oæ thå  Apricot'ó advanceä hardwarå features. Thió  BIOÓ  haó manù featureó implementeä oveò  anä  abovå  thå those incorporateä iî otheò IO systems. ŠForeground and Background Operations Thå  Apricoô  BIOÓ haó beeî implementeä iî sucè á manneò  thaô fully-fledgeä   "foreground¢  anä  ãž2"background¢   processinç   ió supported®  Thaô  ió  alì  hardwarå operationó tï  anä  froí  I/Ï driveró arå buffereä anä interrupô driven® Thió makeó iô possiblå tï uså MS-DOÓ iî á real-timå environmenô witè operationó (sucè aó printeò spooling© beinç executeä iî thå background. Multi-sector Reads and Writes Thå  808¹ Input/Outpuô Processoò haó beeî programmeä tï perforí submergeä   (iî  thå  'background§  oò  simultaneouó  witè   808¶ operations©  disë reaä anä writå functionó oî  muãž2ltiplå  sectors® Thió  increaseó  thå speeä oæ mosô disë operationó anä fitó  intï thå philosophù oæ MS-DOÓ 2.° multiplå driveò requesô operations. Tri-buffer Disë Cachå Memory.„ Thå cachå memorù ió useä bù thå disë driveò tï holä  á  numbeò oæ disë sectors¬  anä operateó iî  thå  followinç manner: Disk READ: Thå  disë  driver¬  oî receivinç á requesô  foò  á             sectoò tï bå read¬ firsô examinås thå cachå tï             finä  ouô iæ thå sectoò ió residenô iî memory®  Iæãž2             resident¬  thå sectoò is immediatelù returneä to             thå DOS® Iæ noô resident¬ thå sectoò wilì bå reaä             froí disë anä iæ therå ió rooí withiî thå cache¬             thå  sectoò ió saved¬  aó welì aó returneä tï  thå             DOS® Iæ therå ió nï space¬ thå cachå overwriteó             thå sectoò imagå withiî thå cachå whicè haó  noô             beeî  accesseä  foò thå longesô perioä  oæ  timå             witè thå ne÷ sectorãž2. Disk WRITE: Wheî  á  disë writå requesô ió madå  tï  thå  disë             driver¬ thå sectoò ió writteî tï disë aó welì aó             beinç saveä withiî thå cache® Iæ therå ió nï             space¬ agaiî thå sectoò imagå withiî thå cachå noô             accesseä  foò  thå  longesô  perioä  oæ  timå  ió             overwritteî  witè thå ne÷ one®  Alì sectoò  writeó             tï  disë arå performeä iî thå background¬  sï thå             BIOÓ  doeó  noô nãž 2eeä tï waiô  arounä  untiì  thå             operatioî ió completå beforå returninç tï thå DOS®             Thió  backgrounä operatioî ió possiblå becauså  oæ             thå 808¹ IOÐ anä thå cache. .pa ŠPrinô buffer.„ Thå Prinô buffeò haó thå samå effecô oî printinç aó thå disë cachå oî disë writes®  Tï thå DOÓ anä thå user¬ printinç occuró aô á mucè fasteò rate® Aó  á  commanä  ió  issueä bù MS-DOÓ foò thå Bioó  tï  prinô  á characteò oî á connecteä linå printer¬  thå Bioó wilì placå ãž3 thió characteò  iî  á 2ë buffer¬  anä returnó controì bacë  tï  MS-DOÓ immediately®  Wheî  thå  lineó froí thå printeò statå thaô iô  ió readù  foò  anotheò character¬  thå nexô entrù iî thå  buffeò  ió senô tï thå printeò tï bå printeä anä rooí ió madå iî thå  buffeò for another character. Communicationó  buffer.„  Thå communicationó  buffeò  allowó  higè speeä transfeò (uð tï 9.¶ kbaud© oæ datá betweeî thå Apricoô anä otheò  computers®   Thå  seriaì  driveò  supportó  fulì  XON/XOFÆ ãž3protocoì tï prevenô thå losó oæ datá wheî thå buffeò fills. Apricot Control Device Thió  ió á softwarå devicå whicè enableó thå programmeò tï pasó parameteró  tï  routineó  iî  thå BIOÓ  foò  controllinç  variouó hardwarå  anä  softwarå  functionó withouô havinç  tï  resorô  tï assemblù languagå programming® Aó á resulô nï low-leveì hardwarå knowledgå oæ thå Apricoô ió requireä bù applicationó programmers. System Configuration Block Thå  systeí  configuratioî  blocë ió á smalì ãž3blocë  oæ  memorù whicè  containó thå referencå valueó thaô thå BIOÓ useó foò  porô characteristics¬  characteò setó anä keyboarä tables® Bù changinç certaiî partó oæ thió areá iô becomeó easù foò thå programmeò  tï changå thå hardwarå anä softwarå configuratioî oæ thå Apricot. MicroScreen driver Á simplå methoä oæ controllinç thå MicroScreeî haó beeî deviseä wherebù  iô  ió  consistenô  witè thå  standarä  Apricoô  (Siriuó compatible©  screen®  Thå Escapå sequenceó utiliseä oî thå  laãž3rgå Apricoô screeî arå thå samå aó oî thå MicroScreen¬  foò  example¬ thå cleaò screeî commanä ió thå samå aó oî thå largå screen. Time and Date Clock Thå  timå  oæ daù clocë (locateä withiî thå Keyboard© haó  beeî fullù  integrateä withiî thå BIOS®  Sï oî poweò up¬  MS-DOÓ  wilì displaù  thå  correcô timå anä datå whicè caî easilù  bå  changeä witè thå TIMÅ anä DATÅ commands. Calculator Froí poweò up¬  á simplå four-functioî calculatoò ió  availablå withouô  thå neeä tï inseãž3rô á disk®  Thió calculatoò caî alsï  bå accesseä  froí withiî aî applicatioî anä resultó oæ  calculationó caî  bå  senô  tï thå screeî aó iæ theù werå typeä  iî  froí  thå keyboard. Š General Hardware support Thå BIOÓ alsï supportó thå Apricoô hardwarå tï á greateò extenô thaî oî otheò systems: Thå Keyboard.„  Eacè oæ thå keyó oî thå Apricoô keyboarä  caî  bå madå tï producå uð tï threå differenô codes¬  wheî presseä iî thå Unshifted¬ Shifteä oò Controì modes® Theså codeó caî be: ãž3 1. A single character. 2. A string of characters, maximum length 255. 3. Á numbeò oæ prefiø codeó caî bå sent¬ sucè aó ESCAPE. 4® Thå keù caî bå defineä aó LOCAL¬  wherå itó outpuô ió senô directlù tï thå screeî driver. 5® Thå keù caî havå á combinatioî oæ attributes¬ wherå iô caî bå affecteä bù thå CAPÓ lock¬ oò SHIFÔ locë modes. 6® Aî auto-repeaô modå caî bå selecteä wherå á depresseä keù continueó producinç itó codå ãž3untiì released Screeî  Driver.„ Thå screeî displaù ió totallù compatiblå witè thå Sirius® Alì thå escapå codeó caî bå useä directly¬ anä thå screeî buffeò  ió physicallù iî thå samå placå withiî  memory®  Alì  thå characteò   attributeó  (reverse¬   underline¬   higè  intensity¬ strikeout©  arå  supported®  Alsï  includeä ió  thå  ANSÉ  escapå sequencå  set¬  (whicè ió IBÍ Pà compatible©  allowinç  extremelù advanceä  screeî  modeó  sucè  aó windowinç anä  lefô  anä  righô scrollinç tï bå ãž3incorporateä withiî applications. Characteò  sets.„  Thå  characteò seô celì ió  Siriuó  Compatible¬ usinç thå fulì 10x1¶ matrix¬  witè shapeó easilù changeä bù usinç thå Fonô Editor. Communications.„  Aî  auxilliarù  seriaì  RS23²  anä  á   paralleì Centronics-compatiblå  port¬  fullù  supporteä withiî  thå  BIOS¬ ensurå  thaô thå Apricoô immediatelù haó accesó tï manù  hardwarå add-onó sucè aó printers¬ plotteró anä modems. Graphics.„  Thå Digitaì Researcè Graphicó Systeí  Extension¬ãž 3  fasô becominç thå "industrù standard¢ graphicó applicatioî softwarå ió fullù supported. Iô haó itó owî applicatioî interfacå iî thå forí oæ á GDOS¬  tï thå  graphicó devicå driveò (calleä thå GIOS©  whicè  facilitateó easù  developmenô  oæ graphicó applicationó oî thå  Apricot®  Thå fulì  80° ø 40° pixeì resolutioî ió useä bù GSX¬  creatinç á verù powerfuì graphicó system. .paãž4.HE HARDWARÅ .OP .fo # HARDWARE List of Contents Page INTRODUCTION 2 SYSTEM UNIT  3 KEYBOARD UNIT ãž4 4 DISPLAY UNIT 6 List of Illustrations Figure Apricot Computer 1 Apricot Computer block diagram 2 .pa ŠINTRODUCTION Thå  Apricoô  ió thå generiã namå giveî tï á familù  oæ  16-biô microcomputers¬ possessinç á diverså rangå oæ hardwarãž4å facilitieó tï  suiô thå needó anä requirementó oæ thå useò iî á widå varietù oæ applications®  Eacè membeò oæ thå familù ió produceä  startinç froí  aî Apricoô iî itó basiã operationaì configuration®  Thió ió theî  transformeä  intï á differenô membeò oæ thå familù  bù  thå additioî oæ options¬  aó required®  Á morå detaileä treatmenô  oæ thå optionó ió provideä iî á subsequenô chapter. Alì Apricoô computeró arå composeä oæ threå separatå elementó» á Systeí Unit¬  á Keyboarä Uniô anä áãž4 Displaù Uniô aó illustrateä on Figure 1® Thå  Systeí Uniô ió thå areá oæ thå computer¬  whicè houseó thå majoritù oæ thå processinç elements¬ thå systeí memorù componentó anä  thå interfacå circuitrù foò peripheraì equipment®  Thå  Uniô alsï containó thå followinç items: (a) At least one micro floppy disk drive. (b) A power supply module. (c) A loudspeaker. (d) A cooling fan. Thå  Keyboarä  Uniô consistó of¬  á standarä layouô  typewriteò keãž4yboard¬  á calculatoò keypad¬ á numbeò oæ programmablå functioî keyó  witè  associateä LEÄ indicators¬  á seô oæ "fixeä" functioî keys¬ anä á ² linå bù 4° characteò MicroScreen® Thå Keyboarä Uniô alsï  containó processinç circuitrù whicè provideó thå  interfacå betweeî thå keyó anä thå Systeí Unit® Thå   standarä  Displaù  Uniô  ió  á  higè  resolutioî  ¹  incè monochromå displaù whicè fitó intï á shallo÷ recesó oî thå toð oæ thå  Systeí  Unit®  Thå Displaù Uniô tilts¬  swiveló anä  slidãž4es¬ enablinç  thå  operatoò  tï positioî thå screeî  tï  obtaiî  thå optimuí viewinç angle® Aî anti-reflectivå mesè ió incorporateä oî thå screeî tï minimiså thå possibilitù oæ eyå fatigue® Iî  itó basiã configuration¬  thå Apricoô Computeò incorporateó thå following: (a) An Intel 8086 16-bit processor. (b) An Intel 8089 16-bit input/output processor. (c) 256 Kbytes of dynamic RAM. (d) A single 3.5 inch MicroFloppy disk drive. (e) A Centrãž4onics parallel port for connecting a printer. (f© Aî RS232à seriaì interfacå for data communications. (g) A port for connecting a "mouse" device. (h) A sound generator to provide audio feedback. (i© Twï  internaì  expansioî  slotó  tï  cateò  foò  RAÍ expansion and connecting other optional facilities. (j© Á  porô foò connectinç á lighô peî  pluó  associateä ancillarù electronics. Š Thå baãž4siã configuratioî oæ thå microcomputeò caî bå expandeä bù thå additioî oæ twï furtheò options, iî additioî tï thå  optionaì facilitieó availablå viá thå internaì expansioî slots®  Theså twï furtheò optionó arå aó follows: (a) A second 3.5 inch MicroFloppy disk drive. (b© Á numeriã datá processoò (Inteì 8087© tï increaså thå processinç   capabilitieó   oæ  thå   microcomputeò   iî mathematicaì anä scientifiã applications. Connectionó foò thå printerãž 4, datá communicationó equipmenô  anä mainó  inpuô arå locateä aô thå reaò oæ thå Systeí Unit, togetheò witè connectoró foò thå Keyboarä anä Displaù Units® Thå expansioî slotó  anä  thå  connectioî  foò thå  lighô  peî  anä  associateä circuitrù arå locateä withiî thå Systeí Unit®  Thå connectioî foò thå "mouse¢ devicå ió locateä aô thå reaò oæ thå Keyboarä Unit. SYSTEM UNIT Alì thå processinç anä controì circuitrù withiî thå Systeí Uniô ió containeä  oî á singlå printeä circuiô  board,ãž5 designateä  thå Systeí Board¬ whicè ió fitteä horizontallù insidå thå Systeí Uniô housing®  Thå majoò elementó oæ thå Systeí Boarä arå  illustrateä oî thå blocë diagram¬ Figurå 2® Thå Systeí Boarä incorporateó thå followinç items: (a) The system processing elements. (b) The Boot PROMs. (c) 256 Kbytes of DRAM. (d) A floppy disk controller. (e) A parallel printer interface. (f© Á duaì channeì seriaì interface¬  onå channeì foò thå ãž5 Keyboarä anä thå otheò foò thå RS232à connector. (g© Á displaù controlleò. (h) Two expansion slots. Thå processinç elementó oî thå Systeí Boarä arå arrangeä iî  á multiprocessinç  configuratioî whicè includeó twï  Inteì  16-biô microprocessors»  aî  808¶  centraì processinç uniô (CPU© anä  aî 808¹  inpuô/outpuô processoò (IOP)®  Thå twï microprocessoró  arå connecteä  iî  paralleì anä sharå á commoî  buó  structure®  Thió configuratioî  ió  termeä (bù  Intel)¬  á  loãž5caì  multiprocessinç configuration®  Thå  numbeò  oæ microprocessoró withiî thå  locaì multiprocessinç  configuratioî  ió increaseä tï  threå  iæ  thå optionaì Inteì 808· numeriã datá processoò (NDP© ió fitted. Iî thå  locaì multiprocessinç configuration, onlù  onå  oæ  thå microprocessoró  haó  accesó tï thå shareä address¬  controì  anä datá  buseó  aô  anù onå time®  Thå  inpuô/outpuô  processoò  ió employeä tï perforí thå bulë oæ routinå datá transfers¬ undeò thå directioî  oæ thåãž5 centraì processinç unit®  Higè speeä DMÁ  datá transfers¬  froí  á  selecteä sourcå (memorù oò peripheral© tï  á selecteä destinatioî (memorù oò peripheral)¬ arå performeä bù thå IOP®  Thå  IOР ió  ablå  tï transfeò  datá  whilsô  thå  centraì processinç  uniô  ió  engageä iî executinç  taskó  whicè  dï  noô Šrequirå uså oæ thå buses. Thå 8087 numeriã  datá   processoò  extendó   thå    processinç capabilitieó  oæ thå Apricoô computer¬  bù performinç  arithmetiã anä comparisoî operationóãž5 oî numeriã typeó whicè caî varù froí 1¶ tï  8°  bits® Iô is alsï ablå tï executå  numerouó transcendentaì functions (e.g.tangenô anä logarithmiã functions). Thå  Apricoô  computeò  useó 3.µ incè Sonù  disë  driveó  anä employó thå IBÍ systeí 3´ formaô iî thå doublå densitù mode, witè 51² byteó peò sectoò (anä ¹ sectoró peò track©. Thå totaì storagå capacitù  oæ  eacè  disë ió 31µ Kbytes oæ  formatteä  data®  Thå floppù  disë controlleò incorporateó thå necessarù capabilitù  tï controìãž5  á seconä floppù disë drivå withouô anù  modificatioî  tï thå hardware. Thå  seriaì  interfacå  provideó  twï  separatå  channels»  onå channeì  foò  communicatioî  betweeî  thå Systeí  Boarä  anä  thå Keyboarä Unit»  thå seconä channeì foò communicatioî betweeî  thå Systeí  Boarä anä datá communicationó equipment®  Thå seriaì linë tï  thå  keyboarä ió á fulì  dupleø  asynchronouó  communicationó channel¬ whicè transmitó anä receiveó datá aô á fixeä bauä rate. Thå  RS232à channeì  caãž5î  bå programmeä  tï  operatå  iî  botè asynchronouó anä  synchronouó modes, witè thå  programmeò  havinç independenô  controì  oveò transmiô anä receivå bauä  rates®  Thå rateó  caî bå generateä bù eitheò aî internaì programmablå  timeò oò determineä bù thå externaì datá communicationó equipment® Botè bytå  anä  biô orienteä synchronouó modeó  arå  available®  Theså includå thå bytå orienteä modes, Monosynã anä Bisync, anä thå biô orienteä modes¬ SDLà anä HDLC. Thå  twï  expansioî  slotóãž5 arå identicaì anä  allo÷  thå  basiã configuratioî  oæ thå computeò tï bå expandeä bù thå additioî  oæ optionaì  expansioî  cards®  Thå  expansioî buó consistó  oæ  thå processinç  systeí buseó (address¬  controì anä datá buses©  pluó additionaì  controì anä timinç signals®  Theså includå  interrupô requesô lineó anä controì lineó foò DMÁ transfers® Regulateä  supplù voltages¬  foò thå  Systeí  Board¬  Keyboarä Unit¬ Monitoò Unit¬ floppù disë drive(s© anä anù optionaì boardó connectãž 5eä  tï  thå expansioî slots¬  arå supplieä froí thå  poweò supplù  modulå locateä withiî thå Systeí Unit®  Á switcè  oî  thå reaò oæ thå Systeí Uniô switcheó thå mainó supplù througè tï  thå poweò supplù module® Aî LEÄ iî thå centrå oæ thå Keyboarä actó aó a poweò supplù presenô indicator® .pa ŠKEYBOARD UNIT Thå  Keyboarä  Uniô provideó thå normaì interfacå  betweeî  thå useò anä thå microcomputer®  Thå keyó oæ thå Keyboarä arå divideä intï á numbeò oæ functionaì groups¬ aó follows: ãž6 (a© Thå standarä typewriter¬  cursoò controì anä  editinç keyó occupyinç thå majoritù oæ thå keyboarä space. (b© Thå calculatoò keypaä locateä aô thå faò righô oæ thå keyboard. (c© Á grouð oæ generaì functioî keys¨ greù keyó  locateä abovå thå typewriteò keys). (d© Á  grouð oæ "soft¢ functioî keys. ¨ Thå siø  membranå keyó locateä directlù belo÷ thå MicroScreen).ãž6 Thå  systeí  reseô buttoî ió locateä oî thå righô hanä sidå  oæ thå Keyboarä anä haó á onå seconä delaù tï prevenô thå accidentaì resettinç oæ thå system. Iî  additioî  tï thå keys¬  thå Keyboarä Uniô haó á  numbeò  oæ displaù  features¬ whicè arå  thå  siø LEDó anä thå MicroScreen. Theså  arå  controlleä bù softwarå froí thå  Systeí  Unit¬  whicè transmitó the displaù data tï thå Keyboarä viá thå seriaì link. Thå  siø LEDó arå useä tï signifù whetheò thå siø sofô functioî keyó  ãž6arå availablå foò operation®  Thå MicroScreeî ió á twï linå bù   fortù characteò  liquiä  crystaì  displaù  unit, witè   eacè characteò  consistinç oæ á fivå bù seveî doô matrix. Á thumbwheeì controì  oî thå righô hanä sidå oæ thå Keyboarä Uniô adjustó  thå viewing angle of thå MicroScreen. Thå MicroScreeî caî bå useä iî á varietù oæ  applications; e.g® foò displaying: (a© Á  reaì timå clock¬ consistinç oæ thå time, thå  daù anä thå date. (b) Labels ãž6for the six 'soft' function keys. (c) A copy of the data as it appears on the CRT display. (d) System prompts. (e) Operands and results during calculator operations. Thå electroniã circuitrù oæ thå Keyboarä Uniô ió containeä oî á singlå  printeä  circuiô  boarä fitteä  horizontallù  withiî  thå Keyboarä  Uniô housing. Á blocë diagraí oæ thå keyboarä circuitrù ió showî oî Figurå 2a/2b. Alì  thå  keyó arå oæ á capacitivå typå witè keyboarä  scanninç performeä usinãž6ç  á singlå chið  microcomputer. Thå  microcomputeò translateó  thå  selecteä keù switcè intï á scaî codå, whicè  ió transferreä tï thå Systeí Uniô viá thå seriaì link. Thå  uså  oæ scaî codeó enableó applicatioî programó tï redefinå thå codå  (oò sequenceó oæ codes© generateä bù thå system, aó required® .pa Š Alì  communicatioî betweeî thå Keyboarä anä thå Systeí Uniô  ió handleä bù thå microcomputeò withiî thå Keyboard®  Iî additioî tï transmittinç thå  keyboarä  scaî codeó tï  thå  Sysãž6teí  Unit, thå microcomputeò  alsï  provideó thå Systeí Uniô witè thå  followinç seriaì dataº (a© Currenô timå anä datå informatioî oî requesô froí thå Systeí Unit. (b© Controì codeó generateä bù thå movemenô oæ á "mouse¢ device, wheî connecteä tï thå Keyboarä mouså port® Thå  timå  anä  datå informatioî ió generateä bù  á  reaì  timå clock/calendaò  chið  oî thå Keyboarä circuiô  board®  Á  batterù (standarä PP3© back-uð supplù ió connecteä tï thå ãž6 clock/calendaò tï  allo÷  iô  tï continuå functioninç wheî thå mainó  supplù  ió switcheä off. DISPLAY UNIT Thå standarä Displaù Uniô ió á higè resolutioî ¹ incè greeî  oî blacë  display®  Á  lonç persistencå phosphoò ¨ P39© ió  useä  tï reducå  operatoò  eyå fatiguå bù minimisinç  displaù  flicker®  Á controì  nexô  tï  thå  recesseä  carryinç  handlå  adjustó   thå brightnesó oæ thå display. Thå  Displaù Uniô ió connecteä tï thå Systeí Uniô bù meanó oæ á siø waù cable¬ whicè ãž6carrieó thå videï data¬ synchronisinç pulseó and +12V supply. Thå Apricoô computeò ió capablå oæ displayinç biô mappeä imageó witè  á  resolutioî  oæ 80° pixeló  horizontallù  bù  400  pixeló vertically®   Iî  thå  characteò  mode¬ á text displaù areá oæ 8° characteró bù 2µ lineó ió available¬ usinç á characteò celì oæ 1° pixeló bù 16 pixels®  Thå videï attributeó iî thå characteò  modå are: (a) Reverse (b) Highlight (c) Underline (d) Strike-through ãž 6 .pa Š Figure 1. Apricot Computer Š Figure 2a. Apricot Computer block diagram Š Figure 2b. Apricot Computer block diagram ãž7 A.C.T. (Advanced Technology). 2 Castle Hill, Dudley, W. Midlands. Preferred Techniques and Procedures for Printed Circuit Artworks. Author: Alan Scott Revision: 02 Date: 18-May-1983 Last page: 10 .PA Š.HE Introduction. Thió   documenô  ió  intendeä  tï  providå  guidelineó  foò   thå production of printed circuit board artworks. Generaì aspectó oæ pcâ artworkó aãž7rå covereä iî thå firsô section, anä  subsequenô  sectionó  deaì witè detailó  foò  tracë  layers¬ solder resist layers, drilling drawings and component silk screens. Deviationó  froí  thå  design ruleó arå onlù alloweä  bù  prioò agreemenô witè ACÔ (Advanceä Technology). Querieó  abouô physicaì dimensionó oæ componentó wilì bå resolveä by ACT personnel. .PA Š.HE General Design Rules. Boarä  mechanicaì anä materiaì specificationó, anä toleranceó, wilì bå provideä bù ACT. One of four aãž7rtwork mediums may be used:- i) Red tape, red or black pads. ii) Red and Blue tape, black pads. iii) Black crepe tracks and pads. iv) Photoplotted artworks. Transfeò  typå  padó  maù bå useä buô shoulä bå  applieä  tï  thå reverse side of the film to avoid damage when cutting tracks. Anù  tapeä artworë musô noô uså curveä tracking¬  alì changeó  oæ directioî musô bå bù 4µ oò 9° degrees. Reä  anä Bluå artworkó shoulä bå donå oî differenô filmó (noô  oî onå  oò  botèãž7 sideó oæ á singlå film)®  Carå shoulä bå  takeî  tï ensurå  thaô alì bluå tapeó arå oæ á uniforí densitù anä  colour® Colouò separatioî photographù shoulä bå avoided. Artworks must be taped at two or four to one scale. Cleaò mylaò filí shoulä bå useä foò alì tapeä  artworks®  Griddeä (0.1inch)¬  mylaò  filmó  maù bå useä iæ thå accuracù aô  20à ió betteò  thaî  +/-0.05mí iî 1000mm®  Filí thicknesó shoulä  bå  aô leasô 3 thou. Stability should be better than 0.002% per degree Celcius. Padó ãž7maù bå positioneä oî á 0.0µ incè grid¬  (truå size)¬  (i.e.¬ everù 0.± incè aô twï tï onå anä everù 0.² incè aô fouò tï one). Soldeò  sidå trackó shoulä ruî witè thå longesô dimensioî oæ  thå boarä tï facilitatå flo÷ soldering® Eitheò oæ twï Ià orientationó maù  bå used¬  orthogonaì tï thå boarä edges¬  witè piî ± neaò tï thå  DIΠ connectoò enä oæ thå board®  Seå figurå  1®  Alì  axiaì componentó shoulä bå iî thå samå orientation. Autï insertioî oæ componentó wilì bå used®  Minimuí pitcè oæãž7  DIÌ packó ió 0.4µ iî (foò 0.³ packs© sidå tï side¬ anä 1.± iî (foò 2° piî pack© enä tï end®  Thió latteò dimensioî musô bå increaseä tï 1.2 in if an axial decoupling capacitor is fitted between packs. Thå  minimuí  axiaì spacinç ió 0.1µ iî (foò TR´  resistors)¬  buô clearancå  shoulä  bå  giveî foò componenô  bodieó  aó  required® Minimuí  shouldeò  oæ 0.1iî (0.1µ iî preferred©  foò  eacè  lead¬ i.e., hole pitch is body length plus 0.2in min. .PA Š Twï  sideä  artworkó MUSÔ havå á welì grãž7iddeä poweò  distributioî scheme¬  includinç  á rinç distributioî oæ 0Ö anä 5Ö  arounä  thå peripherù  oæ  thå board®  Stand-uð buó baò distributioî  maù  bå alloweä afteò consultatioî witè ACT® Poweò  distributioî  oî  multilayeò boardó  shoulä  uså  thå  twï innermost layers for 0V and 5V. Threå alignmenô bullseyeó shoulä bå applieä tï eacè artwork. Threå  referencå  holeó  shoulä  bå includeä  oî  thå  boarä  foò mechanical alignment and profiling referencing. Thå   followinç  ió  ãž7á  lisô  oæ  considerationó  oæ  whicè   thå draughtperson should be aware. Mechanical. Accessibilitù oæ adjustablå components¬  jumpeò optionó  anä test points. Are there forbidden areas on the board for mounting etc? Adequate component clearance (3d) for auto insertion? Are components accessible for replacement? Are heavy components, connectors etc mechanically secured? Electrical. Does component layout give a logical signal flow? Have undesirãž 7able couplings and shared paths been avoided? Can the board be connected to test equipment easily? Are clock lines routed by shortest paths? Drawing. Are all mechanical dimensions given and toleranced? Is correct referenceing used? Have special minimum spacings been observed? Arå  alì soldeò padó oæ standarä sizå anä positioneä oî  thå grid? Crystaì componentó requirå á groundeä coppeò areá anä á groundeä retaining strap¬  anä  trackinç  shoulä noô pãž8asó  underneatè  thå crystal. Alì  artworë layeró anä drawingó musô contaiî thå  companù  name¬ boarä  title¬  boarä  numbeò anä  layeò  description®  Multilayeò boardó  shoulä providå aî alphabeticaì sequencå thaô ió  readablå froí thå componenô sidå wheî alì layeró arå present®  Eacè letteò appearó  oî  thå appropriatå layeò iî thå correcô  position®  Foò examplå witè threå layers:- --------------- --------------- --------------- | A | B ãž8 | C | | | When correctly assembled will give:- --------------- ü ABC | | ŠNote that windows must be provided in continuous planes. Thió procedurå alsï giveó thå boarä manufactureò aî indicatioî oæ thå ordeò oæ thå layers¬  i.e.¬ Á ió tracë side¬  ió inner¬ à ió component side. .PA Š.HE Tracking Layers. Trackinç  layeró  shoulä bå produceä aó pãž8ositives®  Padó must  bå soliä  oî alì buô onå outeò layeò wherå annulé shoulä bå useä  tï assist sight drilling. Recommendeä  tracë  sizå (lo÷ currenô anä <20V,©/spacinç  (oî paralleì  runninç tracks)¬  ió 15/15 thou®  Clearancå  betweeî  á tracë and a pad may be reduced to 10 thou as required. Minimuí  size/spacinç  ió  12/10,  buô 10/10  maù  bå  useä  undeò exceptional circumstances after prior agreement with ACT. Voltages upto 250 VAC require a spacing of 3.5mm minimum. Higher current cãž8onductors require:- Max current Conductor width. ----------- --------------- 2.5A 32 thou 5.0A 80 thou 10.0A 180 thou Minimuí coppeò thicknesó ió 1/2oú foò inneò layeró anä ± oú (² oú preferred© foò outeò layers. Trackó oî anù layeò (eveî inneò layers)¬  shoulä noô approacè thå board outline closer than 0.1inch. Beware forbidden areas. Numbeò  oæ  differenô  signaì tracë sizeãž8ó shoulä  bå  kepô  tï  á minimum¬ preferablù two® Signaì  pinó connecteä tï 0Ö oò +5Ö shoulä preferablù bå  trackeä on an outer layer. Tracking should be limited to one run between IC pads. Trackó  crossinç  thå  directioî oæ flo÷ solderinç musô  havå  aô least 15 thoõ separation. Grounä  oò  voltagå  planå connectionó shoulä noô  bå  soliä  buô shoulä  uså aî annulaò clearancå witè twï crosseä trackó  joininç the pad to the plane. This avoids a heat sinking effect. Largå  soliä  areaãž8ó  oæ coppeò oî outeò layeró  shoulä  bå  crosó hatcheä witè 5° thoõ trackinç oî 10° thoõ pitcè aô botè 4µ degreå angles. Padó  shoulä  providå aô leasô á  1²  thoõ  annulus¬  i.e.¬  paä diameter should be at least 24 thou larger than the hole. Prefereä  circulaò paä diameteò ió 6µ thoõ foò á 3² thou / 0.8 mí hole. Via holes of 0.5mm diameter require a 55 thou pad. .PA ŠOvaì  padó arå prefereä foò DIÌ packageó tï increaså thå paä areá without reducing the spacing between pads;- ü  Ï ãž8 1µ  ü 1² ü 1µ ü 1µ ü 1µ ü 1²  ü  1µ Ï | \ / | | | | \ / \ / | | | | \ / ---- / | | \ ---- / | | \ / | | \ / | | \ / | | \ oval IC pad between pins oval IC pad ãž8 track .PA Š.HE Solder Resist. Solder resist artworks may be positive or negative. All pads and via holes should have resist clearance. Clearancå  padó shoulä padó shoulä havå á diameteò 10 thoõ  largeò than the copper pad. Resist pads should be solid. .PA Š.HE Drilling Drawing. Thå  numbeò oæ differenô drilì sizeó shoulä bå kepô tï á minimum¬ preferably five or less. Recommended hole sizes (after through hole plating) are :- Hole Dia in mm Typical usage. ãž 8 -------------- -------------- 0.¸  Generaì  usage¬  Ià leads¬  resistors¬ transistors, capacitors. 0.9 IDC and DIN connectors. 1.0 0.1" Molex posts. 2.8 Mounting and reference holes. Viá  holeó  maù  bå 0.8mí typicaì oò 0.5mí wherå spacå  ió  aô  á premium. Holeó  shoulä bå 0.3mí greateò iî diameteò thaî thå diameteò  oò diagonal of the component lead. .PA Š.HE ãž9 Silk Screen. Silë  screeî  informatioî  shoulä includå  componenô  references¬ polaritieó anä orientations¬  alì oæ whicè shoulä remaiî  visiblå afteò assemblù oæ thå component. Board related information is as follows:- Example ---------- Board name. Processor board. Board number. PCB100234 Company name. ACT Ltd. Company logo. Board usage. Slot 5, Super-Widgetãž9 Issuå level®   Issuå  03®   (artworë issue). Mod level. Block. Variant. Block. (e.g., 5 or 8 MHz clock) 'Block§  signifieó á blanë areá oæ silë screeî foò hanä  printinç of factory configurations etc. Issuå leveló arå updateä bù changeó tï thå masteò artwork. Moä  leveló arå updateä bù Engineerinç Changå Noteó tï alteò  thå trackinç etã bù hand® Varianô detailó arå foò differenô assembleä versionó oæ thå samå PCB. ãž9.fo # .he BOOT ROM BOOÔ ROM INTRODUCTION Thå  Apricot'ó Internaì Booô ROÍ containó thå softwarå whicè ió executeä firsô oæ alì wheî thå machinå ió switcheä on®  Thå  ROÍ containó  á  calculator¬  anä á numbeò oæ softwarå  anä  hardwarå tests®  Wheî  á disë ió inserteä anä thå conditionó foò  bootinç arå satisfactory¬  thå booôãž9 ROÍ wilì loaä iî thå operatinç systeí anä  executå  it®  Belo÷  ió á blocë diagraí  oæ  thå  boot-ROM'ó operation. 1. Initialize Hardware 2. Print logo and "Testing" message on the screen 3. Perform Software tests on hardware 4. Display the results of the tests 5. Cycle in an enless loop testing for the Calculator key or a disk being inserted 6. When a disk is inserted, check for validity as a system disk and read in then execute the Bios APPLICATIONS Iãž9NTEREST Verù  littlå uså caî bå madå oæ thå booô ROÍ froí  applicationó software® Onå oæ thå featureó iô haó ió aî abilitù tï "cold-boot¢ thå machine®  Thå ROÍ entrù poinô (Aô 0FFFÆ hex© haó tï bå jumpeä to. Programming Example : Software Reset 5000 rem -- "GOTO 5000" will have the same effect as pressing reset. 5010 def seg=&hffff:boot=0:call boot Thå Logï thaô ió loadeä froí disë caî alsï bå displayed¬ iæ thå standarä  Apricoô logï ió used¬  iô wilì bå á copù oæ thå onå  iî thãž9e Boot ROM Programming example : Logo Display Program Thió routinå wilì displaù thå Apricoô Logï iî thå centrå oæ thå screen at the top: 10 def seg=&Hf000:o=-2:for l=195 to 207 20 o=o+1:poke l*2+160,114+o:poke l*2+161,67 30 poke l*2,93+o:poke l*2+1,67:next 40 poke 252,82:poke 253,67:poke 242,77:poke 243,67  thaô ió loadeä froí disë caî alsï bå displayed¬ iæ thå standarä  Apricoô logï ió used¬  iô wilì bå á copù oæ thå onå  iî thãž9.he Apricot Disk Problems Therå  havå  beeî á numbeò oæ problemó reporteä relatinç tï  disë erroró oî thå Apricot®  Iî productioî á numbeò oæ machineó  sho÷ aî excessivå numbeò oæ erroró durinç burn-in® Alsï á significanô numbeò oæ machineó havå beeî returneä froí thå field¬ whicè woulä not boot. Thå  erroró  iî productioî appear¬  generally¬  wheî thå  machinå haó  beeî  runninç foò 45-5° houró anä thå erroò ratå ió  á  steð function®  Virtuallù  nï erroró arå seeãž9î uð tï thió poinô  anä  á largå  numbeò  afteò  this®   Thå  increaså  iî  erroò  ratå  ió accompanieä  bù  á hissinç noiså froí thå directioî oæ  thå  disë drive, which disappears when a new disk is inserted. Thå  machineó thaô arå returneä tï Computeò Maintenancå wilì  noô booô  froí  eitheò thå supplieä diskó oò  otheò  disks®  Iæ  thå WD279·  ió set-uð agaiî theî thå machinå functionó satisfactorilù anä thå machineó arå noô returneä agaiî witè thå samå oò  relateä faults. Therå  aãž 9rå  alsï á significanô numbeò oæ failureó durinç  burn-iî that are cured by re-aligning the WD2797. Thå  firsô probleí doeó seeí tï bå consistenô witè á  mediá  weaò problem®  Thió  ió becauså thå quoteä mediá lifå ió onå  millioî passes per track. Iî  5° houró thå disë rotateó 50x60x60° timeó ¨ thå diskó  rotatå aô 60° rpm® © i.å 1.¸ millioî revolutions® No÷ thå disë heaä ió abouô  .1² incheó wide¬  thå disë tracë densitù ió 13µ trackó peò incè anä thå disë haó 7° tracks® Thuó thå heaãž:ä occupieó abouô 1¶ trackó  aô once®  Iæ accesseó werå evenlù distributeä thå  therå woulä bå 45° thousanä passeó peò tracë iî 5° hours¬ howeveò sincå á  butterflù  algorithí  ió  useä thå  accesseó  arå  noô  evenlù distributeä anä sï therå wilì bå arounä á millioî passeó oveò thå centrå tracks® Thereforå á significanô numbeò oæ erroró woulä bå expecteä  afteò  thió poinô anä mostlù iî thå centrå trackó  i.e® trackó 3° tï 40® Thå positioî oæ thå observeä erroró haó noô yeô been verified ãž:but the facts and theory are otherwise consistent. Iô  ió worryinç howeveò thaô thå erroò ratå increaseó sï  rapidlù afteò  5° houró anä Sonù shoulä bå consulteä abouô  this®  Sincå significanô  weaò occuró eveî iî 2´ houró therå ió likelù  tï  bå somå  oxidå depositioî oî thå heaä sï iô ió probablù necessarù tï cleaî  thå  headó beforå thå machineó arå  shipped®  Agaiî  Sonù should be consulted about the advisability of this. .pa Š Iô ió difficulô tï makå anù definitivå statemenô oî thå caãž:uså  oæ thå fielä returns¬  withouô examininç á faultù machinå iî detail® Howeveò  iô  ió possiblå thaô thå causå ió machineó  leavinç  thå factorù witè marginaì disë controlleò set-up® Iô ió difficulô tï seå  ho÷ theså machineó pasó burn-iî unlesó thå cuô ofæ oî erroró ió  toï  liberal®  Sincå á significanô numbeò oæ  machineó  faiì burn-iî duå tï thió iô ió likelù thaô thå set-uð procedurå ió toï difficult® Wå arå currentlù tryinç tï establisè aî easieò methoä for this. Thå  completãž:å tesô cyclå takeó approximatelù 5° minuteó sï durinç 2´  houró  8x512x2x630x60x24/5° ½ 1.µ millioî bitó  (¸  bitó  51² byteó  peò sector¬  63° sectoró peò disë anä twï readó froí  eacè sectoò   durinç  á  cycle©  wilì  bå  reaä  anä  therå  wilì   bå 2x630x60x24/5° ½ 3600° seeë operationó oî eacè drive® Thuó sincå thå  quoteä biô erroò ratå ió onå iî 1° exð ¹ anä thå seeë  erroò ratå  onå iî 1° exð ¶ anù machinå witè morå thaî onå oæ eacè typå of error on each drive should not be released. ãž: Aó á finaì QÁ checë iô woulä bå wortè checkinç thaô thå  machineó wilì  booô  froí  thå  'in-the-box§  diskó  tï  simulatå  initiaì customer usage. The required actions are: 1.  Tï talë tï Sonù abouô thå mediá weaò probleí anä heaä          cleaning. 2.  Advanceä Technologù tï investigatå thå nexô machinå          returneä tï Computeò Maintenancå witè disë problemó tï          establish the true cause of the fault.      3.  Advanceä Technologù tï providå á morå acãž:curatå anä          reliablå methoä oæ settinç uð thå WD2797¬ á          specificatioî oæ thå controlleò parameteró anä á          definitive statement on the acceptable error rate.           cleaning. 2.  Advanceä Technologù tï investigatå thå nexô machinå          returneä tï Computeò Maintenancå witè disë problemó tï          establish the true cause of the fault.      3.  Advanceä Technologù tï providå á morå acãž:.HE HARDWARÅ .OP .fo 1-# HARDWARE List of Contents Page INTRODUCTION 1-2 SYSTEM UNIT  1-3 KEYBOARD UNIT ãž: 1-4 DISPLAY UNIT 1-5 List of Illustrations Figure Apricot Computer 1.1 Apricot Computer block diagram 1.2 INTRODUCTION Thå Apricoô computeò ió á 16-biô microcomputeò composeä oæ threå separatå elements» á Systeí Unit¬ á Keyboarä Uniô anäãž : á Displaù Unit® Thå Systeí Uniô houseó thå majoritù oæ thå processinç anä controì circuitrù oæ thå microcomputeò togetheò with: (a) At least one micro floppy disk drive. (b) A power supply module. (c) A loudspeaker. (d) A cooling fan. Thå Keyboarä Uniô consistó of¬ á standarä layouô typewriteò keyboard¬ á calculatoò keypad¬ á numbeò oæ programmablå functioî keyó witè associateä LEÄ indicators¬ anä á ² linå bù 4° characteò microscreen® Thå Keyãž;boarä Uniô alsï containó processinç circuitrù whicè provideó thå interfacå betweeî thå keyó anä thå Systeí Unit® Thå standarä Displaù Uniô ió á higè resolutioî ¹ incè monochromå display. Iî itó basiã configuratioî thå ACÔ Personaì Computeò incorporateó thå following: (a) An Intel 8086 16-bit processor. (b) An Intel 8089 16-bit input output processor. (c) 256 Kbytes of dynamic RAM. (d) A single 3.5 inch micro floppy disk drive. (e) A ãž;Centronics parallel port for connecting a printer. (f© Aî RS232à seriaì interfacå for data communications. (g) A port for connecting a "mouse" device. (h) A sound generator to provide audio feedback. Š (i© Twï  internaì  expansioî  slotó  tï  cateò  foò  RAÍ expansion and connecting other optional facilities. (j© Á  porô foò connectinç á lighô peî  pluó  associateä ancilliarù electronics. ãž;Thå basiã configuratioî oæ thå microcomputeò caî bå expandeä bù thå additioî oæ twï furtheò options¬ iî additioî tï thå optionaì facilitieó availablå viá thå internaì expansioî slots® Theså twï furtheò optionó arå aó follows: (a) A second 3.5 inch micro floppy disk drive. (b© Á numeriã datá processoò (Inteì 8087© tï increaså thå processinç   capabilitieó   oæ  thå   microcomputeò   iî mathematicaì anä scientifiã applications. Connectionó ãž;foò thå printer,datá communicationó equipmenô anä mainó inpuô arå locateä aô thå reaò oæ thå Systeí Unit,togetheò witè connectoró foò thå Keyboarä anä Displaù Units® Thå expansioî slotó anä thå connectioî foò thå lighô peî anä associateä circuitrù arå locateä withiî thå Systeí Unit® Thå connectioî foò thå "mouse¢ devicå ió locateä aô thå reaò oæ thå Keyboarä Unit. SYSTEM UNIT Alì thå processinç anä controì circuitrù withiî thå Systeí Uniô ió containeä oî á singlå printeä circuiô board¬ãž; designateä thå Systeí Board¬ whicè ió fitteä horizontallù insidå thå Systeí Uniô housing® Thå majoò elementó oæ thå Systeí Boarä arå illustrateä oî thå blocë diagram¬ Figurå 1.2® Thå Systeí Boarä incorporateó thå followinç items: (a) The system processing elements. (b) The Boot PROMs. (c) 256 Kbytes of DRAM. (d) A floppy disk controller. (e) A parallel printer interface. (f© Á dual channeì seriaì interface,onå channeì foò thå keyboãž;ard and the other for the RS232C connector. (g© Á displaù controlleò. (h) Two expansion slots. Thå processinç elementó oî thå Systeí Boarä arå arrangeä iî á multiprocessinç configuratioî whicè includeó twï Inteì 16-biô microprocessors» aî 808¶ centaì processinç uniô (CPU© anä aî 808¹ inpuô outpuô processoò (IOP)® Thå twï microprocessoró arå connecteä iî paralleì anä sharå á commoî buó structure® Thió configuratioî ió termeä (bù Intel)¬ á locaì multiprocessinç configuratioãž;n® Thå numbeò oæ microprcessoró withiî thå locaì multiprocessinç configuratioî ió increaseä tï threå iæ thå optionaì Inteì 808· numeriã datá processoò (NDP© ió fitted. Š Iî thå  locaì multiprocessinç configuration, onlù  onå  oæ  thå microprocessoró haó accesó tï thå shareä address,controì anä datá buseó aô anù onå time®  Thå inpuô outpuô processoò ió employeä tï perforí thå  bulë oæ routinå datá transfers, undeò thå  directioî oæ   thå   centraì  processinç ãž; unit®   Higè   speeä   DMÁ   datá transfers, froí  á  selecteä  sourcå (memorù oò peripheral© tï  á selecteä destinatioî (memorù oò peripheral), arå performeä bù thå IOP®  Thå  IOР ió  ablå  tï transfeò  datá  whilsô  thå  centraì processinç  uniô  ió  engageä  iî executinç taskó  whicè  dï  noô requirå uså oæ thå buses. Thå 8087 numeriã  datá   processoò  (wheî   fitteä   intï   thå multiprocessinç    configuration)¬    extendó   thå    processinç capabilitieó  oæ thå Apricoô computer¬ãž ;  bù performinç  arithmetiã anä comparisoî operationó oî numeriã typeó whicè caî varù froí 1¶ tï  8°  bits® Iô is alsï ablå tï executå  numerouó transcendentaì functions (e.g.tangenô anä logarithmiã functions). Thå  Apricoô  computeò  useó 3.µ incè Sonù  disë  driveó  anä employó thå IBÍ systeí 3´ formaô iî thå doublå densitù mode, witè 51² byteó peò sectoò (anä ¹ sectoró peò track© .Thå totaì storagå capacitù  oæ  eacè disë ió 31µ Kbyteó  oæ  formatteä  data®  Thå floppù  disë controlãž<leò incorporateó thå necessarù capabilitù  tï controì  á  seconä floppù disë drivå withouô anù modificatioî  tï thå hardware. Thå seriaì interfacå provideó twï separatå channels;onå channeì foò  communicatioî  betweeî  thå System Boarä  anä  thå  Keyboarä Unit;thå  seconä  channeì foò communicatioî  betweeî  thå  Systeí Boarä  anä  datá communicationó equipment. Thå seriaì linë tï thå keyboarä  ió á fulì dupleø asynchronouó  communicationó  channel¬ whicè transmitó anä receiveó datá aô á ãž<fixeä bauä rate. Thå  RS232à channeì  caî  bå programmeä  tï  operatå  iî  botè asynchronouó anä  synchronouó modes, witè thå  programmeò  havinç independenô  controì  oveò transmiô anä receivå bauä  rates®  Thå rateó  caî bå generateä bù eitheò aî internaì programmablå  timeò oò determineä bù thå externaì datá communicationó equipment® Botè bytå  anä  biô orienteä synchronouó modeó  arå  available®  Theså includå thå bytå orienteä modes, Monosynã anä Bisync, anä thå biô orienteä modes¬ ãž<SDLà anä HDLC. Regulateä  supplù voltages¬  foò thå  Systeí  Board¬  Keyboarä Unit¬ Monitoò Unit¬ floppù disë drive(s© anä anù optionaì boardó connecteä  tï  thå expansioî slots¬  arå supplieä froí thå  poweò supplù  modulå locateä withiî thå Systeí Unit®  Á switcè  oî  thå reaò  oæ thå Systeí Uniô switcheó thå mainó supplù througè tï thå poweò supplù module. KEYBOARD UNIT Thå  Keyboarä  Uniô provideó thå normaì interfacå  betweeî  thå useò  anä  thå  microcomputer¬  viá thå keyãž<s®  Thå  keyó  oæ  thå keyboarä  arå  divideä  intï  á numbeò  oæ  functionaì  groups,aó follows: Š (a©  Thå standarä typewriter, cursoò controì  anä editinç keyó occupyinç thå majoritù oæ thå keyboarä space. (b©  Thå  calculatoò keypaä locateä aô thå faò  righô  oæ thå keyboard. (c©  Á grouð oæ generaì functioî keys¨ greù keyó  locateä abovå thå typewriteò keys). (d©  Á  grouð oæ "softãž<¢ functioî keys.¨ Thå siø  membranå keyó locateä directlù belo÷ thå microscreen). Thå  systeí  reseô buttoî ió locateä oî thå righô hanä sidå  oæ thå  keyboarä anä ió slightlù recesseä tï prevenô thå  accidentaì resettinç oæ thå system. Iî  additioî  tï thå keys¬  thå Keyboarä Uniô haó á  numbeò  oæ displaù  features¬ whicè arå  thå  siø LEDó anä thå microscreen. Theså  arå  controlleä bù softwarå froí thå  Systeí  Unit¬  whicè transmitó the displaù data tï thå keybãž<oarä viá thå seriaì link. Thå  siø LEDó arå useä tï signifù whetheò thå siø sofô functioî keyó  arå availablå foò operation®  Thå microscreeî ió á twï linå bù   fortù characteò  liquiä  crystaì  displaù  unit, witè   eacè characteò  consistinç oæ á fivå bù seveî doô matrix. Á thumbwheeì controì  oî thå righô hanä sidå oæ thå Keyboarä Uniô  provideó  á brightnesó controì foò thå microscreen. Thå microscreeî caî bå useä iî á varietù oæ  applications; e.g® foò displaying: (a© ãž< Á  reaì timå clock¬ consistinç oæ thå time, thå  daù anä thå date. (b) Labels for the six 'soft' function keys. (c) A copy of the data as it appears on the CRT display. (d) System prompts. (e) Operands and results during calculator operations. Thå electroniã circuitrù oæ thå Keyboarä Uniô ió containeä oî á singlå  printeä  circuiô  boarä fitteä  horizontallù  withiî  thå Keyboarä  Uniô housing. Á blocë diagraí oæ thå keyboarä circuitrù ãž<ió showî oî Figurå 1.2. Alì  thå  keyó arå oæ á capacitivå typå witè keyboarä  scanninç performeä usinç  á singlå chið  microcomputer. Thå  microcomputeò translateó  thå  selecteä keù switcè intï á scaî codå, whicè  ió transferreä tï thå Systeí Uniô viá thå seriaì link. Thå  uså  oæ scaî codeó enableó applicatioî programó tï redefinå thå codå  (oò sequenceó oæ codes© generateä bù thå system, aó required® Alì  communicatioî betweeî thå keyboarä anä thå Systeí Uniô  ió handleä bù tãž <hå microcomputeò withiî thå keyboard®  Iî additioî tï transmittinç thå  keyboarä  scaî codeó tï  thå  Systeí  Unit, thå microcomputeò  alsï  provideó thå Systeí Uniô witè thå  followinç seriaì dataº (a©  Currenô  timå anä datå informatioî oî  requesô  froí Š thå Systeí Unit. (b©  Controì codeó generateä bù thå movemenô oæ á "mouse¢ device, wheî connecteä tï thå keyboarä mouså port® Thå  timå  anä  datå informatioî ió generateä bù  á  reaì  timåãž= clock/calendaò  chið  oî thå keyboarä circuiô  board®  Á  batterù (standarä  PP9© back-uð supplù ió connecteä tï thå  generatoò  tï allo÷  iô  tï  continuå  functioninç wheî  thå  mainó  supplù  ió switcheä off. DISPLAY UNIT Thå standarä Displaù Uniô ió á higè resolutioî ¹ incè greeî  oî blacë  display®  Á  lonç persistancå phosphoò ¨ P39© ió  useä  tï reducå  operatoò  eyå fatiguå bù minimisinç  displaù  flicker®  Á controì  nexô  tï  thå  recesseä  carryinç  handlå  adjustó   thå ãž= brightnesó oæ thå display. Thå  Displaù Uniô ió connecteä tï thå Systeí Uniô bù meanó oæ á siø waù cable¬ whicè carrieó thå videï data¬ synchronisinç pulseó and +12V supply. Thå Apricoô computeò ió capablå oæ displayinç biô mappeä imageó witè  á  resolutioî  oæ 80° pixeló  horizontallù  bù  32µ  pixeló vertically®   Iî  thå  characteò  mode¬ á text displaù areá oæ 8° characteró bù 2µ lineó ió available¬ usinç á characteò celì oæ 1° pixeló bù 1³ pixels®  Thå videï attributeó iî thå ãž=characteò  modå are: (a) Reverse (b) Highlight (c) Underline (d) Strike-through  witè  á  resolutioî  oæ 80° pixeló  horizontallù  bù  32µ  pixeló vertically®   Iî  thå  characteò  mode¬ á text displaù areá oæ 8° characteró bù 2µ lineó ió available¬ usinç á characteò celì oæ 1° pixeló bù 1³ pixels®  Thå videï attributeó iî thå ãZ>=NãZ>=NãZ>=NãZ>=NãZ>=NãZ> =NãZ>>NãZ>>NãZ>>NãZ>>NãZ>>NãZ>>NãZ>>NãZ>>NãZ> >NãZ>?NãZ>?NãZ>?NãZ>?NãZ>?NãZ>?NãZ>?NãZ>?NãZ> ?NãZ>@NãZ>@NãZ>@NãZ>@NãZ>@NãZ>@NãZ>@NãZ>@NãZ> @NãZ>ANãZ>ANãZ>ANãZ>ANãZ>ANãZ>ANãZ>ANãZ>ANãZ> ANãZ>BNãZ>BNãZ>BNãZ>BNãZ>BNãZ>BNãZ>BNãZ>BNãZ> BNãZ>CNãZ>CNãZ>CNãZ>CNãZ>CNãZ>CNãZ>CNãZ>CNãZ> CNãZ>DNãZ>DNãZ>DNãZ>DNãZ>DNãZ>DNãZ>DNãZ>DNãZ> DNãZ>ENãZ>ENãZ>ENãZ>ENãZ>ENãZ>ENãZ>ENãZ>ENãZ> ENãž:ACT APRICOT TECHNICAL REFERENCE MANUAL (WORDSTAR) 2 OF 2