Part Number Hot Search : 
SEMH2 BCBM10 74AC00M APL5102 03STRR PSMN4R RGFZ15D DT70V
Product Description
Full Text Search
 

To Download FDC37C93XAPM Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  FDC37C93XAPM advance information plug and play compatible ultra i/o? controller with soft power management features 5 volt operation isa plug-and-play standard (version 1.0a) compatible register set soft power management, smi support acpi/legacy support - sci/smi support - power management timer - power button override event - either edge triggered interrupts access.bus support 8042 keyboard controller - 2k program rom - 256 bytes data ram - asynchronous access to two data registers and one status register - supports interrupt and polling access - 8 bit timer/counter - port 92 support - fast gate a20 and hardware keyboard reset real time clock - mc146818 and ds1287 compatible - 256 bytes of battery backed cmos in two banks of 128 bytes - 128 bytes of cmos ram lockable in 4x32 byte blocks - 12 and 24 hour time format - binary and bcd format - 1 m a standby current (typ) intelligent auto power management 2.88mb super i/o floppy disk controller - relocatable to 480 differ ent addresses - 13 irq options - four dma options - licensed cmos 765b floppy disk controller - advanced digital data separator - software and register compatible with smsc's proprietary 82077aa compatible core - sophisticated power control circuitry (pcc) including multiple powerdown modes for reduced power consumption - game port select logic - supports two floppy drives directly - 24ma at bus drivers - low power cmos design licensed cmos 765b floppy disk controller core - supports vertical re cording format - 16 byte data fifo - 100% ibm? compatibility - detects all overrun and underrun conditions - 48ma drivers and schmitt trigger inputs - dma enable logic - data rate and drive control registers enhanced digital data separator - low cos t implementation - no filter components required - 2 mbps, 1 mbps, 500 kbps, 300 kbps, 250 kbps data rates - programmable precompensation modes serial ports - relocatable to 480 different addresses
2 table of contents features ................................ ................................ ................................ ................................ ........ 1 general description ................................ ................................ ................................ .................. 4 pin configuration ................................ ................................ ................................ ....................... 5 description of pin functions ................................ ................................ ........................... 6 functional description ................................ ................................ ................................ .......... 15 super i/o registers ................................ ................................ ................................ ........... 15 host processor interface ................................ ................................ ............................. 15 floppy disk controller ................................ ................................ ................................ ... 16 fdc internal registers ................................ ................................ ................................ .... 16 instruction set ................................ ................................ ................................ ......................... 44 serial port (uart) ................................ ................................ ................................ ..................... 70 infrared interface ................................ ................................ ................................ ................... 85 parallel port ................................ ................................ ................................ ............................. 86 ibm xt/at compatible, bi-di rectional and epp modes ................................ .............. 88 extended capabilities parallel port ................................ ................................ .......... 95 auto power management ................................ ................................ ................................ ..... 111 integrated drive electronics interface ................................ ................................ ....... 116 host file registers ................................ ................................ ................................ ......... 116 task file registers ................................ ................................ ................................ .......... 116 ide output enables ................................ ................................ ................................ .......... 117 bios buffer ................................ ................................ ................................ ......................... 118 general purpose i/o functional description ................................ ............................... 121 either edge triggered interrupts ................................ ................................ ............ 135 8042 keyboard controller and real time clock functional description ........... 136 soft power management ................................ ................................ ................................ ...... 161 system management interrupt (smi) ................................ ................................ ................. 165 access.bus ................................ ................................ ................................ ................................ 166 acpi features ................................ ................................ ................................ ........................... 172 configuration ................................ ................................ ................................ ................... 188 operational description ................................ ................................ ................................ ...... 238 power supply operational modes ................................ ................................ ............. 242 timing diagrams ................................ ................................ ................................ ................ 243 ecp parallel port timing ................................ ................................ ................................ ...... 270 80 arkay drive hauppauge, ny. 11788 (516) 435-6000 fax (516) 273-3123
3 - 13 irq options - two high speed ns16c550 compati ble uarts with send/receive 16 byte fifos - programmable baud rate generator - modem control circuitry including 230k and 460k baud - irda, hp-sir, ask-ir support ide interface - relocatable to 480 different addresses - 13 irq options (irq steering t hrough chip) - two channel/four drive support - on-chip decode and select logic compatible with ibm pc/xt? and pc/at? embedded hard disk drives serial eeprom interface multi-mode ? parallel port with chiprotect ? - relocatable to 480 different addresses - 13 irq options - four dma options - standard mode - ibm pc/xt, pc/at, and ps/2 ? compatible bidirectional parallelport - enhanced mode - enhanced parallel port (epp) compatible - epp 1.7 and epp 1.9 (ieee 1284 compliant) - high speed mode - microsoft and hewlett packard extended capabilities port (ecp) compatible (ieee 1284 compliant) - incorporates chiprotect ? circuitry for protection against damage due to printer power-on - 12 ma output drivers isa host interface 16 bit address qualification 160 pin qfp package *note: the ?x? in the ultra i/o part number is a designator that changes depending upon the particular bios used inside the spec ific chip. ?2? denotes ami keyboard bios/?5? denotes phoenix keyboard bios.
4 general description the FDC37C93XAPM incorporates a keyboard interface, real-time clock, smsc's true cmos 765b floppy disk controller, advanced digital data separator, 16 byte data fifo, two 16c550 compatible uarts, one multi-mode parallel port which includes chiprotect circuitry plus epp and ecp support, ide interface, on-chip 24 ma at bus drivers, game port chip select and two floppy direct drive support, as well as access.bus, soft power management and smi support. the true cmos 765b core provides 100% compatibility with ibm pc/xt and pc/at architectures in addition to providing data overflow and underflow protection. the smsc advanced digital data separator incorporates smsc's patented data separator technology, allowing for ease of testing and use. both on- chip uarts are compatible with the ns16c550. the parallel port, the ide interface, and the game port select logic are compatible with ibm pc/at architecture, as well as epp and ecp. the FDC37C93XAPM incorporates sophisticated power control circuitry (pcc). the pcc supports multiple low power down modes. the FDC37C93XAPM provides features for compliance with the ?advanced configuration and power interface specification? (acpi). these features include support of both legacy and acpi power management models through the selection of smi or sci. it implements a 24- bit power management timer, power button override event (4 second button hold to turn off the system) and either edge triggered interrupts. the FDC37C93XAPM provides support for the isa plug-and-play standard (version 1.0a) and provides for the recommended functionality to support windows '95. through internal configuration registers, each of the FDC37C93XAPM's logical device's i/o address, dma channel and irq channel may be programmed. there are 480 i/o address location options, 13 irq options, and three dma channel options for each logical device. the FDC37C93XAPM does not require any external filter components and is, therefore, easy to use and offers lower system cost and reduced board area. the FDC37C93XAPM is software and register compatible with smsc's proprietary 82077aa core. ibm, pc/xt and pc/at are registered trademarks and ps/2 is a trademark of international business machines corporation smsc is a registered trademark and ultra i/o, chiprotect, and multi-mode are trademarks of standard microsystems corporation
5 pin configuration 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 nromdir nromcs rd7 rd6 rd5 rd4 rd3 rd2 rd1 rd0 gp25 gp24 gp23 gp22 gp21 gp20 gp17 gp16 gp15 vcc gp14 gp13 gp12 gp11 gp10 gnd mclk mdat kclk kdat iochrdy tc drq3 ndack3 drq2 ndack2 drq1 ndack1 drq0 ndack0 gnd drvden0 drvden1 nmtr0 nds1 nds0 nmtr1 gnd ndir nstep nwdata nwgate nhdsel nindex ntrk0 nwrtprt nrdata ndskchg media_id1 media_id0 vcc clocki nide1_oe nhdcs0 nhdcs1 ide1_irq nhdcs2/sa13 nhdcs3/sa14 ide2_irq/sa15 niorop niowop vtr npower on button_in hclk 16clk clk01 clk02 clk03 gnd 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 n d t r 2 n c t s 2 n r t s 2 n d s r 2 t x d 2 r x d 2 n d c d 2 n r i 2 n d c d 1 n r i 1 n d t r 1 n c t s 1 n r t s 1 n d s r 1 t x d 1 r x d 1 n s t b n a l f n e r r o r n i n i t n s l c t i n v c c p d 0 p d 1 p d 2 p d 3 p d 4 p d 5 p d 6 p d 7 g n d n a c k b u s y p e s l c t v c c x t a l 2 g n d x t a l 1 v b a t 1 6 0 1 5 9 1 5 8 1 5 7 1 5 6 1 5 5 1 5 4 1 5 3 1 5 2 1 5 1 1 5 0 1 4 9 1 4 8 1 4 7 1 4 6 1 4 5 1 4 4 1 4 3 1 4 2 1 4 1 1 4 0 1 3 9 1 3 8 1 3 7 1 3 6 1 3 5 1 3 4 1 3 3 1 3 2 1 3 1 1 3 0 1 2 9 1 2 8 1 2 7 1 2 6 1 2 5 1 2 4 1 2 3 1 2 2 1 2 1 FDC37C93XAPM 160 pin qfp 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 5 0 5 1 5 2 5 3 5 4 5 5 5 6 5 7 5 8 5 9 6 0 6 1 6 2 6 3 6 4 6 5 6 6 6 7 6 8 6 9 7 0 7 1 7 2 7 3 7 4 7 5 7 6 7 7 7 8 7 9 8 0 s a 0 s a 1 s a 2 s a 3 s a 4 s a 5 s a 6 s a 7 s a 8 s a 9 s a 1 0 s a 1 1 n c s / s a 1 2 i r q 1 5 i r q 1 4 i r q 1 2 i r q 1 1 i r q 1 0 i r q 9 v c c i r q 8 / n i r q 8 i r q 7 i r q 6 i r q 5 i r q 4 i r q 3 i r q 1 n i o r n i o w a e n g n d s d 0 s d 1 s d 2 s d 3 s d 4 s d 5 s d 6 s d 7 r e s e t _ d r v
6 description of pin functions pin no. name symbol buffer type processor/host interface 72:79 system data bus sd[0:7] i/o24 41:52 system address bus sa[0:11] i 53 chip select/sa12 (active low)(note 1, 4) ncs i 70 address enable (dma master has bus control) aen i 90 i/o channel ready iochrdy od24 80 reset drive reset_drv is 67:61, 59:54 interrupt requests [1,3:12,14,15] (polarity control for irq8) irq[1,3:12, 14,15] 024/od24 (note 0) 82,84, 86,88 dma requests drq[0:3] o24 81,83, 85,87 dma acknowledge ndack[0:3] i 89 terminal count tc i 68 i/o read nior i 69 i/o write niow i 35 high speed clock out 24/48 mhz hclk o20 36 16 mhz out 16clk o8sr 22 14.318 mhz clock input clocki iclk 37 14.318 mhz clock output 1 clko1 o16sr 38 14.318 mhz clock output 2 clko2 o8sr 39 14.318 mhz clock output 3 clko3 o8sr power pins 21, 60, 101, 125, 139 +5v supply voltage vcc 32 trickle voltage input vtr 1, 8, 40, 71, 95, 123, 130 ground gnd fdd interface 17 read disk data nrdata is
7 description of pin functions pin no. name symbol buffer type 12 write gate nwgate od48 11 write disk data nwdata od48 13 head select (1 = side 0) nhdsel od48 9 step direction (1 = out) ndir od48 10 step pulse nstep od48 18 disk change ndskchg is 5,6 drive select lines nds[1:0] od48 7,4 motor on lines nmtr[1:0] od48 16 write protected nwprot is 15 track 0 ntr0 is 14 index pulse input nindex is 3,2 drive density select [1:0] drvden [1:0] od48 19,20 media id inputs. in floppy enhanced mode 2 these inputs are the media id [1:0] inputs. (note 4) mid[1:0] is serial port 1 interface 145 receive serial data 1 rxd1 i 146 transmit serial data 1 txd1 o4 148 request to send 1 nrts1 o4 149 clear to send 1 ncts1 i 150 data terminal ready 1 ndtr1 o4 147 data set ready 1 ndsr1 i 152 data carrier detect 1 ndcd1 i 151 ring indicator 1 nri1 i serial port 2 interface 155 receive serial data 2 (note 4) rxd2 i 156 transmit serial data 2 (note 4) txd2 o4 158 request to send 2 (note 4) nrts2 o4 159 clear to send 2 (note 4) ncts2 i 160 data terminal ready 2 (note 4) ndtr2 o4 157 data set ready 2 (note 4) ndsr2 i
8 description of pin functions pin no. name symbol buffer type 154 data carrier detect 2 (note 4) ndcd2 i 153 ring indicator 2 (note 4) nri2 i ide1 interface 23 ide1 enable (note 4) nide1_oe o4 24 ide1 chip select 0 (note 4) nhdcs0 o24 25 ide1 chip select 1 (note 4) nhdcs1 o24 30 ior output (note 4) niorop o24 31 iow output (note 4) niowop o24 26 ide1 interrupt request (note 4) ide1_irq i ide2 interface 27 ide2 chip select 2/sa13 (note 3, 4) nhdcs2 i/o24 28 ide2 chip select 3/sa14 (note 3, 4) nhdcs3 i/o24 29 ide2 interrupt request/sa15 (note 4) ide2_irq i parallel port interface 138:131 parallel port data bus pd[0:7] i/o24 140 printer select nslctin od24/o24 141 initiate output ninit od24/o24 143 auto line feed nalf od24/o24 144 strobe signal nstb od24/o24 128 busy signal busy i 129 acknowledge handshake nack i 127 paper end pe i 126 printer selected slct i 142 error at printer nerror i real-time clock 122 32 khz crystal input xtal1 iclk2 124 32 khz crystal output xtal2 oclk2 121 battery voltage vbat keyboard/mouse 91 keyboard data kdat i/od16p
9 description of pin functions pin no. name symbol buffer type 92 keyboard clock kclk i/od16p 93 mouse data mdat i/od16p 94 mouse clock mclk i/od16p soft power management interface 33 power on (note 4) npoweron i/o24 34 button input (note 4) button_in i/o24 general purpose i/o 96 gpi/o; irq in (note 4) gp10 i/o4 97 gpi/o; irq in/irq 13 (note 4) gp11 i/o4 98 gpi/o; wd timer output/irrx (note 4) gp12 i/o4 99 gpi/o; power led output/irtx (note 4) gp13 i/o24 100 gpi/o; gp address decode (note 4) gp14 i/o4 102 gpi/o; gp write strobe (note 4) gp15 i/o4 103 gpi/o; joy read strobe/joycs (note 4) gp16 i/o4 104 gpi/o; joy write strobe (note 4) gp17 i/o4 105 gpi/o; ide2 output enable/8042 p20 (note 4) gp20 i/o4 106 gpi/o; serial eeprom data in/ab_data (note 4) gp21 i/o8 107 gpi/o; serial eeprom data out/ab_clk (note 4) gp22 i/o8 108 gpi/o; serial eeprom clock (note 4) gp23 i/o4 109 gpi/o; serial eeprom enable (note 4) gp24 i/o4 110 gpi/o; 8042 p21 (note 4) gp25 i/o4 bios buffers 111:118 rom bus (i/o to the sd bus) (note 4) rd[0:7] i/o4 119 rom chip select (only used for rom) (note 4) nromcs i 120 rom output enable (dir) (only used for rom) (note 4) nromdir i note 0: the interrupt request is output on one of the irqx signals as 024 buffer type. if epp or ecp mode is enabled, this output is pulsed low, then released to allow sharing of interrupts. in this case, the buffer type is od24. refer to the configuration section for more information. note 1: ncs -this pin is the active low chip select; it must be low for all chip ac cesses. for 12 bit addressing, sa0:sa11, this input should be tied to gnd. for 16 bit address qualification,
10 address bits sa12:sa15 can be "ored" together and applied to this pin. if ide2 is not used, sa12 can be connected to ncs, pin 27 to sa13, pin 28 to sa14 and pin 29 to sa15. note 2: nyy - the "n" as the first letter of a signal name indicates an "active low" signal note 3: nhdcs2 and nhdcs3 require a pull-up to ensure a logic high at power-up when used for ide2 until the active bit is set to 1. note 4: see table on the following page for multifunction pins with gpi/o and other alternate functions.
11 description of multifunction pins with gpi/o and other alternate functions pin no. original function alternate function 1 alternate function 2 alternate function 3 buffer type default index register gpi/o 19 media_id1 gpi/o - - i/o8 float gp4 gp40 20 media_id0 gpi/o - - i/o8 float gp4 gp41 23 nide1_oe gpi/o - - i/o4 high gp4 gp42 24 nhdcs0 gpi/o - - i/o24 high gp4 gp43 25 nhdcs1 gpi/o - - i/o24 high gp4 gp44 26 ide1_irq gpi/o - - i/o8 float gp4 gp45 30 niorop gpi/o power led output wdt i/o24 float gp4 gp46 31 niowop gpi/o nsmi - i/o24 float gp4 gp47 33 npoweron gpi/o - - i/o24 active low open collector output gp5 gp51 34 button_in gpi/o - - i/o24 input gp5 gp50 111 rd0 gpi/o power led output - i/o4 rd0 1,4 gp6 gp60 112 rd1 gpi/o wdt - i/o4 rd0 1,4 gp6 gp61 113 rd2 gpi/o 8042 - p12 - i/o4 rd0 1,4 gp6 gp62 114 rd3 gpi/o 8042 - p13 - i/o4 rd0 1,4 gp6 gp63 115 rd4 gpi/o 8042 - p14 - i/o4 rd0 1,4 gp6 gp64 116 rd5 gpi/o 8042 - p15 - i/o4 rd0 1,4 gp6 gp65 117 rd6 gpi/o 8042 - p16 - i/o4 rd0 1,4 gp6 gp66 118 rd7 gpi/o 8042 - p17 - i/o4 rd0 1,4 gp6 gp67 119 nromcs gpi/o - - i/o8 nromcs 1 gp5 gp53 120 nromoe gpi/o - - i/o8 nromcs 1 gp5 gp54 153 nri2 gpi/o - - i/o8 input 2 gp7 gp70 154 ndcd2 gpi/o - - i/o8 input 2 gp7 gp71 155 rxd2 gpi/o - - i/o8 input 2 gp7 gp72 156 txd2 gpi/o - - i/o8 input 2,4 gp7 gp73 157 ndsr2 gpi/o - - i/o8 input, 2 gp7 gp74 158 nrts2 gpi/o - - i/o8 input 2, 4 gp7 gp75 159 ncts2 gpi/o - - i/o8 input (2) gp7 gp76 160 ndtr2 gpi/o - - i/o8 input 2,4 gp7 gp77
12 pin no. original function alternate function 1 alternate function 2 alternate function 3 buffer type default index register gpi/o 27 nhdcs2 sa13 - - i/o24 float - - 28 nhdcs3 sa14 - - i/o24 float - - 29 ide2_irq sa15 - - i float - - 53 ncs/sa 12 - - - i input - - 96 gpi/o irq in - - i/o4 input gp1 gp10 97 gpi/o irq in irq13 - i/o4 input gp1 gp11 98 gpi/o wdt timer output/ irrx - - i/o4 input gp1 gp12 99 gpi/o power led output/ irtx - - i/o24 input gp1 gp13 100 gpi/o gp address decode - - i/o4 input gp1 gp14 102 gpi/o gp write strobe - - i/o4 input gp1 gp15 103 gpi/o joy read strobe joycs - i/o4 input gp1 gp16 104 gpi/o joy write strobe - - i/o4 input gp1 gp17 105 gpi/o ide2 output enable 8042 p20 - i/o4 input gp2 gp20 106 gpi/o serial eeprom data in ab_data - i/o8 /od8 (en1) input gp2 gp21 107 gpi/o serial eeprom data out ab_clk - i/o8 /od8 (en1) input gp2 gp22 108 gpi/o serial eeprom clock - - i/o4 input gp2 gp23 109 gpi/o serial eeprom enable - - i/o4 input gp2 gp24 110 gpi/o 8042 p21 - - i/o4 input gp2 gp25 note 1: at power-up, rd0-rd7, nromcs and nromoe function as the xd bus. to use rd0-rd7 for functions other than the xd bus, nromcs must stay high until those pins are finished being reprogrammed. note 2: these pins are input (high-z) until programmed for second serial port. note 3: this is the trickle voltage input pin for the FDC37C93XAPM. note 4: these pins cannot be programmed as open drain pins in their original function. note: no pins in their original function can be programmed as inver ted input or inverted output.
13 buffer type descriptions buffer type description i input, ttl compatible. is input with schmitt trigger. i/od16p input/output, 16ma sink, 90ua pull-up. i/o24 input/output, 24ma sink, 1 2ma source. i/o4 input/output, 4ma sink, 2ma source. o4 output, 4ma sink, 2ma source. o8sr output, 8ma sink, 4ma source with slew rate limiting. o16sr output, 16ma sink, 8ma source with slew rate limiting. o20 output , 20ma sink, 10ma source. o24 output, 24ma sink, 12ma source. od24 output, open drain, 24ma sink. od48 output, open drain, 48ma sink. iclk clock input iclk2 clock input oclk2 clock output
14 FDC37C93XAPM block diagram ndsr1, ndcd1, nri1, ndtr1 txd1, ncts1, nrts1 ninit, nalf host cpu multi-mode parallel port/fdc mux 16c550 compatible serial port 1 16c550 compatible serial port 2 with infrared ide configuration registers power management interface interface control bus address bus data bus nior niow aen sa[0:12] (ncs) sd[o:7] drq[0:3] ndack[0:3] irq[1,3-12,14,15] reset_drv clock gen iclock (14.318) nindex ntrk0 ndskchg nwrprt nwgate densel ndir nstep nhdsel nds0,1 nmtr0,1 rdata rclock wdata wclock nwdata nrdata nide1_oe nhdcs0, nhdcs1 txd2(irtx), ncts2, nrts2 rxd2(irrx) ndsr2, ndcd2, nri2, ndtr2 rxd1 pd0-7 busy, slct, pe, nerror, nack nstb, nslctin, tc smsc proprietary 82077 compatible vertical floppydisk controller core digital data separator with write precom- pensation iochrdy decoder ngpa ngpcs* ngpwr* bios buffer nromdir nromcs rd[0:7] general purpose i/o gp1[0:7]* gp2[0:5]* irrx*, irtx* ide1_irq 8042 rtc kclk kdata mclk mdata p20*, p21* xtal1,2 vbat drvden0 drvden1 serial eeprom datain* dataout* clk*, enable* ide2 optional nhdcs2,3 ide2_irq niorop niowop mid0, mid1 clko[1:3] (14.318) hclk 16clk *multi-function i/o pin - optional sa[13-15] p12*, p13*, p14*,p15*, p16*, p17* gp[4[0:7]*, gp5[0:1,3:4]*, gp6[0:7]*, gp7[0:7]* access.bus soft power management smi acpi/sci npoweron button_in ab_data* ab_clk* vtr nsmi* vcc vss irq13*
15 functional description super i/o registers the address map, shown below in table 1, shows the addresses of the different blocks of the super i/o immediately after power up. the base addresses of the fdc, ide, serial and parallel ports, bank 2 of the rtc registers, auxiliary i/o and access.bus can be moved via the configuration registers. some addresses are used to access more than one register. host processor interface the host processor communicates with the FDC37C93XAPM through a series of read/write registers. the port addresses for these registers are shown in table 1. register access is accomplished through programmed i/o or dma transfers. all registers are 8 bits wide except the ide data register at port 1f0h which is 16 bits wide. all host interface output buffers are capable of sinking a minimum of 12 ma. table 1 - super i/o block addresses address block name logical device notes base+(0-5) and +(7) floppy disk 0 base+(0-7) serial port com 1 4 base+(0-7) serial port com 2 5 ir support base+(0-3) base+(0-7) base+(0-3), +(400-402) base+(0-7), +(400-402) parallel port spp epp ecp ecp+epp+spp 3 base1+(0-7), base2+(0) ide 1 1 base1+(0-7), base2+(0) ide 2 2 70, 71 base2+(0,1) rtc 6 60, 64 kybd 7 base1+(0) base2+(0) aux. i/o 8 gpr gpw base+(0-3) access.bus 9 base1+(0-11) base2+(0-7) acpi a note: refer to the configuration register descriptions for setting the base address
16 floppy disk controller the floppy disk controller (fdc) provides the interface between a host microprocessor and the floppy disk drives. the fdc integrates the functions of the formatter/controller, digital data separator, write precompensation and data rate selection logic for an ibm xt/at compatible fdc. the true cmos 765b core guarantees 100% ibm pc xt/at compatibility in addition to providing data overflow and underflow protection. the fdc is compatible to the 82077aa using smsc's proprietary floppy disk controller core. fdc internal registers the floppy disk controller contains eight internal registers which facilitate the interfacing between the host microprocessor and the disk drive. table 2 shows the addresses required to access these registers. registers other than the ones shown are not supported. the rest of the description assumes that the primary addresses have been selected. table 2 - status, data and control registers (shown with base add resses of 3f0 and 370) primary address secondary address r/w register 3f0 3f1 3f2 3f3 3f4 3f4 3f5 3f6 3f7 3f7 370 371 372 373 374 374 375 376 377 377 r r r/w r/w r w r/w r w status register a (sra) status register b (srb) digital output register (dor) tape drive register (tsr) main status register (msr) data rate select register (dsr) data (fifo) reserved digital input register (dir) configuration control register (ccr)
17 status register a (sra) address 3f0 read only this register is read-only and monitors the state of the fintr pin and several disk interface pins in ps/2 and model 30 modes. the sra can be accessed at any time when in ps/2 mode. in the pc/at mode the data bus pins d0-d7 are held in a high impedance state for a read of address 3f0. ps/2 mode bit 0 direction active high status indicating the direction of head movement. a logic "1" indicates inward direction; a logic "0" indicates outward direction. bit 1 nwrite protect active low status of the write protect disk interface input. a logic "0" indicates that the disk is write protected. bit 2 nindex active low status of the index disk interface input. bit 3 head select active high status of the hdsel disk interface input. a logic "1" selects side 1 and a logic "0" selects side 0. bit 4 ntrack 0 active low status of the trk0 disk interface input. bit 5 step active high status of the step output disk interface output pin. bit 6 ndrv2 active low status of the drv2 disk interface input pin, indicating that a second drive has been installed. bit 7 interrupt pending active high bit indicating the state of the floppy disk interrupt output. 7 6 5 4 3 2 1 0 int pending ndrv2 step ntrk0 hdsel nindx nwp dir reset cond. 0 n/a 0 n/a 0 n/a n/a 0
18 ps/2 model 30 mode bit 0 ndirection active low status indicating the direction of head movement. a logic "0" indicates inward direction; a logic "1" indicates outward direction. bit 1 write protect active high status of the write protect disk interface input. a logic "1" indicates that the disk is write protected. bit 2 index active high status of the index disk interface input. bit 3 nhead select active low status of the hdsel disk interface input. a logic "0" selects side 1 and a logic "1" selects side 0. bit 4 track 0 active high status of the trk0 disk interface input. bit 5 step active high status of the latched step disk interface output pin. this bit is latched with the step output going active, and is cleared with a read from the dir register, or with a hardware or software reset. bit 6 dma request active high status of the drq output pin. bit 7 interrupt pending active high bit indicating the state of the floppy disk interrupt output. 7 6 5 4 3 2 1 0 int pending drq step f/f trk0 nhdsel indx wp ndir reset cond. 0 0 0 n/a 1 n/a n/a 1
19 status register b (srb) address 3f1 read only this register is read-only and monitors the state of several disk interface pins in ps/2 and model 30 modes. the srb can be accessed at any time when in ps/2 mode. in the pc/at mode the data bus pins d0 - d7 are held in a high impedance state for a read of address 3f1. ps/2 mode bit 0 motor enable 0 active high status of the mtr0 disk interface output pin. this bit is low after a hardware reset and unaffected by a software reset. bit 1 motor enable 1 active high status of the mtr1 disk interface output pin. this bit is low after a hardware reset and unaffected by a software reset. bit 2 write gate active high status of the wgate disk interface output. bit 3 read data toggle every inactive edge of the rdata input causes this bit to change state. bit 4 write data toggle every inactive edge of the wdata input causes this bit to change state. bit 5 drive select 0 reflects the status of the drive select 0 bit of the dor (address 3f2 bit 0). this bit is cleared after a hardware reset and it is unaffected by a software reset. bit 6 reserved always read as a logic "1". bit 7 reserved always read as a logic "1". 7 6 5 4 3 2 1 0 1 1 drive sel0 wdata toggle rdata toggle wgate mot en1 mot en0 reset cond. 1 1 0 0 0 0 0 0
20 ps/2 model 30 mode bit 0 ndrive select 2 active low status of the ds2 disk interface output. bit 1 ndrive select 3 active low status of the ds3 disk interface output. bit 2 write gate active high status of the latched wgate output signal. this bit is latched by the active going edge of wgate and is cleared by the read of the dir register. bit 3 read data active high status of the latched rdata output signal. this bit is latched by the inactive going edge of rdata and is cleared by the read of the dir register. bit 4 write data active high status of the latched wdata output signal. this bit is latched by the inactive going edge of wdata and is cleared by the read of the dir register. this bit is not gated with wgate. bit 5 ndrive select 0 active low status of the ds0 disk interface output. bit 6 ndrive select 1 active low status of the ds1 disk interface output. bit 7 ndrv2 active low status of the drv2 disk interface input. 7 6 5 4 3 2 1 0 ndrv2 nds1 nds0 wdata f/f rdata f/f wgate f/f nds3 nds2 reset cond. n/a 1 1 0 0 0 1 1
21 digital output register (dor) address 3f2 read/write the dor controls the drive select and motor enables of the disk interface outputs. it also contains the enable for the dma logic and a software reset bit. the contents of the dor are unaffected by a software reset. the dor can be written to at any time. bit 0 and 1 drive select these two bits are binary encoded for the four drive selects ds0 -ds3, thereby allowing only one drive to be selected at one time. bit 2 nreset a logic "0" written to this bit resets the floppy disk controller. this reset will remain active until a logic "1" is written to this bit. this software reset does not affect the dsr and ccr registers, nor does it affect the other bits of the dor register. the minimum reset duration required is 100ns, therefore toggling this bit by consecutive writes to this register is a valid method of issuing a software reset. bit 3 dmaen pc/at and model 30 mode: writing this bit to logic "1" will enable the drq, ndack, tc and fintr outputs. when this bit is a a logic "0" it disables the ndack and tc inputs and holds the drq and fintr outputs in a high impedance state. this bit is a logic "0" after a reset and in these modes. ps/2 mode: in this mode the drq, ndack, tc and fintr pins are always enabled. during a reset, the drq, ndack, tc, and fintr pins will remain enabled, but this bit will be cleared to a logic "0". bit 4 motor enable 0 this bit controls the mtr0 disk interface output. a logic "1" in this bit will cause the output pin to go active. bit 5 motor enable 1 this bit controls the mtr1 disk interface output. a logic "1" in this bit will cause the output pin to go active. bit 6 motor enable 2 this bit controls the mtr2 disk interface output. a logic "1" in this bit will cause the output pin to go active. bit 7 motor enable 3 this bit controls the mtr3 disk interface output. a logic "1" in this bit causes the output to go active. table 3 - drive activation values 7 6 5 4 3 2 1 0 mot en3 mot en2 mot en1 mot en0 dmaen nrese t drive sel1 drive sel0 reset cond. 0 0 0 0 0 0 0 0 drive dor value 0 1 2 3 1ch 2dh 4eh 8fh
22 tape drive register (tdr) address 3f3 read/write this register is included for 82077 software compatability. the robust digital data separator used in the fdc does not require its characteristics modified for tape support. the contents of this register are not used internal to the device. the tdr is unaffected by a software reset. bits 2-7 are tri-stated when read in this mode. table 4 - tape select bits table 5 - internal 2 drive decode - normal digital output register drive select outputs (active low) motor on outputs (active low) bit 7 bit 6 bit 5 bit 4 bit1 bit 0 nds1 nds0 nmtr1 nmtr0 x x x 1 0 0 1 0 nbit 5 nbit 4 x x 1 x 0 1 0 1 nbit 5 nbit 4 x 1 x x 1 0 1 1 nbit 5 nbit 4 1 x x x 1 1 1 1 nbit 5 nbit 4 0 0 0 0 x x 1 1 nbit 5 nbit 4 table 6 - internal 2 drive decode - drives 0 and 1 swapped digital output register drive select outputs (active low) motor on outputs (active low) bit 7 bit 6 bit 5 bit 4 bit1 bit 0 nds1 nds0 nmtr1 nmtr0 x x x 1 0 0 0 1 nbit 4 nbit 5 x x 1 x 0 1 1 0 nbit 4 nbit 5 x 1 x x 1 0 1 1 nbit 4 nbit 5 1 x x x 1 1 1 1 nbit 4 nbit 5 0 0 0 0 x x 1 1 nbit 4 nbit 5 tape sel1 tape sel2 drive selected 0 0 1 1 0 1 0 1 none 1 2 3
23 normal floppy mode normal mode. register 3f3 contains only bits 0 and 1. when this register is read, bits 2 - 7 are a high impedance. db7 db6 db5 db4 db3 db2 db1 db0 reg 3f3 tri-state tri-state tri-state tri-state tri-state tri-state tape sel1 tape sel0 enhanced floppy mode 2 (os2) register 3f3 for enhanced floppy mode 2 operation. db7 db6 db5 db4 db3 db2 db1 db0 reg 3f3 media id1 media id0 drive type id floppy boot drive tape sel1 tape sel0 for this mode, media_id[1:0] pins are gated into bits 6 and 7 of the 3f3 register. these two bits are not affected by a hard or soft reset. bit 7 media id 1 read only (pin 19) (see table 7) bit 6 media id 0 read only (pin 20) (see table 8) bit 5 and 4 drive type id - these bits reflect two of the bits of l0-crf1. which two bits these are depends on the last drive selected in the digital output register (3f2). (see table 9) note: l0-crf1-b5 = logical device 0, configuration register f1, bit 5 bit 3 and 2 floppy boot drive - these bits reflect the value of l0-crf1. bit 3 = l0- crf1-b7. bit 2 = l0-crf1-b6. bit 1 and 0 - tape drive select (read/write). same as in normal and enhanced floppy mode. 1. table 7 - media id1 media id1 input bit 7 pin 19 l0-crf1-b5 = 0 l0-crf1-b5 = 1 0 0 1 1 1 0 table 8 - media id0 media id0 input bit 6 pin 20 crf1-b4 = 0 crf1-b4 = 1 0 0 1 1 1 0
24 table 9 - drive type id digital output register register 3f3 - drive type id bit 1 bit 0 bit 5 bit 4 0 0 l0-crf2 - b1 l0-crf2 - b0 0 1 l0-crf2 - b3 l0-crf2 - b2 1 0 l0-crf2 - b5 l0-crf2 - b4 1 1 l0-crf2 - b7 l0-crf2 - b6 note: l0-cr f2-bx = logical device 0, configuration register f2, bit x.
25 data rate select register (dsr) address 3f4 write only this register is write only. it is used to program the data rate, amount of write precompensation, power down status, and software reset. the data rate is programmed using the configuration control register (ccr) not the dsr, for pc/at and ps/2 model 30 and microchannel applications. other applications can set the data rate in the dsr. the data rate of the floppy controller is the most recent write of either the dsr or ccr. the dsr is unaffected by a software reset. a hardware reset will set the dsr to 02h, which corresponds to the default precompensation setting and 250 kbps. bit 0 and 1 data rate select these bits control the data rate of the floppy controller. see table 11 for the settings corresponding to the individual data rates. the data rate select bits are unaffected by a software reset, and are set to 250 kbps after a hardware reset. bit 2 - 4 precompensation select these three bits select the value of write precompensation that will be applied to the wdata output signal. table 10 shows the precompensation values for the combination of these bits settings. track 0 is the default starting track number to start precompensation. this starting track number can be changed by the configure command. bit 5 undefined should be written as a logic "0". bit 6 low power a logic "1" written to this bit will put the floppy controller into manual low power mode. the floppy controller clock and data separator circuits will be turned off. the controller will come out of manual low power mode after a software reset or access to the data register or main status register. bit 7 software reset this active high bit has the same function as the dor reset (dor bit 2) except that this bit is self clearing. table 10 - precompensation delays *2mbps data rate is only available if v cc = 5v. 7 6 5 4 3 2 1 0 s/w reset power down 0 pre- comp2 pre- comp1 pre- comp0 drate sel1 drate sel0 reset cond. 0 0 0 0 0 0 1 0 precomp 432 precompensation delay (nsec) <2mbps 2mbps* 111 001 010 011 100 101 110 000 0.00 41.67 83.34 125.00 166.67 208.33 250.00 default 0 20.8 41.7 62.5 83.3 104.2 125 default default: see table 12
26 table 11 - data rates drive rate data rate data rate densel drate(1) drt1 drt0 sel1 sel0 mfm fm 1 0 0 0 1 1 1meg --- 1 1 1 0 0 0 0 500 250 1 0 0 0 0 0 1 300 150 0 0 1 0 0 1 0 250 125 0 1 0 0 1 1 1 1meg --- 1 1 1 0 1 0 0 500 250 1 0 0 0 1 0 1 500 250 0 0 1 0 1 1 0 250 125 0 1 0 1 0 1 1 1meg --- 1 1 1 1 0 0 0 500 250 1 0 0 1 0 0 1 2meg --- 0 0 1 1 0 1 0 250 125 0 1 0 drive rate table (recommended) 00 = 360k, 1.2m, 720k, 1.44m and 2.88m vertical format 01 = 3-mode drive 10 = 2 meg tape note 1: the drate and densel values are mapped onto the drvden pins. table 12 - drvden mapping dt1 dt0 drvden1 (1) drvden0 (1) drive type 0 0 drate0 densel 4/2/1 mb 3.5" 2/1 mb 5.25" fdds 2/1.6/1 mb 3.5" (3-mode) 1 0 drate0 drate1 0 1 drate0 ndensel ps/2 1 1 drate1 drate0
27 table 13 - default precompensation delays *the 2mbps data rate is only available if v cc = 5v. data rate precompensation delays 2 mbps* 1 mbps 500 kbps 300 kbps 250 kbps 20.8 ns 41.67 ns 125 ns 125 ns 125 ns
28 main status register address 3f4 read only the main status register is a read-only register and indicates the status of the disk controller. the main status register can be read at any time. the msr indicates when the disk controller is ready to receive data via the data register. it should be read before each byte transferring to or from the data register except in dma mode. no delay is required when reading the msr after a data transfer. bit 0-3 drvx busy these bits are set to ?1?s when a drive is in the seek portion of a command, including implied and overlapped seeks and recalibrates. bit 4 command busy this bit is set to a ?1? when a command is in progress. this bit will go active after the command byte has been accepted and goes inactive at the end of the results phase. if there is no result phase (seek, recalibrate commands), this bit is returned to a ?0? after the last command byte. bit 5 non-dma this mode is selected in the specify command and will be set to a ?1? during the execution phase of a command. this is for polled data transfers and helps differentiate between the data transfer phase and the reading of result bytes. bit 6 dio indicates the direction of a data transfer once a rqm is set. a ?1? indicates a read and a ?0? indicates a write is required. bit 7 rqm indicates that the host can transfer data if set to a ?1?. no access is permitted if set to a ?0?. 7 6 5 4 3 2 1 0 rqm dio non dma cmd busy drv3 busy drv2 busy drv1 busy drv0 busy
29 data register (fifo) address 3f5 read/write all command parameter information, disk data and result status are transferred between the host processor and the floppy disk controller through the data register. data transfers are governed by the rqm and dio bits in the main status register. the data register defaults to fifo disabled mode after any form of reset. this maintains pc/at hardware compatibility. the default values can be changed through the configure command (enable full fifo operation with threshold control). the advantage of the fifo is that it allows the system a larger dma latency without causing a disk error. table 14 gives several examples of the delays with a fifo. the data is based upon the following formula: at the start of a command, the fifo action is always disabled and command parameters must be sent based upon the rqm and dio bit settings. as the command execution phase is entered, the fifo is cleared of any data to ensure that invalid data is not transferred. an overrun or underrun will terminate the current command and the transfer of data. disk writes will complete the current sector by generating a 00 pattern and valid crc. reads require the host to remove the remaining data so that the result phase may be entered. table 14 - fifo service delay fifo threshold examples maximum delay to servicing at 2 mbps* data rate 1 byte 2 bytes 8 bytes 15 bytes 1 x 4 m s - 1.5 m s = 2.5 m s 2 x 4 m s - 1.5 m s = 6.5 m s 8 x 4 m s - 1.5 m s = 30.5 m s 15 x 4 m s - 1.5 m s = 58.5 m s fifo threshold examples maximum delay to servicing at 1 mbps data rate 1 byte 2 bytes 8 bytes 15 bytes 1 x 8 m s - 1.5 m s = 6.5 m s 2 x 8 m s - 1.5 m s = 14.5 m s 8 x 8 m s - 1.5 m s = 62.5 m s 15 x 8 m s - 1.5 m s = 118.5 m s fifo threshold examples maximum delay to servicing at 500 kbps data rate 1 byte 2 bytes 8 bytes 15 bytes 1 x 16 m s - 1.5 m s = 14.5 m s 2 x 16 m s - 1.5 m s = 30.5 m s 8 x 16 m s - 1.5 m s = 126.5 m s 15 x 16 m s - 1.5 m s = 238.5 m s *the 2 mbps data rate is only available if v cc = 5v. threshold # x 1 data rate x 8 - 1.5 m s = delay
30 digital input register (dir) address 3f7 read only this register is read-only in all modes. pc/at mode bit 0 - 6 undefined the data bus outputs d0-6 will remain in a high impedance state during a read of this register. bit 7 dskchg this bit monitors the pin of the same name and reflects the opposite value seen on the disk cable. ps/2 mode bit 0 nhigh dens this bit is low whenever the 500 kbps or 1 mbps data rates are selected, and high when 250 kbps and 300 kbps are selected. bit 1 and 2 data rate select these bits control the data rate of the floppy controller. see table 11 for the settings corresponding to the individual data rates. the data rate select bits are unaffected by a software reset and are set to 250 kbps after a hardware reset. bit 3 - 6 undefined always read as a logic "1" bit 7 dskchg this bit monitors the pin of the same name and reflects the opposite value seen on the disk cable. 7 6 5 4 3 2 1 0 dsk chg reset cond. n/a n/a n/a n/a n/a n/a n/a n/a 7 6 5 4 3 2 1 0 dsk chg 1 1 1 1 drate sel1 drate sel0 nhigh ndens reset cond. n/a n/a n/a n/a n/a n/a n/a 1
31 model 30 mode bit 0 and 1 data rate select these bits control the data rate of the floppy controller. see table 11 for the settings corresponding to the individual data rates. the data rate select bits are unaffected by a software reset, and are set to 250 kbps after a hardware reset. bit 2 noprec this bit reflects the value of noprec bit set in the ccr register. bit 3 dmaen this bit reflects the value of dmaen bit set in the dor register bit 3. bit 4 - 6 undefined always read as a logic "0" bit 7 dskchg this bit monitors the pin of the same name and reflects the opposite value seen on the pin. 7 6 5 4 3 2 1 0 dsk chg 0 0 0 dmaen noprec drate sel1 drate sel0 reset cond. n/a 0 0 0 0 0 1 0
32 configuration control register (ccr) address 3f7 write only pc/at and ps/2 modes bit 0 and 1 data rate select 0 and 1 these bits determine the data rate of the floppy controller. see table 11 for the appropriate values. bit 2 - 7 reserved should be set to a logical "0" ps/2 model 30 mode bit 0 and 1 data rate select 0 and 1 these bits determine the data rate of the floppy controller. see table 11 for the appropriate values. bit 2 no precompensation this bit can be set by software, but it has no functionality. it can be read by bit 2 of the dsr when in model 30 register mode. unaffected by software reset. bit 3 - 7 reserved should be set to a logical "0" table 12 shows the state of the densel pin. the densel pin is set high after a hardware reset and is unaffected by the dor and the dsr resets. 7 6 5 4 3 2 1 0 drate sel1 drate sel0 reset cond. n/a n/a n/a n/a n/a n/a 1 0 7 6 5 4 3 2 1 0 noprec drate sel1 drate sel0 reset cond. n/a n/a n/a n/a n/a n/a 1 0
33 status register encoding during the result phase of certain commands, the data register contains data bytes that give the status of the command just executed. table 15 - status register 0 bit no. symbol name description 7,6 ic interrupt code 00 - normal termination of command. the specified command was properly executed and completed without error. 01 - abnormal termination of command. command execution was started, but was not successfully completed. 10 - invalid command. the requested command could not be executed. 11 - abnormal termination caused by polling. 5 se seek end the fdc completed a seek, relative seek or recalibrate command (used during a sense interrupt command). 4 ec equipment check the trk0 pin failed to become a "1" after: 1. 80 step pulses in the recalibrate command. 2. the relative seek command caused the fdc to step outward beyond track 0. 3 unused. this bit is always "0". 2 h head address the current head address. 1,0 ds1,0 drive select the current selected drive.
34 table 16 - status register 1 bit no. symbol name description 7 en end of cylinder the fdc tried to access a sector beyond the final sector of the track (255d). will be set if tc is not issued after read or write data command. 6 unused. this bit is always "0". 5 de data error the fdc detected a crc error in either the id field or the data field of a sector. 4 or overrun/ underrun becomes set if the fdc does not receive cpu or dma service within the required time interval, resulting in data overrun or underrun. 3 unused. this bit is always "0". 2 nd no data any one of the following: 1. read data, read deleted data command - the fdc did not find the specified sector. 2. read id command - the fdc cannot read the id field without an error. 3. read a track command - the fdc cannot find the proper sector sequence. 1 nw not writable wp pin became a "1" while the fdc is executing a write data, write deleted data, or format a track command. 0 ma missing address mark any one of the following: 1. the fdc did not detect an id address mark at the specified track after encountering the index pulse from the idx pin twice. 2. the fdc cannot detect a data address mark or a deleted data address mark on the specified track.
35 table 17 - status register 2 bit no. symbol name description 7 unused. this bit is always "0". 6 cm control mark any one of the following: 1. read data command - the fdc encountered a deleted data address mark. 2. read deleted data command - the fdc encountered a data address mark. 5 dd data error in data field the fdc detected a crc error in the data field. 4 wc wrong cylinder the track address from the sector id field is different from the track address maintained inside the fdc. 3 unused. this bit is always "0". 2 unused. this bit is always "0". 1 bc bad cylinder the track address from the sector id field is different from the track address maintained inside the fdc and is equal to ff hex, which indicates a bad track with a hard error according to the ibm soft-sectored format. 0 md missing data address mark the fdc cannot detect a data address mark or a deleted data address mark.
36 table 18- status register 3 bit no. symbol name description 7 unused. this bit is always "0". 6 wp write protected indicates the status of the wp pin. 5 unused. this bit is always "1". 4 t0 track 0 indicates the status of the trk0 pin. 3 unused. this bit is always "1". 2 hd head address indicates the status of the hdsel pin. 1,0 ds1,0 drive select indicates the status of the ds1, ds0 pins. reset there are three sources of system reset on the fdc: the reset pin of the fdc, a reset generated via a bit in the dor, and a reset generated via a bit in the dsr. at power on, a power on reset initializes the fdc. all resets take the fdc out of the powerdown state. all operations are terminated upon a reset, and the fdc enters an idle state. a reset while a disk write is in progress will corrupt the data and crc. on exiting the reset state, various internal registers are cleared, including the configure command information, and the fdc waits for a new command. drive polling will start unless disabled by a new configure command. reset pin (hardware reset) the reset pin is a global reset and clears all registers except those programmed by the specify command. the dor reset bit is enabled and must be cleared by the host to exit the reset state. dor reset vs. dsr reset (software reset) these two resets are functionally the same. both will reset the fdc core, which affects drive status information and the fifo circuits. the dsr reset clears itself automatically while the dor reset requires the host to manually clear it. dor reset has precedence over the dsr reset. the dor reset is set automatically upon a pin reset. the user must manually clear this reset bit in the dor to exit the reset state. modes of operation the fdc has three modes of operation, pc/at mode, ps/2 mode and model 30 mode. these are determined by the state of the ident and mfm bits 6 and 5 respectively of crxx. pc/at mode - (ident high, mfm a "don't care") the pc/at register set is enabled, the dma enable bit of the dor becomes valid (fintr and drq can be hi z), and tc and densel become active high signals.
37 ps/2 mode - (ident low, mfm high) this mode supports the ps/2 models 50/60/80 configuration and register set. the dma bit of the dor becomes a "don't care" (fintr and drq are always valid), tc and densel become active low. model 30 mode - (ident low, mfm low) this mode supports ps/2 model 30 configuration and register set. the dma enable bit of ther dor becomes valid (fintr and drq can be hi z), tc is active high and densel is active low. dma transfers dma transfers are enabled with the specify command and are initiated by the fdc by activating the fdrq pin during a data transfer command. the fifo is enabled directly by asserting ndack and addresses need not be valid. note that if the dma controller (i.e. 8237a) is programmed to function in verify mode, a pseudo read is performed by the fdc based only on ndack. this mode is only available when the fdc has been configured into byte mode (fifo disabled) and is programmed to do a read. with the fifo enabled, the fdc can perform the above operation by using the new verify command; no dma operation is needed. the FDC37C93XAPM supports two dma transfer modes for the fdc: single transfer and burst transfer. in the case of the single transfer, the dma req goes active at the start of the dma cycle, and the dma req is deasserted after the ndack. in the case of the burst transfer, the req is held active until the last transfer (independent of ndack). see timing diagrams for more information. burst mode is enabled via bit[1] of crf0 in logical device 0. setting bit[1]=0 enables burst mode; the default is bit[1]=1, for non-burst mode. controller phases for simplicity, command handling in the fdc can be divided into three phases: command, execution, and result. each phase is described in the following sections. command phase after a reset, the fdc enters the command phase and is ready to accept a command from the host. for each of the commands, a defined set of command code bytes and parameter bytes has to be written to the fdc before the command phase is complete. (please refer to table 19 for the command set descriptions.) these bytes of data must be transferred in the order prescribed. before writing to the fdc, the host must examine the rqm and dio bits of the main status register. rqm and dio must be equal to "1" and "0" respectively before command bytes may be written. rqm is set false by the fdc after each write cycle until the received byte is processed. the fdc asserts rqm again to request each parameter byte of the command unless an illegal command condition is detected. after the last parameter byte is received, rqm remains "0" and the fdc automatically enters the next phase as defined by the command definition. the fifo is disabled during the command phase to provide for the proper handling of the "invalid command" condition.
38 execution phase all data transfers to or from the fdc occur during the execution phase, which can proceed in dma or non-dma mode as indicated in the specify command. after a reset, the fifo is disabled. each data byte is transferred by an fint or fdrq depending on the dma mode. the configure command can enable the fifo and set the fifo threshold value. the following paragraphs detail the operation of the fifo flow control. in these descriptions, is defined as the number of bytes available to the fdc when service is requested from the host and ranges from 1 to 16. the parameter fifothr, which the user programs, is one less and ranges from 0 to 15. a low threshold value (i.e. 2) results in longer periods of time between service requests, but requires faster servicing of the request for both read and write cases. the host reads (writes) from (to) the fifo until empty (full), then the transfer request goes inactive. the host must be very responsive to the service request. this is the desired case for use with a "fast" system. a high value of threshold (i.e. 12) is used with a "sluggish" system by affording a long latency period after a service request, but results in more frequent service requests. non-dma mode - transfers from the fifo to the host the fint pin and rqm bits in the main status register are activated when the fifo contains (16-) bytes or the last bytes of a full sector have been placed in the fifo. the fint pin can be used for interrupt-driven systems, and rqm can be used for polled systems. the host must respond to the request by reading data from the fifo. this process is repeated until the last byte is transferred out of the fifo. the fdc will deactivate the fint pin and rqm bit when the fifo becomes empty. non-dma mode - transfers from the host to the fifo the fint pin and rqm bit in the main status register are activated upon entering the execution phase of data transfer commands. the host must respond to the request by writing data into the fifo. the fint pin and rqm bit remain true until the fifo becomes full. they are set true again when the fifo has bytes remaining in the fifo. the fint pin will also be deactivated if tc and ndack both go inactive. the fdc enters the result phase after the last byte is taken by the fdc from the fifo (i.e. fifo empty condition). dma mode - transfers from the fifo to the host the fdc activates the ddrq pin when the fifo contains (16 - ) bytes, or the last byte of a full sector transfer has been placed in the fifo. the dma controller must respond to the request by reading data from the fifo. the fdc will deactivate the ddrq pin when the fifo becomes empty. fdrq goes inactive after ndack goes active for the last byte of a data transfer (or on the active edge of nior, on the last byte, if no edge is present on ndack). a data underrun may occur if fdrq is not removed in time to prevent an unwanted cycle.
39 dma mode - transfers from the host to the fifo the fdc activates the fdrq pin when entering the execution phase of the data transfer commands. the dma controller must respond by activating the ndack and niow pins and placing data in the fifo. fdrq remains active until the fifo becomes full. fdrq is again set true when the fifo has bytes remaining in the fifo. the fdc will also deactivate the fdrq pin when tc becomes true (qualified by ndack), indicating that no more data is required. fdrq goes inactive after ndack goes active for the last byte of a data transfer (or on the active edge of niow of the last byte, if no edge is present on ndack). a data overrun may occur if fdrq is not removed in time to prevent an unwanted cycle. data transfer termination the fdc supports terminal count explicitly through the tc pin and implicitly through the underrun/overrun and end-of-track (eot) functions. for full sector transfers, the eot parameter can define the last sector to be transferred in a single or multi-sector transfer. if the last sector to be transferred is a partial sector, the host can stop transferring the data in mid-sector, and the fdc will continue to complete the sector as if a hardware tc was received. the only difference between these implicit functions and tc is that they return "abnormal termination" result status. such status indications can be ignored if they were expected. note that when the host is sending data to the fifo of the fdc, the internal sector count will be complete when the fdc reads the last byte from its side of the fifo. there may be a delay in the removal of the transfer request signal of up to the time taken for the fdc to read the last 16 bytes from the fifo. the host must tolerate this delay. result phase the generation of fint determines the beginning of the result phase. for each of the commands, a defined set of result bytes has to be read from the fdc before the result phase is complete. these bytes of data must be read out for another command to start. rqm and dio must both equal "1" before the result bytes may be read. after all the result bytes have been read, the rqm and dio bits switch to "1" and "0" respectively and the cb bit is cleared, indicating that the fdc is ready to accept the next command.
40 ds1 ds0 drive 0 0 1 1 0 1 0 1 drive 0 drive 1 drive 2 drive 3 command set/descriptions commands can be written whenever the fdc is in the command phase. each command has a unique set of needed parameters and status results. the fdc checks to see that the first byte is a valid command and, if valid, proceeds with the command. if it is invalid, an interrupt is issued. the user sends a sense interrupt status command which returns an invalid command error. refer to table 19 for explanations of the various symbols used. table 20 lists the required parameters and the results associated with each command that the fdc is capable of performing. table 19 - description of command symbols symbol name description c cylinder address the currently selected address; 0 to 255. d data pattern the pattern to be written in each sector data field during formatting. d0, d1, d2, d3 drive select 0-3 designates which drives are perpendicular drives on the perpendicular mode command. a "1" indicates a perpendicular drive. dir direction control if this bit is 0, then the head will step out from the spindle during a relative seek. if set to a 1, the head will step in toward the spindle. ds0, ds1 disk drive select dtl special sector size by setting n to zero (00), dtl may be used to control the number of bytes transferred in disk read/write commands. the sector size (n = 0) is set to 128. if the actual sector (on the diskette) is larger than dtl, the remainder of the actual sector is read but is not passed to the host during read commands; during write commands, the remainder of the actual sector is written with all zero bytes. the crc check code is calculated with the actual sector. when n is not zero, dtl has no meaning and should be set to ff hex. ec enable count when this bit is "1" the "dtl" parameter of the verify command becomes sc (number of sectors per track). efifo enable fifo this active low bit when a 0, enables the fifo. a "1" disables the fifo (default). eis enable implied seek when set, a seek operation will be performed before executing any read or write command that requires the c parameter in the command phase. a "0" disables the implied seek.
41 table 19 - description of command symbols symbol name description eot end of track the final sector number of the current track. gap alters gap 2 length when using perpendicular mode. gpl gap length the gap 3 size. (gap 3 is the space between sectors excluding the vco synchronization field). h/hds head address selected head: 0 or 1 (disk side 0 or 1) as encoded in the sector id field. hlt head load time the time interval that fdc waits after loading the head and before initializing a read or write operation. refer to the specify command for actual delays. hut head unload time the time interval from the end of the execution phase (of a read or write command) until the head is unloaded. refer to the specify command for actual delays. lock lock defines whether efifo, fifothr and pretrk parameters of the configure command can be reset to their default values by a "software reset" (reset caused by writing to the appropriate bits of either tha dsr or dor). mfm mfm/fm mode selector a ?1? selects the double density (mfm) mode. a ?0? selects single density (fm) mode. mt multi-track selector when set, this flag selects the multi-track operating mode. in this mode, the fdc treats a complete cylinder under head 0 and 1 as a single track. the fdc operates as this expanded track started at the first sector under head 0 and ended at the last sector under head 1. with this flag set, a multitrack read or write operation will automatically continue to the first sector under head 1 when the fdc finishes operating on the last sector under head 0.
42 table 19 - description of command symbols symbol name description n sector size code this specifies the number of bytes in a sector. if this parameter is "00", then the sector size is 128 bytes. the number of bytes transferred is determined by the dtl parameter. otherwise the sector size is (2 raised to the "n'th" power) times 128. all values up to "07" hex are allowable. "07"h would equal a sector size of 16k. it is the user's responsibility to not select combinations that are not possible with the drive. n sector size 00 128 bytes 01 256 bytes 02 512 bytes 03 1024 bytes ncn new cylinder number the desired cylinder number. nd non-dma mode flag when set to ?1?, indicates that the fdc is to operate in the non- dma mode. in this mode, the host is interrupted for each data transfer. when set to ?0?, the fdc operates in dma mode, interfacing to a dma controller by means of the drq and ndack signals. ow overwrite the bits d0-d3 of the perpendicular mode command can only be modified if ow is set to ?1?. ow is defined in the lock command. pcn present cylinder number the current position of the head at the completion of sense interrupt status command. poll polling disable when set, the internal polling routine is disabled. when clear, polling is enabled. pretrk precompensation start track number programmable from track 00 to ffh. r sector address the sector number to be read or written. in multi-sector transfers, this parameter specifies the sector number of the first sector to be read or written. rcn relative cylinder number relative cylinder offset from present cylinder as used by the relative seek command.
43 table 19 - description of command symbols symbol name description sc number of sectors per track the number of sectors per track to be initialized by the format command. the number of sectors per track to be verified during a verify command when ec is set. sk skip flag when set to ?1?, sectors containing a deleted data address mark will automatically be skipped during the execution of read data. if read deleted is executed, only sectors with a deleted address mark will be accessed. when set to "0", the sector is read or written the same as the read and write commands. srt step rate interval the time interval between step pulses issued by the fdc programmable from 0.5 to 8 milliseconds in increments of 0.5 ms at the 1 mbps data rate. refer to the specify command for actual delays. st0 st1 st2 st3 status 0 status 1 status 2 status 3 registers within the fdc which store status information after a command has been executed. this status information is available to the host during the result phase after command execution. wgate write gate alters timing of we to allow for pre-erase loads in perpendicular drives.
44 instruction set table 20 - instruction set read data data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w mt mfm sk 0 0 1 1 0 command codes w 0 0 0 0 0 hds ds1 ds0 w -------- c -------- sector id information prior to command execution. w -------- h -------- w -------- r -------- w -------- n -------- w ------- eot ------- w ------- gpl ------- w ------- dtl ------- execution data transfer between the fdd and system. result r ------- st0 ------- status information after com mand execution. r ------- st1 ------- r ------- st2 ------- r -------- c -------- sector id information after com mand execution. r -------- h -------- r -------- r -------- r -------- n --------
45 read deleted data data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w mt mfm sk 0 1 1 0 0 command codes w 0 0 0 0 0 hds ds1 ds0 w -------- c -------- sector id information prior to command execution. w -------- h -------- w -------- r -------- w -------- n -------- w ------- eot ------- w ------- gpl ------- w ------- dtl ------- execution data transfer between the fdd and system. result r ------- st0 ------- status information after com mand execution. r ------- st1 ------- r ------- st2 ------- r -------- c -------- sector id information after com mand execution. r -------- h -------- r -------- r -------- r -------- n --------
46 write d ata data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w mt mfm 0 0 0 1 0 1 command codes w 0 0 0 0 0 hds ds1 ds0 w -------- c -------- sector id information prior to command execution. w -------- h -------- w -------- r -------- w -------- n -------- w ------- eot ------- w ------- gpl ------- w ------- dtl ------- execution data transfer between the fdd and system. result r ------- st0 ------- status information after com mand execution. r ------- st1 ------- r ------- st2 ------- r -------- c -------- sector id information after command execution. r -------- h -------- r -------- r -------- r -------- n --------
47 write deleted data data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w mt mfm 0 0 1 0 0 1 command codes w 0 0 0 0 0 hds ds1 ds0 w -------- c -------- sector id information prior to command execution. w -------- h -------- w -------- r -------- w -------- n -------- w ------- eot ------- w ------- gpl ------- w ------- dtl ------- execution data transfer between the fdd and system. result r r r ------- st0 ------- ------- st1 ------- ------- st2 ------- status information after com mand execution. r -------- c -------- r -------- h -------- r r -------- r -------- -------- n -------- sector id information after command execution.
48 read a track data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 mfm 0 0 0 0 1 0 command codes w 0 0 0 0 0 hds ds1 ds0 w -------- c -------- sector id information prior to command execution. w -------- h -------- w -------- r -------- w -------- n -------- w ------- eot ------- w ------- gpl ------- w ------- dtl ------- execution data transfer between the fdd and system. fdc reads all of cylinders' contents from index hole to eot. result r r r ------- st0 ------- ------- st1 ------- ------- st2 ------- status information after com mand execution. r -------- c -------- r -------- h -------- r r -------- r -------- -------- n -------- sector id information after command execution.
49 verify data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w mt mfm sk 1 0 1 1 0 command codes w ec 0 0 0 0 hds ds1 ds0 w -------- c -------- sector id information prior to command execution. w -------- h -------- w -------- r -------- w -------- n -------- w ------- eot ------- w ------- gpl ------- w ------ dtl/sc ------ execution no data transfer takes place. result r ------- st0 ------- ------- st1 ------- status information after com mand execution. r ------- st2 ------- r -------- c -------- r -------- h -------- -------- r -------- sector id information after command execution. r -------- n -------- r r version data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 1 0 0 0 0 command code result r 1 0 0 1 0 0 0 0 enhanced controller
50 format a track data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 mfm 0 0 1 1 0 1 command codes w 0 0 0 0 0 hds ds1 ds0 w -------- n -------- bytes/sector w -------- sc -------- sectors/cylinder w ------- gpl ------- gap 3 w -------- d -------- filler byte execution for each sector repeat: w -------- c -------- input sector parameters w -------- h -------- w -------- r -------- w -------- n -------- fdc formats an entire cylinder result r ------- st0 ------- status information after command execution r ------- st1 ------- r ------- st2 ------- r ------ undefined ------ r ------ undefined ------ r ------ undefined ------ r ------ undefined ------
51 recalibrate data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 0 0 1 1 1 command codes w 0 0 0 0 0 0 ds1 ds0 execution head retracted to track 0 interrupt. sense interr upt status data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 0 1 0 0 0 command codes result r ------- st0 ------- status information at the end of each seek operation. r ------- pcn ------- specify data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 0 0 0 1 1 command codes w --- srt --- --- hut --- w ------ hlt ------ nd
52 sense drive status data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 0 0 1 0 0 command codes w 0 0 0 0 0 hds ds1 ds0 result r ------- st3 ------- status information about fdd seek data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 0 1 1 1 1 command codes w 0 0 0 0 0 hds ds1 ds0 w ------- ncn ------- execution head positioned over proper cylinder on diskette. configure data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 1 0 0 1 1 configure information w 0 0 0 0 0 0 0 0 w 0 eis efifo poll --- fifothr --- execution w --------- pretrk ---------
53 relative seek data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 1 dir 0 0 1 1 1 1 w 0 0 0 0 0 hds ds1 ds0 w ------- rcn ------- dumpreg data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 0 1 1 1 0 *note: registers placed in fifo execution result r ------ pcn-drive 0 ------- r ------ pcn-drive 1 ------- r ------ pcn-drive 2 ------- r ------ pcn-drive 3 ------- r ---- srt ---- --- hut --- r ------- hlt ------- nd r ------- sc/eot ------- r lock 0 d3 d2 d1 d0 gap wgate r 0 eis efifo poll -- fifothr -- r -------- pretrk --------
54 read id data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 mfm 0 0 1 0 1 0 commands w 0 0 0 0 0 hds ds1 ds0 execution the first correct id information on the cylinder is stored in data register result r r r r r r -------- st0 -------- -------- st1 -------- -------- st2 -------- -------- c -------- -------- h -------- -------- r -------- -------- n -------- status information after command execution. disk status after the command has completed
55 perpendicular mode data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w 0 0 0 1 0 0 1 0 command codes ow 0 d3 d2 d1 d0 gap wgate invalid codes data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w ----- invalid codes ----- invalid command codes (noop - fdc goes into stand by state) result r ------- st0 ------- st0 = 80h lock data bus phase r/w d7 d6 d5 d4 d3 d2 d1 d0 remarks command w lock 0 0 1 0 1 0 0 command codes result r 0 0 0 lock 0 0 0 0 sc is returned if the last command that was issued was the format command. eot is returned if the last command was a read or write. note: these bits are used internally only. they are not reflected in the drive select pins. it is the user's responsibility to maintain correspondence between these bits and the drive select pins (dor).
56 data transfer commands all of the read data, write data and verify type commands use the same parameter bytes and return the same results information, the only difference being the coding of bits 0-4 in the first byte. an implied seek will be executed if the feature was enabled by the configure command. this seek is completely transparent to the user. the drive busy bit for the drive will go active in the main status register during the seek portion of the command. if the seek portion fails, it is reflected in the results status normally returned for a read/write data command. status register 0 (st0) would contain the error code and c would contain the cylinder on which the seek failed. read data a set of nine (9) bytes is required to place the fdc in the read data mode. after the read data command has been issued, the fdc loads the head (if it is in the unloaded state), waits the specified head settling time (defined in the specify command), and begins reading id address marks and id fields. when the sector address read off the diskette matches with the sector address specified in the command, the fdc reads the sector's data field and transfers the data to the fifo. after completion of the read operation from the current sector, the sector address is incremented by one and the data from the next logical sector is read and output via the fifo. this continuous read function is called "multi- sector read operation". upon receipt of tc, or an implied tc (fifo overrun/underrun), the fdc stops sending data but will continue to read data from the current sector, check the crc bytes, and at the end of the sector, terminate the read data command. n determines the number of bytes per sector (see table 21 below). if n is set to zero, the sector size is set to 128. the dtl value determines the number of bytes to be transferred. if dtl is less than 128, the fdc transfers the specified number of bytes to the host. for reads, it continues to read the entire 128-byte sector and checks for crc errors. for writes, it completes the 128-byte sector by filling in zeros. if n is not set to 00 hex, dtl should be set to ff hex and has no impact on the number of bytes transferred. table 21 - sector sizes the amount of data which can be handled with a single command to the fdc depends upon mt (multi-track) and n (number of bytes/sector). the multi-track function (mt) allows the fdc to read data from both sides of the diskette. for a particular cylinder, data will be transferred starting at sector 1, side 0 and completing the last sector of the same track at side 1. if the host terminates a read or write operation in the fdc, the id information in the result phase is dependent upon the state of the mt bit and eot byte. refer to table 22. n sector size 00 01 02 03 .. 07 128 bytes 256 bytes 512 bytes 1024 bytes ... 16 kbytes
57 at the completion of the read data command, the head is not unloaded until after the head unload time interval (specified in the specify command) has elapsed. if the host issues another command before the head unloads, then the head settling time may be saved between subsequent reads. if the fdc detects a pulse on the nindex pin twice without finding the specified sector (meaning that the diskette's index hole passes through index detect logic in the drive twice), the fdc sets the ic code in status register 0 to "01" indicating abnormal termination, sets the nd bit in status register 1 to "1" indicating a sector not found, and terminates the read data command. after reading the id and data fields in each sector, the fdc checks the crc bytes. if a crc error occurs in the id or data field, the fdc sets the ic code in status register 0 to "01" indicating abnormal termination, sets the de bit flag in status register 1 to "1", sets the dd bit in status register 2 to "1" if crc is incorrect in the id field, and terminates the read data command. table 23 describes the effect of the sk bit on the read data command execution and results. except where noted in table 23, the c or r value of the sector address is automatically incremented (see table 25). table 22 - effects of mt and n bits mt n maximum transfer capacity final sector read from disk 0 1 0 1 0 1 1 1 2 2 3 3 256 x 26 = 6,656 256 x 52 = 13,312 512 x 15 = 7,680 512 x 30 = 15,360 1024 x 8 = 8,192 1024 x 16 = 16,384 26 at side 0 or 1 26 at side 1 15 at side 0 or 1 15 at side 1 8 at side 0 or 1 16 at side 1 table 23 - skip bit vs read data command sk bit value data address mark type encountered results sector read? cm bit of st2 set? description of results 0 0 1 1 normal data deleted data normal data deleted data yes yes yes no no yes no yes normal termination. address not incremented. next sector not searched for. normal termination. normal termination. sector not read ("skipped").
58 read deleted data this command is the same as the read data command, only it operates on sectors that contain a deleted data address mark at the beginning of a data field. table 24 describes the effect of the sk bit on the read deleted data command execution and results. except where noted in table 24, the c or r value of the sector address is automatically incremented (see table 25). table 24 - skip bit vs. read deleted data command sk bit value data address mark type encountered results sector read? cm bit of st2 set? description of results 0 0 1 1 normal data deleted data normal data deleted data yes yes no yes yes no yes no address not incremented. next sector not searched for. normal termination. normal termination. sector not read ("skipped"). normal termination. read a track this command is similar to the read data command except that the entire data field is read continuously from each of the sectors of a track. immediately after encountering a pulse on the nindex pin, the fdc starts to read all data fields on the track as continuous blocks of data without regard to logical sector numbers. if the fdc finds an error in the id or data crc check bytes, it continues to read data from the track and sets the appropriate error bits at the end of the command. the fdc compares the id information read from each sector with the specified value in the command and sets the nd flag of status register 1 to a "1" if there is no comparison. multi-track or skip operations are not allowed with this command. the mt and sk bits (bits d7 and d5 of the first command byte respectively) should always be set to "0". this command terminates when the eot specified number of sectors has not been read. if the fdc does not find an id address mark on the diskette after the second occurrence of a pulse on the idx pin, then it sets the ic code in status register 0 to "01" (abnormal termination), sets the ma bit in status register 1 to "1", and terminates the command.
59 table 25 - result phase table mt head final sector transferred to id information at result phase host c h r n 0 0 less than eot nc nc r + 1 nc equal to eot c + 1 nc 01 nc 1 less than eot nc nc r + 1 nc equal to eot c + 1 nc 01 nc 1 0 less than eot nc nc r + 1 nc equal to eot nc lsb 01 nc 1 less than eot nc nc r + 1 nc equal to eot c + 1 lsb 01 nc nc: no change, the same value as the one at the beginning of command execution. lsb: least significant bit, the lsb of h is complemented. write data after the write data command has been issued, the fdc loads the head (if it is in the unloaded state), waits the specified head load time if unloaded (defined in the specify command), and begins reading id fields. when the sector address read from the diskette matches the sector address specified in the command, the fdc reads the data from the host via the fifo and writes it to the sector's data field. after writing data into the current sector, the fdc computes the crc value and writes it into the crc field at the end of the sector transfer. the sector number stored in "r" is incremented by one, and the fdc continues writing to the next data field. the fdc continues this "multi- sector write operation". upon receipt of a terminal count signal or if a fifo over/under run occurs while a data field is being written, then the remainder of the data field is filled with zeros. the fdc reads the id field of each sector and checks the crc bytes. if it detects a crc error in one of the id fields, it sets the ic code in status register 0 to "01" (abnormal termination), sets the de bit of status register 1 to "1", and terminates the write data command. the write data command operates in much the same manner as the read data command. the following items are the same. please refer to the read data command for details: transfer capacity en (end of cylinder) bit nd (no data) bit head load, unload time interval id information when the host terminates the command definition of dtl when n = 0 and when n does not = 0 write deleted data this command is almost the same as the write data command except that a deleted data address mark is written at the beginning of the data field instead of the normal data address mark. this command is typically used to mark
60 a bad sector containing an error on the floppy disk. verify the verify command is used to verify the data stored on a disk. this command acts exactly like a read data command except that no data is transferred to the host. data is read from the disk and crc is computed and checked against the previously-stored value. because data is not transferred to the host, tc (pin 89) cannot be used to terminate this command. by setting the ec bit to "1", an implicit tc will be issued to the fdc. this implicit tc will occur when the sc value has decremented to 0 (an sc value of 0 will verify 256 sectors). this command can also be terminated by setting the ec bit to "0" and the eot value equal to the final sector to be checked. if ec is set to "0", dtl/sc should be programmed to 0ffh. refer to table 25 and table 26 for information concerning the values of mt and ec versus sc and eot value. definitions: # sectors per side = number of formatted sectors per each side of the disk. # sectors remaining = number of formatted sectors left which can be read, including side 1 of the disk if mt is set to "1". table 26 - verify command result phase table mt ec sc/eot value termination result 0 0 sc = dtl eot # sectors per side success termination result phase valid 0 0 sc = dtl eot > # sectors per side unsuccessful termination result phase invalid 0 1 sc # sectors remaining and eot # sectors per side successful termination result phase valid 0 1 sc > # sectors remaining or eot > # sectors per side unsuccessful termination result phase invalid 1 0 sc = dtl eot # sectors per side successful termination result phase valid 1 0 sc = dtl eot > # sectors per side unsuccessful termination result phase invalid 1 1 sc # sectors remaining and eot # sectors per side successful termination result phase valid 1 1 sc > # sectors remaining or eot > # sectors per side unsuccessful termination result phase invalid note: if mt is set to "1" and the sc value is greater than the number of remaining formatted sectors on side 0, verifying will continue on side 1 of the disk.
61 format a track the format command allows an entire track to be formatted. after a pulse from the idx pin is detected, the fdc starts writing data on the disk including gaps, address marks, id fields, and data fields per the ibm system 34 or 3740 format (mfm or fm respectively). the particular values that will be written to the gap and data field are controlled by the values programmed into n, sc, gpl, and d which are specified by the host during the command phase. the data field of the sector is filled with the data byte specified by d. the id field for each sector is supplied by the host; that is, four data bytes per sector are needed by the fdc for c, h, r, and n (cylinder, head, sector number and sector size respectively). after formatting each sector, the host must send new values for c, h, r and n to the fdc for the next sector on the track. the r value (sector number) is the only value that must be changed by the host after each sector is formatted. this allows the disk to be formatted with nonsequential sector addresses (interleaving). this incrementing and formatting continues for the whole track until the fdc encounters a pulse on the idx pin again and it terminates the command. table 27 contains typical values for gap fields which are dependent upon the size of the sector and the number of sectors on each track. actual values can vary due to drive electronics. format fields system 34 (double density) format gap4a 80x 4e sync 12x 00 iam gap1 50x 4e sync 12x 00 idam c y l h d s e c n o c r c gap2 22x 4e sync 12x 00 data am data c r c gap3 gap 4b 3x c2 fc 3x a1 fe 3x a1 fb f8 system 3740 (single density) format gap4a 40x ff sync 6x 00 iam gap1 26x ff sync 6x 00 idam c y l h d s e c n o c r c gap2 11x ff sync 6x 00 data am data c r c gap3 gap 4b fc fe fb or f8 perpendicular format gap4a 80x 4e sync 12x 00 iam gap1 50x 4e sync 12x 00 idam c y l h d s e c n o c r c gap2 41x 4e sync 12x 00 data am data c r c gap3 gap 4b 3x c2 fc 3x a1 fe 3x a1 fb f8
62 table 27 - typical values for formatting format sector size n sc gpl1 gpl2 5.25" drives fm 128 128 512 1024 2048 4096 ... 00 00 02 03 04 05 ... 12 10 08 04 02 01 07 10 18 46 c8 c8 09 19 30 87 ff ff mfm 256 256 512* 1024 2048 4096 ... 01 01 02 03 04 05 ... 12 10 09 04 02 01 0a 20 2a 80 c8 c8 0c 32 50 f0 ff ff 3.5" drives fm 128 256 512 0 1 2 0f 09 05 07 0f 1b 1b 2a 3a mfm 256 512** 1024 1 2 3 0f 09 05 0e 1b 35 36 54 74 gpl1 = suggested gpl values in read and write commands to avoid splice point between data field and id field of contiguous sections. gpl2 = suggested gpl value in format a track command. *pc/at values (typical) **ps/2 values (typical). applies with 1.0 mb and 2.0 mb drives. note: all values except sector size are in hex.
63 control commands control commands differ from the other commands in that no data transfer takes place. three commands generate an interrupt when complete: read id, recalibrate, and seek. the other control commands do not generate an interrupt. read id the read id command is used to find the present position of the recording heads. the fdc stores the values from the first id field it is able to read into its registers. if the fdc does not find an id address mark on the diskette after the second occurrence of a pulse on the nindex pin, it then sets the ic code in status register 0 to "01" (abnormal termination), sets the ma bit in status register 1 to "1", and terminates the command. the following commands will generate an interrupt upon completion. they do not return any result bytes. it is highly recommended that control commands be followed by the sense interrupt status command. otherwise, valuable interrupt status information will be lost. recalibrate this command causes the read/write head within the fdc to retract to the track 0 position. the fdc clears the contents of the pcn counter and checks the status of the ntr0 pin from the fdd. as long as the ntr0 pin is low, the dir pin remains 0 and step pulses are issued. when the ntr0 pin goes high, the se bit in status register 0 is set to "1" and the command is terminated. if the ntr0 pin is still low after 79 step pulses have been issued, the fdc sets the se and the ec bits of status register 0 to "1" and terminates the command. disks capable of handling more than 80 tracks per side may require more than one recalibrate command to return the head back to physical track 0. the recalibrate command does not have a result phase. the sense interrupt status command must be issued after the recalibrate command to effectively terminate it and to provide verification of the head position (pcn). during the command phase of the recalibrate operation, the fdc is in the busy state, but during the execution phase it is in a non-busy state. at this time, another recalibrate command may be issued, and in this manner parallel recalibrate operations may be done on up to four drives at once. upon power up, the software must issue a recalibrate command to properly initialize all drives and the controller. seek the read/write head within the drive is moved from track to track under the control of the seek command. the fdc compares the pcn, which is the current head position, with the ncn and performs the following operation if there is a difference: pcn < ncn: direction signal to drive set to "1" (step in) and issues step pulses. pcn > ncn: direction signal to drive set to "0" (step out) and issues step pulses. the rate at which step pulses are issued is controlled by srt (stepping rate time) in the specify command. after each step pulse is issued, ncn is compared against pcn, and when ncn = pcn the se bit in status register 0 is set to "1" and the command is terminated.
64 during the command phase of the seek or recalibrate operation, the fdc is in the busy state, but during the execution phase it is in the non-busy state. at this time, another seek or recalibrate command may be issued, and in this manner, parallel seek operations may be done on up to four drives at once. note that if implied seek is not enabled, the read and write commands should be preceded by: 1) seek command - step to the proper track 2) sense interrupt status command - terminate the seek command 3) read id - verify head is on proper track 4) issue read/write command. the seek command does not have a result phase. therefore, it is highly recommended that the sense interrupt status command be issued after the seek command to terminate it and to provide verification of the head position (pcn). the h bit (head address) in st0 will always return to a "0". when exiting powerdown mode, the fdc clears the pcn value and the status information to zero. prior to issuing the powerdown command, it is highly recommended that the user service all pending interrupts through the sense interrupt status command. sense interrupt status an interrupt signal on fint pin is generated by the fdc for one of the following reasons: 1. upon entering the result phase of: a. read data command b. read a track command c. read id command d. read deleted data command e. write data command f. format a track command g. write deleted data command h. verify command 2. end of seek, relative seek, or recalibrate command 3. fdc requires a data transfer during the execution phase in the non-dma mode the sense interrupt status command resets the interrupt signal and, via the ic code and se bit of status register 0, identifies the cause of the interrupt. table 28 - interrupt identification the seek, relative seek, and recalibrate commands have no result phase. the sense interrupt status command must be issued immediately after these commands to terminate them and to provide verification of the head position (pcn). the h (head address) bit in st0 will always return a "0". if a sense interrupt status is not issued, the drive will continue to be busy and may affect the operation of the next command. se ic interrupt due to 0 1 1 11 00 01 polling normal termination of seek or recalibrate command abnormal termination of seek or recalibrate command
65 sense drive status sense drive status obtains drive status information. it has no execution phase and goes directly to the result phase from the command phase. status register 3 contains the drive status information. specify the specify command sets the initial values for each of the three internal times. the hut (head unload time) defines the time from the end of the execution phase of one of the read/write commands to the head unload state. the srt (step rate time) defines the time interval between adjacent step pulses. note that the spacing between the first and second step pulses may be shorter than the remaining step pulses. the hlt (head load time) defines the time between when the head load signal goes high and the read/write operation starts. the values change with the data rate speedselection and are documented in table 29. the values are the same for mfm and fm. table 29 - drive control delays (ms) hut srt 2m 1m 500k 300k 250k 2m 1m 500k 300k 250k 0 1 .. e f 64 4 .. 56 60 128 8 .. 112 120 256 16 .. 224 240 426 26.7 .. 373 400 512 32 .. 448 480 4 3.75 .. 0.5 0.25 8 7.5 .. 1 0.5 16 15 .. 2 1 26.7 25 .. 3.33 1.67 32 30 .. 4 2 hlt 2m 1m 500k 300k 250k 00 01 02 .. 7f 7f 64 0.5 1 .. 63 63.5 128 1 2 .. 126 127 256 2 4 .. 252 254 426 3.3 6.7 .. 420 423 512 4 8 . 504 508 the choice of dma or non-dma operations is made by the nd bit. when this bit is "1", the non-dma mode is selected, and when nd is "0", the dma mode is selected. in dma mode, data transfers are signalled by the fdrq pin. non- dma mode uses the rqm bit and the fint pin to signal data transfers. configure the configure command is issued to select the special features of the fdc. a configure command need not be issued if the default values of the fdc meet the system requirements.
66 configure default values: eis - no implied seeks efifo - fifo disabled poll - polling enabled fifothr - fifo threshold set to 1 byte pretrk - pre-compensation set to track 0 eis - enable implied seek. when set to "1", the fdc will perform a seek operation before executing a read or write command. defaults to no implied seek. efifo - a "1" disables the fifo (default). this means data transfers are asked for on a byte- by-byte basis. defaults to "1", fifo disabled. the threshold defaults to "1". poll - disable polling of the drives. defaults to "0", polling enabled. when enabled, a single interrupt is generated after a reset. no polling is performed while the drive head is loaded and the head unload delay has not expired. fifothr - the fifo threshold in the execution phase of read or write commands. this is programmable from 1 to 16 bytes. defaults to one byte. a "00" selects one byte; "0f" selects 16 bytes. pretrk - pre-compensation start track number. programmable from track 0 to 255. defaults to track 0. a "00" selects track 0; "ff" selects track 255. version the version command checks to see if the controller is an enhanced type or the older type (765a). a value of 90 h is returned as the result byte. relative seek the command is coded the same as for seek, except for the msb of the first byte and the dir bit. dir head step direc tion control rcn relative cylinder number that determines how many tracks to step the head in or out from the current track number. the relative seek command differs from the seek command in that it steps the head the absolute number of tracks specified in the command instead of making a comparison against an internal register. the seek command is good for drives that support a maximum of 256 tracks. relative seeks cannot be overlapped with other relative seeks. only one relative seek can be active at a time. relative seeks may be overlapped with seeks and recalibrates. bit 4 of status register 0 (ec) will be set if relative seek attempts to step outward beyond track 0. as an example, assume that a floppy drive has 300 useable tracks. the host needs to read track 300 and the head is on any track (0-255). if a seek command is issued, the head will stop at track 255. if a relative seek command is issued, the fdc will move the head the specified number of tracks, regardless of the internal cylinder position register (but will increment the register). if the head was on track 40 (d), the maximum track that the fdc could position the head on using relative seek will be 295 (d), the initial track + 255 (d). the maximum count that the head can be moved dir action 0 1 step head out step head in
67 with a single relative seek command is 255 (d). the internal register, pcn, will overflow as the cylinder number crosses track 255 and will contain 39 (d). the resulting pcn value is thus (rcn + pcn) mod 256. functionally, the fdc starts counting from 0 again as the track number goes above 255 (d). it is the user's responsibility to compensate fdc functions (precompensation track number) when accessing tracks greater than 255. the fdc does not keep track that it is working in an "extended track area" (greater than 255). any command issued will use the current pcn value except for the recalibrate command, which only looks for the track0 signal. recalibrate will return an error if the head is farther than 79 due to its limitation of issuing a maximum of 80 step pulses. the user simply needs to issue a second recalibrate command. the seek command and implied seeks will function correctly within the 44 (d) track (299-255) area of the "extended track area". it is the user's responsibility not to issue a new track position that will exceed the maximum track that is present in the extended area. to return to the standard floppy range (0-255) of tracks, a relative seek should be issued to cross the track 255 boundary. a relative seek can be used instead of the normal seek, but the host is required to calculate the difference between the current head location and the new (target) head location. this may require the host to issue a read id command to ensure that the head is physically on the track that software assumes it to be. different fdc commands will return different cylinder results which may be difficult to keep track of with software without the read id command. perpendicular mode the perpendicular mode command should be issued prior to executing read/write/format commands that access a disk drive with perpendicular recording capability. with this command, the length of the gap2 field and vco enable timing can be altered to accommodate the unique requirements of these drives. table 30 describes the effects of the wgate and gap bits for the perpendicular mode command. upon a reset, the fdc will default to the conventional mode (wgate = 0, gap = 0). selection of the 500 kbps and 1 mbps perpendicular modes is independent of the actual data rate selected in the data rate select register. the user must ensure that these two data rates remain consistent. the gap2 and vco timing requirements for perpendicular recording type drives are dictated by the design of the read/write head. in the design of this head, a pre-erase head precedes the normal read/write head by a distance of 200 micrometers. this works out to about 38 bytes at a 1 mbps recording density. whenever the write head is enabled by the write gate signal, the pre-erase head is also activated at the same time. thus, when the write head is initially turned on, flux transitions recorded on the media for the first 38 bytes will not be preconditioned with the pre-erase head since it has not yet been activated. to accommodate this head activation and deactivation time, the gap2 field is expanded to a length of 41 bytes. the format field shown on page 61 illustrates the change in the gap2 field size for the perpendicular format.
68 on the read back by the fdc, the controller must begin synchronization at the beginning of the sync field. for the conventional mode, the internal pll vco is enabled (vcoen) approximately 24 bytes from the start of the gap2 field. but, when the controller operates in the 1 mbps perpendicular mode (wgate = 1, gap = 1), vcoen goes active after 43 bytes to accommodate the increased gap2 field size. for both cases, and approximate two-byte cushion is maintained from the beginning of the sync field for the purposes of avoiding write splices in the presence of motor speed variation. for the write data case, the fdc activates write gate at the beginning of the sync field under the conventional mode. the controller then writes a new sync field, data address mark, data field, and crc as shown on page 62. with the pre-erase head of the perpendicular drive, the write head must be activated in the gap2 field to insure a proper write of the new sync field. for the 1 mbps perpendicular mode (wgate = 1, gap = 1), 38 bytes will be written in the gap2 space. since the bit density is proportional to the data rate, 19 bytes will be written in the gap2 field for the 500 kbps perpendicular mode (wgate = 1, gap =0). it should be noted that none of the alterations in gap2 size, vco timing, or write gate timing affect normal program flow. the information provided here is just for background purposes and is not needed for normal operation. once the perpendicular mode command is invoked, fdc software behavior from the user standpoint is unchanged. the perpendicular mode command is enhanced to allow specific drives to be designated perpendicular recording drives. this enhancement allows data transfers between conventional and perpendicular drives without having to issue perpendicular mode commands between the accesses of the different drive types, nor having to change write pre- compensation values. when both gap and wgate bits of the perpendicular mode command are both programmed to "0" (conventional mode), then d0, d1, d2, d3, and d4 can be programmed independently to "1" for that drive to be set automatically to perpendicular mode. in this mode the following set of conditions also apply: 1. the gap2 written to a perpendicular drive during a write operation will depend upon the programmed data rate. 2. the write pre-compensation given to a perpendicular mode drive will be 0ns. 3. for d0-d3 programmed to "0" for conventional mode drives any data written will be at the currently programmed write pre-compensation. note: bits d0-d3 can only be overwritten when ow is programmed as a "1".if either gap or wgate is a "1" then d0-d3 are ignored. software and hardware resets have the following effect on the perpendicular mode command: 1. "softwa re" resets (via the dor or dsr registers) will only clear gap and wgate bits to "0". d0-d3 are unaffected and retain their previous value. 2. "hardware" resets will clear all bits (gap, wgate and d0-d3) to "0", i.e all conventional mode.
69 table 30 - effects of wgate and gap bits wgate gap mode length of gap2 format field portion of gap 2 written by write data operation 0 0 1 1 0 1 0 1 conventional perpendicular (500 kbps) reserved (conventional) perpendicular (1 mbps) 22 bytes 22 bytes 22 bytes 41 bytes 0 bytes 19 bytes 0 bytes 38 bytes lock in order to protect systems with long dma latencies against older application software that can disable the fifo, the lock command has been added. this command should only be used by the fdc routines, and application software should refrain from using it. if an application calls for the fifo to be disabled then the configure command should be used. the lock command defines whether the efifo, fifothr, and pretrk parameters of the configure command can be reset by the dor and dsr registers. when the lock bit is set to logic "1" all subsequent "software resets by the dor and dsr registers will not change the previously set parameters to their default values. all "hardware" reset from the reset pin will set the lock bit to logic "0" and return the efifo, fifothr, and pretrk to their default values. a status byte is returned immediately after issuing a a lock command. this byte reflects the value of the lock bit set by the command byte. enhanced dumpreg the dumpreg command is designed to support system run-time diagnostics and application software development and debug. to accommodate the lock command and the enhanced perpendicular mode command the eighth byte of the dumpreg command has been modified to contain the additional data from these two commands. compatibility the FDC37C93XAPM was designed with software compatibility in mind. it is a fully backwards-compatible solution with the older generation 765a/b disk controllers. the fdc also implements on-board registers for compatibility with the ps/2, as well as pc/at and pc/xt, floppy disk controller subsystems. after a hardware reset of the fdc, all registers, functions and enhancements default to a pc/at, ps/2 or ps/2 model 30 compatible operating mode, depending on how the ident and mfm bits are configured by the system bios.
70 serial port (uart) the FDC37C93XAPM incorporates two full function uarts. they are compatible with the ns16450, the 16450 ace registers and the ns16550a. the uarts perform serial-to- parallel conversion on received characters and parallel-to-serial conversion on transmit characters. the data rates are independently programmable from 460.8k baud down to 50 baud. the character options are programmable for 1 start; 1, 1.5 or 2 stop bits; even, odd, sticky or no parity; and prioritized interrupts. the uarts each contain a programmable baud rate generator that is capable of dividing the input clock or crystal by a number from 1 to 65535. the uarts are also capable of supporting the midi data rate. refer to the configuration registers for information on disabling, power down and changing the base address of the uarts. the interrupt from a uart is enabled by programming out2 of that uart to a logic "1". out2 being a logic "0" disables that uart's interrupt. the second uart also supports irda, hp-sir and ask-ir infrared modes of operation. note: the uarts may be configured to share an interrupt. refer to the configuration section for more information. register description addressing of the accessible registers of the serial port is shown below. the base addresses of the serial ports are defined by the configuration registers (see configuration section). the serial port registers are located at sequentially increasing addresses above these base addresses. the FDC37C93XAPM contains two serial ports, each of which contain a register set as described below. table 31 - addressing the serial port dlab* a2 a1 a0 register name 0 0 0 0 receive buffer (read) 0 0 0 0 transmit buffer (write) 0 0 0 1 interrupt enable (read/write) x 0 1 0 interrupt identification (read) x 0 1 0 fifo control (write) x 0 1 1 line control (read/write) x 1 0 0 modem control (read/write) x 1 0 1 line status (read/write) x 1 1 0 modem status (read/write) x 1 1 1 scratchpad (read/write) 1 0 0 0 divisor lsb (read/write) 1 0 0 1 divisor msb (read/write) *note: dlab is bit 7 of the line control register
71 the following section describes the operation of the registers. receive buffer register (rb) address offset = 0h, dlab = 0, read only this register holds the received incoming data byte. bit 0 is the least significant bit, which is transmitted and received first. received data is double buffered; this uses an additional shift register to receive the serial data stream and convert it to a parallel 8 bit word which is transferred to the receive buffer register. the shift register is not accessible. transmit buffer register (tb) address offset = 0h, dlab = 0, write only this register contains the data byte to be transmitted. the transmit buffer is double buffered, utilizing an additional shift register (not accessible) to convert the 8 bit data word to a serial format. this shift register is loaded from the transmit buffer when the transmission of the previous byte is complete. interrupt enable register (ier) address offset = 1h, dlab = 0, read/write the lower four bits of this register control the enables of the five interrupt sources of the serial port interrupt. it is possible to totally disable the interrupt system by resetting bits 0 through 3 of this register. similarly, setting the appropriate bits of this register to a high, selected interrupts can be enabled. disabling the interrupt system inhibits the interrupt identification register and disables any serial port interrupt out of the FDC37C93XAPM. all other system functions operate in their normal manner, including the line status and modem status registers. the contents of the interrupt enable register are described below. bit 0 this bit enables the received data available interrupt (and timeout interrupts in the fifo mode) when set to logic "1". bit 1 this bit enables the transmitter holding register empty interrupt when set to logic "1". bit 2 this bit enables the received line status interrupt when set to logic "1". the error sources causing the interrupt are overrun, parity, framing and break. the line status register must be read to determine the source. bit 3 this bit enables the modem status interrupt when set to logic "1". this is caused when one of the modem status register bits changes state. bit 4 - 7 these bits are always logic "0". fifo control register (fcr) address offset = 2h, dlab = x, write this is a write only register at the same location as the iir. this register is used to enable and clear the fifos, set the rcvr fifo trigger level. note: dma is not supported. bit 0 setting this bit to a logic "1" enables both the xmit and rcvr fifos. clearing this bit to a logic "0" disables both the xmit and rcvr fifos and clears all bytes from both fifos. when changing from fifo mode to non-fifo (16450) mode, data is automatically cleared from the fifos. this bit must be a 1 when other bits in this register are written to or they will not be properly programmed.
72 bit 1 setting this bit to a logic "1" clears all bytes in the rcvr fifo and resets its counter logic to 0. the shift register is not cleared. this bit is self- clearing. bit 2 setting this bit to a logic "1" clears all bytes in the xmit fifo and resets its counter logic to 0. the shift register is not cleared. this bit is self- clearing. bit 3 writting to this bit has no effect on the operation of the uart. the rxrdy and txrdy pins are not available on this chip. bit 4 and 5 reserved bit 6 and 7 these bits are used to set the trigger level for the rcvr fifo interrupt. interrupt identification register (iir) address offset = 2h, dlab = x, read by accessing this register, the host cpu can determine the highest priority interrupt and its source. four levels of priority interrupt exist. they are in descending order of priority: 1. receiver line status (highest priority) 2. received data rea dy 3. transmitter holding register empty 4. modem status (lowest priority) information indicating that a prioritized interrupt is pending and the source of that interrupt is stored in the interrupt identification register (refer to interrupt control table). when the cpu accesses the iir, the serial port freezes all interrupts and indicates the highest priority pending interrupt to the cpu. during this cpu access, even if the serial port records new interrupts, the current indication does not change until access is completed. the contents of the iir are described below. bit 0 this bit can be used in either a hardwired prioritized or polled environment to indicate whether an interrupt is pending. when bit 0 is a logic "0", an interrupt is pending and the contents of the iir may be used as a pointer to the appropriate internal service routine. when bit 0 is a logic "1", no interrupt is pending. bit 1 and 2 these two bits of the iir are used to identify the highest priority interrupt pending as indicated by the interrupt control table. bit 3 in non-fifo mode, this bit is a logic "0". in fifo mode this bit is set along with bit 2 when a timeout interrupt is pending. bit 4 and 5 these bits of the iir are always logic "0". bit 6 and 7 these two bits are set when the fifo control register bit 0 equals 1. bit 7 bit 6 rcvr fifo trigger level (bytes) 0 0 1 0 1 4 1 0 8 1 1 14
73 table 32 - interrupt control table fifo mode only interrupt identification register interrupt set and reset functions bit 3 bit 2 bit 1 bit 0 priority level interrupt type interrupt source interrupt reset control 0 0 0 1 - none none - 0 1 1 0 highest receiver line status overrun error, parity error, framing error or break interrupt reading the line status register 0 1 0 0 second received data available receiver data available read receiver buffer or the fifo drops below the trigger level. 1 1 0 0 second character timeout indication no characters have been removed from or input to the rcvr fifo during the last 4 char times and there is at least 1 char in it during this time reading the receiver buffer register 0 0 1 0 third transmitter holding register empty transmitter holding register empty reading the iir register (if source of interrupt) or writing the transmitter holding register 0 0 0 0 fourth modem status clear to send or data set ready or ring indicator or data carrier detect reading the modem status register
74 line control register (lcr) address offset = 3h, dlab = 0, read/write this register contains the format information of the serial line. the bit definitions are: bit 0 and 1 these two bits specify the number of bits in each transmitted or received serial character. the encoding of bits 0 and 1 is as follows: the start, stop and parity bits are not included in the word length. bit 2 this bit specifies the number of stop bits in each transmitted or received serial character. the following table summarizes the information. note: the receiver will ignore all stop bits beyond the first, regardless of the number used in transmitting. bit 3 parity enable bit. when bit 3 is a logic "1", a parity bit is generated (transmit data) or checked (receive data) between the last data word bit and the first stop bit of the serial data. (the parity bit is used to generate an even or odd number of 1s when the data word bits and the parity bit are summed). bit 4 even parity select bit. when bit 3 is a logic "1" and bit 4 is a logic "0", an odd number of logic "1"'s is transmitted or checked in the data word bits and the parity bit. when bit 3 is a logic "1" and bit 4 is a logic "1" an even number of bits is transmitted and checked. bit 5 stick parity bit. when bit 3 is a logic "1" and bit 5 is a logic "1", the parity bit is transmitted and then detected by the receiver in the opposite state indicated by bit 4. bit 6 set break control bit. when bit 6 is a logic "1", the transmit data output (txd) is forced to the spacing or logic "0" state and remains there (until reset by a low level bit 6) regardless of other transmitter activity. this feature enables the serial port to alert a terminal in a communications system. bit 7 divisor latch access bit (dlab). it must be set high (logic "1") to access the divisor latches of the baud rate generator during read or write operations. it must be set low (logic "0") to access the receiver buffer register, the transmitter holding register, or the interrupt enable register. modem control register (mcr) address offset = 4h, dlab = x, read/write bit 1 bit 0 word length 0 0 1 1 0 1 0 1 5 bits 6 bits 7 bits 8 bits bit 2 word length number of stop bits 0 -- 1 1 5 bits 1.5 1 6 bits 2 1 7 bits 2 1 8 bits 2
75 this 8 bit register controls the interface with the modem or data set (or device emulating a modem). the contents of the modem control register are described below. bit 0 this bit controls the data terminal ready (ndtr) output. when bit 0 is set to a logic "1", the ndtr output is forced to a logic "0". when bit 0 is a logic "0", the ndtr output is forced to a logic "1". bit 1 this bit controls the request to send (nrts) output. bit 1 affects the nrts output in a manner identical to that described above for bit 0. bit 2 this bit controls the output 1 (out1) bit. this bit does not have an output pin and can only be read or written by the cpu. bit 3 output 2 (out2). this bit is used to enable an uart interrupt. when out2 is a logic "0", the serial port interrupt output is forced to a high impedance state - disabled. when out2 is a logic "1", the serial port interrupt outputs are enabled. bit 4 this bit provides the loopback feature for diagnostic testing of the serial port. when bit 4 is set to logic "1", the following occur: 1. the txd is set to the marking state (logic "1"). 2. the receiver serial input (rxd) is disconnected. 3. the output of the transmitter shift register is "l ooped back" into the receiver shift register input. 4. all modem control inputs (ncts, ndsr, nri and ndcd) are disconnected. 5. the four modem control outputs (ndtr, nrts, out1 and out2) are internally connected to the four modem control inputs (ndsr, ncts, ri, dcd). 6. the modem control output pins are forced inactive high. 7. data that is transmitted is immediately received. this feature allows the processor to verify the transmit and receive data paths of the serial port. in the diagnostic mode, the receiver and the transmitter interrupts are fully operational. the modem control interrupts are also operational but the interrupts' sources are now the lower four bits of the modem control register instead of the modem control inputs. the interrupts are still controlled by the interrupt enable register. bit 5 - 7 these bits are permanently set to logic ?0?. line status register (lsr) address offset = 5h, dlab = x, read/write bit 0 data ready (dr). it is set to a logic "1" whenever a complete incoming character has been received and transferred into the receiver buffer register or the fifo. bit 0 is reset to a logic "0" by reading all of the data in the receive buffer register or the fifo. bit 1 overrun error (oe). bit 1 indicates that data in the receiver buffer register was not read before the next character was transferred into the register, thereby destroying the previous character. in fifo mode, an overrunn error will occur only when the fifo is full and the next character has been completely received in the shift register, the character in the shift register is overwritten but not transferred to the fifo. the oe indicator is set to a logic "1" immediately
76 upon detection of an overrun condition, and reset whenever the line status register is read. bit 2 parity error (pe). bit 2 indicates that the received data character does not have the correct even or odd parity, as selected by the even parity select bit. the pe is set to a logic "1" upon detection of a parity error and is reset to a logic "0" whenever the line status register is read. in the fifo mode this error is associated with the particular character in the fifo it applies to. this error is indicated when the associated character is at the top of the fifo. bit 3 framing error (fe). bit 3 indicates that the received character did not have a valid stop bit. bit 3 is set to a logic "1" whenever the stop bit following the last data bit or parity bit is detected as a zero bit (spacing level). the fe is reset to a logic "0" whenever the line status register is read. in the fifo mode this error is associated with the particular character in the fifo it applies to. this error is indicated when the associated character is at the top of the fifo. the serial port will try to resynchronize after a framing error. to do this, it assumes that the framing error was due to the next start bit, so it samples this 'start' bit twice and then takes in the 'data'. bit 4 break interrupt (bi). bit 4 is set to a logic "1" whenever the received data input is held in the spacing state (logic "0") for longer than a full word transmission time (that is, the total time of the start bit + data bits + parity bits + stop bits). the bi is reset after the cpu reads the contents of the line status register. in the fifo mode this error is associated with the particular character in the fifo it applies to. this error is indicated when the associated character is at the top of the fifo. when break occurs only one zero character is loaded into the fifo. restarting after a break is received, requires the serial data (rxd) to be logic "1" for at least 1/2 bit time. note: bits 1 through 4 are the error conditions that produce a receiver line status interrupt whenever any of the corresponding conditions are detected and the interrupt is enabled. bit 5 transmitter holding register empty (thre). bit 5 indicates that the serial port is ready to accept a new character for transmission. in addition, this bit causes the serial port to issue an interrupt when the transmitter holding register interrupt enable is set high. the thre bit is set to a logic "1" when a character is transferred from the transmitter holding register into the transmitter shift register. the bit is reset to logic "0" whenever the cpu loads the transmitter holding register. in the fifo mode this bit is set when the xmit fifo is empty, it is cleared when at least one byte is written to the xmit fifo. bit 5 is a read- only bit. bit 6 transmitter empty (temt). bit 6 is set to a logic "1" whenever the transmitter holding register (thr) and transmitter shift register (tsr) are both empty. it is reset to logic "0" whenever either the thr or tsr contains a data character. bit 6 is a read only bit. in the fifo mode this bit is set whenever the thr and tsr are both empty. bit 7 this bit is permanently set to logic "0" in the 450 mode. in the fifo mode, this bit is set to a logic "1" when there is at least one parity error, framing error or break indication in the fifo. this bit is cleared when the lsr is read if there are no subsequent errors in the fifo.
77 modem status register (msr) address offset = 6h, dlab = x, read/write this 8 bit register provides the current state of the control lines from the modem (or peripheral device). in addition to this current state information, four bits of the modem status register (msr) provide change information. these bits are set to logic "1" whenever a control input from the modem changes state. they are reset to logic "0" whenever the modem status register is read. bit 0 delta clear to send (dcts). bit 0 indicates that the ncts input to the chip has changed state since the last time the msr was read. bit 1 delta data set ready (ddsr). bit 1 indicates that the ndsr input has changed state since the last time the msr was read. bit 2 trailing edge of ring indicator (teri). bit 2 indicates that the nri input has changed from logic "0" to logic "1". bit 3 delta data carrier detect (ddcd). bit 3 indicates that the ndcd input to the chip has changed state. note: whenever bit 0, 1, 2, or 3 is set to a logic "1", a modem status interrupt is generated. bit 4 this bit is the complement of the clear to send (ncts) input. if bit 4 of the mcr is set to logic "1", this bit is equivalent to nrts in the mcr. bit 5 this bit is the complement of the data set ready (ndsr) input. if bit 4 of the mcr is set to logic "1", this bit is equivalent to dtr in the mcr. bit 6 this bit is the complement of the ring indicator (nri) input. if bit 4 of the mcr is set to logic "1", this bit is equivalent to out1 in the mcr. bit 7 this bit is the complement of the data carrier detect (ndcd) input. if bit 4 of the mcr is set to logic "1", this bit is equivalent to out2 in the mcr. scratchpad register (scr) address offset =7h, dlab =x, read/write this 8 bit read/write register has no effect on the operation of the serial port. it is intended as a scratchpad register to be used by the programmer to hold data temporarily. programmable baud rate generator (and divisor latches dlh, dll) the serial port contains a programmable baud rate generator that is capable of taking any clock input (dc to 3 mhz) and dividing it by any divisor from 1 to 65535. this output frequency of the baud rate generator is 16x the baud rate. two 8 bit latches store the divisor in 16 bit binary format. these divisor latches must be loaded during initialization in order to insure desired operation of the baud rate generator. upon loading either of the divisor latches, a 16 bit baud counter is immediately loaded. this prevents long counts on initial load. if a 0 is loaded into the brg registers the output divides the clock by the number 3. if a 1 is loaded the output is the inverse of the input oscillator. if a two is loaded the output is a divide by 2 signal with a 50% duty cycle. if a 3 or greater is loaded the output is low for 2 bits and high for
78 the remainder of the count. the input clock to the brg is a 1.8462 mhz clock. table 33 shows the baud rates possible with a 1.8462 mhz crystal. effect of the reset on register file the reset function table (table 34) details the effect of the reset input on each of the registers of the serial port. fifo interrupt mode operation when the rcvr fifo and receiver interrupts are enabled (fcr bit 0 = "1", ier bit 0 = "1"), rcvr interrupts occur as follows: a. the receive data available interrupt will be issued when the fifo has reached its programmed trigger level; it is cleared as soon as the fifo drops below its programmed trigger level. b. the iir receive data available indication also occurs when the fifo trigger level is reached. it is cleared when the fifo drops below the trigger level. c. the receiver line status interrupt (iir=06h), has higher priority than the received data available (iir=04h) interrupt. d. the data ready bit (lsr bit 0) is set as soon as a character is transferred from the shift register to the rcvr fifo. it is reset when the fifo is empty. when rcvr fifo and receiver interrupts are enabled, rcvr fifo timeout interrupts occur as follows: a. a fifo timeout interrupt occurs if all the following conditions exist: - at least one character is in the fifo - the most recent serial character received was longer than fo ur continuous character times ago. (if two stop bits are programmed, the second one is included in this time delay.) - the most recent cpu read of the fifo was longer than 4 continuous character times ago. this will cause a maximum character received to interrupt issued delay of 160 msec at 300baud with a 12 bit character. b. character times are calculated by using the rclk input for a clock signal (this makes the delay proportional to the baud rate). c. when a timeout interrupt has occurred it is cleared and the timer reset when the cpu reads one character from the rcvr fifo. d. when a timeout interrupt has not occurred the timeout timer is reset after a new character is received or after the cpu reads the rcvr fifo. when the xmit fifo and transmitter interrupts are enabled (fcr bit 0 = "1", ier bit 1 = "1"), xmit interrupts occur as follows: a. the transmitter holding register interrupt (02h) occurs when the xmit fifo is empty; it is cleared as soon as the transmitter holding register is written to (1 of 16 characters may be written to the xmit fifo while servicing this interrupt) or the iir is read. b. the transmitter fifo empty indications will be delayed 1 character time minus the last stop bit time whenever the following occurs: thre=1 and there have not been at least two bytes at the same time in the transmitter fifo since the last thre=1. the transmitter interrupt after changing fcr0 will be immediate, if it is enabled.
79 character timeout and rcvr fifo trigger level interrupts have the same priority as the current received data available interrupt; xmit fifo empty has the same priority as the current transmitter holding register empty interrupt. fifo polled mode operation with fcr bit 0 = "1" resetting ier bits 0, 1, 2 or 3 or all to ?0? puts the uart in the fifo polled mode of operation. since the rcvr and xmitter are controlled separately, either one or both can be in the polled mode of operation. in this mode, the user's program will check rcvr and xmitter status via the lsr. lsr definitions for the fifo polled mode are as follows: - bit 0=1 as long as there is one byte in the rcvr fifo. - bits 1 to 4 specify which error(s) have occurred. character error status is handled the same way as when in the interrupt mode, the iir is not affected since eir bit 2=0. - bit 5 indicates when the xmit fifo is empty. - bit 6 indicates that both the xmit fifo and shift register are empty. - bit 7 indicates whether there are any errors in the rcvr fifo. there is no trigger level reached or timeout condition indicated in the fifo polled mode, however, the rcvr and xmit fifos are still fully capable of holding characters.
80 table 33 - baud rates using 1.8462 mhz clock for <= 38.4k; using 1.8432 mhz clock for 115.2k ; using 3.6864 mhz clock for 230.4k; using 7.3728 mhz clock for 460.8k desired baud rate divisor used to generate 16x clock percent error difference between desired and actual* crxx: bit 7 or 6 50 2304 0.001 x 75 1536 - x 110 1047 - x 134.5 857 0.004 x 150 768 - x 300 384 - x 600 192 - x 1200 96 - x 1800 64 - x 2000 58 0.005 x 2400 48 - x 3600 32 - x 4800 24 - x 7200 16 - x 9600 12 - x 19200 6 - x 38400 3 0.030 x 57600 2 0.16 x 115200 1 0.16 x 230400 32770 0.16 1 460800 32769 0.16 1 *note: the percentage error for all baud rates, except where indicated otherwise, is 0.2%.
81 table 34 - reset function table register/signal reset control reset state interrupt enable register reset all bits low interrupt identification reg. reset bit 0 is high; bits 1 - 7 low fifo control reset all bits low line control reg. reset all bits low modem control reg. reset all bits low line status reg. reset all bits low except 5, 6 high modem status reg. reset bits 0 - 3 low; bits 4 - 7 input txd1, txd2 reset high intrpt (rcvr errs) reset/read lsr low intrpt (rcvr data ready) reset/read rbr low intrpt (thre) reset/readiir/write thr low out2b reset high rtsb reset high dtrb reset high out1b reset high rcvr fifo reset/ fcr1*fcr0/_fcr0 all bits low xmit fifo reset/ fcr1*fcr0/_fcr0 all bits low
82 table 35 - register summary for an individual uart channel register address* register name register symbol bit 0 bit 1 addr = 0 dlab = 0 receive buffer register (read only) rbr data bit 0 (note 1) data bit 1 addr = 0 dlab = 0 transmitter holding register (write only) thr data bit 0 data bit 1 addr = 1 dlab = 0 interrupt enable register ier enable received data available interrupt (erdai) enable transmitter holding register empty interrupt (ethrei) addr = 2 interrupt ident. register (read only) iir "0" if interrupt pending interrupt id bit addr = 2 fifo control register (write only) fcr fifo enable rcvr fifo reset addr = 3 line control register lcr word length select bit 0 (wls0) word length select bit 1 (wls1) addr = 4 modem control register mcr data terminal ready (dtr) request to send (rts) addr = 5 line status register lsr data ready (dr) overrun error (oe) addr = 6 modem status register msr delta clear to send (dcts) delta data set ready (ddsr) addr = 7 scratch register (note 4) scr bit 0 bit 1 addr = 0 dlab = 1 divisor latch (ls) ddl bit 0 bit 1 addr = 1 dlab = 1 divisor latch (ms) dlm bit 8 bit 9 *dlab is bit 7 of the line control register (addr = 3). note 1: bit 0 is the least significant bit. it is the first bit serially transmitted or received. note 2: when operating in the xt mode, this bit will be set any time that the transmitter shift register is empty.
83 table 35 - register summary for an individual uart channel (continued) bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 data bit 2 data bit 3 data bit 4 data bit 5 data bit 6 data bit 7 data bit 2 data bit 3 data bit 4 data bit 5 data bit 6 data bit 7 enable receiver line status interrupt (elsi) enable modem status interrupt (emsi) 0 0 0 0 interrupt id bit interrupt id bit (note 5) 0 0 fifos enabled (note 5) fifos enabled (note 5) xmit fifo reset dma mode select (note 6) reserved reserved rcvr trigger lsb rcvr trigger msb number of stop bits (stb) parity enable (pen) even parity select (eps) stick parity set break divisor latch access bit (dlab) out1 (note 3) out2 (note 3) loop 0 0 0 parity error (pe) framing error (fe) break interrupt (bi) transmitter holding register (thre) transmitter empty (temt) (note 2) error in rcvr fifo (note 5) trailing edge ring indicator (teri) delta data carrier detect (ddcd) clear to send (cts) data set ready (dsr) ring indicator (ri) data carrier detect (dcd) bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 10 bit 11 bit 12 bit 13 bit 14 bit 15 note 3: this bit no longer has a pin associated with it. note 4: when operating in the xt mode, this register is not available. note 5: these bits are always zero in the non-fifo mode. note 6: writing a one to this bit has no effect. dma modes are not supported in this chip.
84 notes on serial port operation fifo mode operation: general the rcvr fifo will hold up to 16 bytes regardless of which trigger level is selected. tx and rx fifo operation the tx portion of the uart transmits data through txd as soon as the cpu loads a byte into the tx fifo. the uart will prevent loads to the tx fifo if it currently holds 16 characters. loading to the tx fifo will again be enabled as soon as the next character is transferred to the tx shift register. these capabilities account for the largely autonomous operation of the tx. the uart starts the above operations typically with a tx interrupt. the chip issues a tx interrupt whenever the tx fifo is empty and the tx interrupt is enabled, except in the following instance. assume that the tx fifo is empty and the cpu starts to load it. when the first byte enters the fifo the tx fifo empty interrupt will transition from active to inactive. depending on the execution speed of the service routine software, the uart may be able to transfer this byte from the fifo to the shift register before the cpu loads another byte. if this happens, the tx fifo will be empty again and typically the uart's interrupt line would transition to the active state. this could cause a system with an interrupt control unit to record a tx fifo empty condition, even though the cpu is currently servicing that interrupt. therefore, after the first byte has been loaded into the fifo the uart will wait one serial character transmission time before issuing a new tx fifo empty interrupt. this one character tx interrupt delay will remain active until at least two bytes have the tx fifo empties after this condition, the tx been loaded into the fifo, concurrently. when interrupt will be activated without a one character delay. rx support functions and operation are quite different from those described for the transmitter. the rx fifo receives data until the number of bytes in the fifo equals the selected interrupt trigger level. at that time if rx interrupts are enabled, the uart will issue an interrupt to the cpu. the rx fifo will continue to store bytes until it holds 16 of them. it will not accept any more data when it is full. any more data entering the rx shift register will set the overrun error flag. normally, the fifo depth and the programmable trigger levels will give the cpu ample time to empty the rx fifo before an overrun occurs. one side-effect of having a rx fifo is that the selected interrupt trigger level may be above the data level in the fifo. this could occur when data at the end of the block contains fewer bytes than the trigger level. no interrupt would be issued to the cpu and the data would remain in the uart. to prevent the software from having to check for this situation the chip incorporates a timeout interrupt. the timeout interrupt is activated when there is a least one byte in the rx fifo, and neither the cpu nor the rx shift register has accessed the rx fifo within 4 character times of the last byte. the timeout interrupt is cleared or reset when the cpu reads the rx fifo or another character enters it. these fifo-related features allow optimization of cpu/uart transactions and are especially useful given the higer baud rate capability (256 kbaud).
85 infrared interface the infrared interface provides a two-way wireless communications port using infrared as a transmission medium. two ir implementations have been provided for the second uart in this chip (logical device 5), irda and amplitude shift keyed ir. the ir transmission can use the standard uart2 tx and rx pins or optional irtx2 and irrx2 pins. these can be selected through the configuration registers. irda allows serial communication at baud rates up to 115k baud. each word is sent serially beginning with a ?0? value start bit. a ?0? is signaled by sending a single ir pulse at the beginning of the serial bit time. a ?1? is signaled by sending no ir pulse during the bit time. please refer to the ac timing for the parameters of these pulses and the irda waveform. the amplitude shift keyed ir allows serial communication at baud rates up to 19.2k baud. each word is sent serially beginning with a ?0? value start bit. a zero is signaled by sending a 500 khz waveform for the duration of the serial bit time. a ?1? is signaled by sending no transmission the bit time. please refer to the ac timing for the parameters of the ask-ir waveform. if the half duplex option is chosen, there is a time-out when the direction of the transmission is changed. this time-out starts at the last bit transferred during a transmission and blocks the receiver input until the timeout expires. if the transmit buffer is loaded with more data before the time-out expires, the timer is restarted after the new byte is transmitted. if data is loaded into the transmit buffer while a character is being received, the transmission will not start until the time-out expires after the last receive bit has been received. if the start bit of another character is received during this time-out, the timer is restarted after the new character is received. the ir half duplex time-out is programmable via crf2 in logical device 5. this register allows the time-out to be programmed to any value between 0 and 10msec in 100usec increments.
86 parallel port the FDC37C93XAPM incorporates an ibm xt/at compatible parallel port. this supports the optional ps/2 type bi-directional parallel port (spp), the enhanced parallel port (epp) and the extended capabilities port (ecp) parallel port modes. refer to the configuration registers for information on disabling, power down, changing the base address of the parallel port, and selecting the mode of operation. the FDC37C93XAPM also provides a mode for support of the floppy disk controller on the parallel port. the parallel port also incorporates smsc's chiprotect circuitry, which prevents possible damage to the parallel port due to printer power- up. the functionality of the parallel port is achieved through the use of eight addressable ports, with their associated registers and control gating. the control and data port are read/write by the cpu, the status port is read/write in the epp mode. the address map of the parallel port is shown below: data port base address + 00h status port base address + 01h control port base address + 02h epp addr port base address + 03h epp data port 0 base address + 04h epp data port 1 base address + 05h epp data port 2 base address + 06h epp data port 3 base address + 07h the bit map of these registers is: d0 d1 d2 d3 d4 d5 d6 d7 note data port pd0 pd1 pd2 pd3 pd4 pd5 pd6 pd7 1 status port tmout 0 0 nerr slct pe nack nbusy 1 control port strobe autofd ninit slc irqe pcd 0 0 1 epp addr port pd0 pd1 pd2 pd3 pd4 pd5 pd6 ad7 2,3 epp data port 0 pd0 pd1 pd2 pd3 pd4 pd5 pd6 pd7 2,3 epp data port 1 pd0 pd1 pd2 pd3 pd4 pd5 pd6 pd7 2,3 epp data port 2 pd0 pd1 pd2 pd3 pd4 pd5 pd6 pd7 2,3 epp data port 3 pd0 pd1 pd2 pd3 pd4 pd5 pd6 pd7 2,3 note 1: these registers are available in all modes. note 2: these registers are only available in epp mode. note 3 : for epp mode, iochrdy must be connected to the isa bus.
87 table 36 - parallel port connector host connector pin number standard epp ecp 1 nstrobe nwrite nstrobe 2-9 pdata<0:7> pdata<0:7> pdata<0:7> 10 nack intr nack 11 busy nwait busy, periphack(3) 12 pe (nu) perror, nackreverse(3) 13 select (nu) select 14 nautofd ndatastb nautofd, hostack(3) 15 nerror (nu) nfault(1) nperiphrequest(3) 16 ninit (nu) ninit(1) nreverserqst(3) 17 nselectin naddrstrb nselectin(1,3) (1) = compatible mode (3) = high speed mode note: for the cable interconnection required for ecp support and the slave connector pin numbers, refer to the ieee 1284 extended capabilities port protocol and isa standard , rev. 1.14, july 14, 1993. this document is available from microsoft.
88 ibm xt/at compatible, bi- directional and epp modes data port address offset = 00h the data port is located at an offset of '00h' from the base address. the data register is cleared at initialization by reset. during a write operation, the data register latches the contents of the data bus with the rising edge of the niow input. the contents of this register are buffered (non inverting) and output onto the pd0 -pd7 ports. during a read operation in spp mode, pd0 -pd7 ports are buffered (not latched) and output to the host cpu. status port address offset = 01h the status port is located at an offset of '01h' from the base address. the contents of this register are latched for the duration of an nior read cycle. the bits of the status port are defined as follows: bit 0 tmout - time out this bit is valid in epp mode only and indicates that a 10 m sec time out has occured on the epp bus. a logic ?0? means that no time out error has occured; a logic ?1? means that a time out error has been detected. this bit is cleared by a reset. writing a ?1? to this bit clears the time out status bit. on a write, this bit is self clearing and does not require a write of a ?0?. writing a ?0? to this bit has no effect. bit 1 and 2 - are not implemented as register bits, during a read of the printer status register these bits are a low level. bit 3 nerr - nerror the level on the nerror input is read by the cpu as bit 3 of the printer status register. a logic ?0? means an error has been detected; a logic ?1? means no error has been detected. bit 4 slct - printer selected status the level on the slct input is read by the cpu as bit 4 of the printer status register. a logic ?1? means the printer is on line; a logic ?0? means it is not selected. bit 5 pe - paper end the level on the pe input is read by the cpu as bit 5 of the printer status register. a logic ?1? indicates a paper end; a logic ?0? indicates the presence of paper. bit 6 nack - nacknowledge the level on the nack input is read by the cpu as bit 6 of the printer status register. a logic ?0? means that the printer has received a character and can now accept another. a logic ?1? means that it is still processing the last character or has not received the data. bit 7 nbusy - nbusy the complement of the level on the busy input is read by the cpu as bit 7 of the printer status register. a logic ?0? in this bit means that the printer is busy and cannot accept a new character. a logic ?1? means that it is ready to accept the next character. control port address offset = 02h the control port is located at an offset of '02h' from the base address. the control register is initialized by the reset input, bits 0 to 5 only being affected; bits 6 and 7 are hard wired low.
89 bit 0 strobe - strobe this bit is inverted and output onto the nstrobe output. bit 1 autofd - autofeed this bit is inverted and output onto the nautofd output. a logic 1 causes the printer to generate a line feed after each line is printed. a logic ?0? means no autofeed. bit 2 ninit - ninitiate output this bit is output onto the ninit output without inversion. bit 3 slctin - printer select input this bit is inverted and output onto the nslctin output. a logic 1 on this bit selects the printer; a logic 0 means the printer is not selected. bit 4 irqe - interrupt request enable the interrupt request enable bit when set to a high level may be used to enable interrupt requests from the parallel port to the cpu. an interrupt request is generated on the irq port by a positive going nack input. when the irqe bit is programmed low the irq is disabled. bit 5 pcd - parallel control direction parallel control direction is not valid in printer mode. in printer mode, the direction is always out regardless of the state of this bit. in bi- directional, epp or ecp mode, a logic ?0? means that the printer port is in output mode (write); a logic 1 means that the printer port is in input mode (read). bits 6 and 7 during a read are a low level, and cannot be written. epp address port address offset = 03h the epp address port is located at an offset of '03h' from the base address. the address register is cleared at initialization by reset. during a write operation, the contents of db0- db7 are buffered (non inverting) and output onto the pd0 -pd7 ports, the leading edge of niow causes an epp address write cycle to be performed, the trailing edge of iow latches the data for the duration of the epp write cycle. during a read operation, pd0 -pd7 ports are read, the leading edge of ior causes an epp address read cycle to be performed and the data output to the host cpu, the deassertion of addrstb latches the pdata for the duration of the ior cycle. this register is only available in epp mode. epp data port 0 address offset = 04h the epp data port 0 is located at an offset of '04h' from the base address. the data register is cleared at initialization by reset. during a write operation, the contents of db0-db7 are buffered (non-inverting) and output onto the pd0 - pd7 ports, the leading edge of niow causes an epp data write cycle to be performed, the trailing edge of iow latches the data for the duration of the epp write cycle. during a read operation, pd0 -pd7 ports are read, the leading edge of ior causes an epp read cycle to be performed and the data output to the host cpu, the deassertion of datastb latches the pdata for the duration of the ior cycle. this register is only available in epp mode.
90 epp data port 1 address offset = 05h the epp data port 1 is located at an offset of '05h' from the base address. refer to epp data port 0 for a description of operation. this register is only available in epp mode. epp data port 2 address offset = 06h the epp data port 2 is located at an offset of '06h' from the base address. refer to epp data port 0 for a description of operation. this register is only available in epp mode. epp data port 3 address offset = 07h the epp data port 3 is located at an offset of '07h' from the base address. refer to epp data port 0 for a description of operation. this register is only available in epp mode. epp 1.9 operation when the epp mode is selected in the configuration register, the standard and bi- directional modes are also available. if no epp read, write or address cycle is currently executing, then the pdx bus is in the standard or bi-directional mode, and all output signals (strobe, autofd, init) are as set by the spp control port and direction is controlled by pcd of the control port. in epp mode, the system timing is closely coupled to the epp timing. for this reason, a watchdog timer is required to prevent system lockup. the timer indicates if more than 10 m sec have elapsed from the start of the epp cycle (nior or niow asserted) to nwait being deasserted (after command). if a time-out occurs, the current epp cycle is aborted and the time-out condition is indicated in status bit 0. during an epp cycle, if strobe is active, it overrides the epp write signal forcing the pdx bus to always be in a write mode and the nwrite signal to always be asserted. software constraints before an epp cycle is executed, the software must ensure that the control register bit pcd is a logic "0" (ie a 04h or 05h should be written to the control port). if the user leaves pcd as a logic "1", and attempts to perform an epp write, the chip is unable to perform the write (because pcd is a logic "1") and will appear to perform an epp read on the parallel bus; no error is indicated. epp 1.9 write the timing for a write operation (address or data) is shown in timing diagram epp write data or address cycle. iochrdy is driven active low at the start of each epp write and is released when it has been determined that the write cycle can complete. the write cycle can complete under the following circumstances: 1. if the epp bus is not ready (nwait is active low) when ndatastb or naddrstb goes active then the write can complete when nwait goes inactive high. 2. if the epp bus is ready (nwait is inactive high) then the chip must wait for it to go active low before changing the state of ndatastb, nwrite or naddrstb. the write can complete once nwait is determined inactive.
91 write sequence of operation 1. the host selects an epp register, places data on the sdata bus and drives niow active. 2. the chip drives iochrdy inactive (low). 3. if wait is not asserted, the chip must wait until wait is asserted. 4. the chip places address or data on pdata bus, clears pdir, and asserts nwrite. 5. chip asserts ndatastb or naddrstrb indicating that pdata bus contains valid information, and the write signal is valid. 6. peripheral deasserts nwait, in dicating that any setup requirements have been satisfied and the chip may begin the termination phase of the cycle. 7. a) the chip deasserts ndatastb or naddrstrb, this marks the beginning of the termination phase. if it has not already done so, the peripheral should latch the information byte now. b) the chip latches the data from the sdata bus for the pdata bus and asserts (releases) iochrdy allowing the host to complete the write cycle. 8. peripheral asserts nwait, indicating to the host that any hold time requirements have been satisfied and acknowledging the termination of the cycle. 9. chip may modify nwrite and npdata in preparation for the next cycle. epp 1.9 read the timing for a read operation (data) is shown in timing diagram epp read data cycle. iochrdy is driven active low at the start of each epp read and is released when it has been determined that the read cycle can complete. the read cycle can complete under the following circumstances: 1. if the epp bus is not ready (nwait is active low) when ndatastb goes active then the read can complete when nwait goes inactive high. 2. if the epp bus is ready (nwait is inactive high) then the chip must wait for it to go active low before changing the state of write or before ndatastb goes active. the read can complete once nwait is determined inactive. read sequence of operation 1. the host selects an epp register and drives nior active. 2. the chip drives iochrdy inactive (low). 3. if wait is not asserted, the chip must wait until wait is asserted. 4. the chip tri-states the pdata bus and deasserts nwrite. 5. chip asserts ndatastb or naddrstrb indicating that pdata bus is tri-stated, pdir is set and the nwrite signal is valid. 6. peripheral drives pdata bus valid. 7. peripheral deasserts nwa it, indicating that pdata is valid and the chip may begin the termination phase of the cycle. 8. a) the chip latches the data from the pdata bus for the sdata bus and deasserts ndatastb or naddrstrb. this marks the beginning of the termination phase. b) the chip drives the valid data onto the sdata bus and asserts (releases) iochrdy allowing the host to complete the read cycle. 9. peripheral tri-states the pdata bus and asserts nwait, indicating to the host that the pdata bus is tri-stated. 10. chip may modify nwrite, pdir and npdata in preparation for the next cycle.
92 epp 1.7 operation when the epp 1.7 mode is selected in the configuration register, the standard and bi- directional modes are also available. if no epp read, write or address cycle is currently executing, then the pdx bus is in the standard or bi-directional mode, and all output signals (strobe, autofd, init) are as set by the spp control port and direction is controlled by pcd of the control port. in epp mode, the system timing is closely coupled to the epp timing. for this reason, a watchdog timer is required to prevent system lockup. the timer indicates if more than 10 m sec have elapsed from the start of the epp cycle (nior or niow asserted) to the end of the cycle nior or niow deasserted). if a time-out occurs, the current epp cycle is aborted and the time-out condition is indicated in status bit 0. software constraints before an epp cycle is executed, the software must ensure that the control register bits d0, d1 and d3 are set to zero. also, bit d5 (pcd) is a logic "0" for an epp write or a logic "1" for and epp read. epp 1.7 write the timing for a write operation (address or data) is shown in timing diagram epp 1.7 write data or address cycle. iochrdy is driven active low when nwait is active low during the epp cycle. this can be used to extend the cycle time. the write cycle can complete when nwait is inactive high. write sequence of operation 1. the host sets pdir bit in the control register to a logic "0". this asserts nwrite. 2. the host selects an epp register, places data on the sdata bus and drives niow active. 3. the chip places address or data on pdata bus. 4. chip asserts ndatastb or naddrstrb indicating that pdata bus contains valid information, and the write signal is valid. 5. if nwait is asserted, iochrdy is deasserted until the peripheral deasserts nwait or a time-out occurs. 6. when the host deasserts niow the chip deasserts ndatastb or naddrstrb and latches the data from the sdata bus for the pdata bus. 7. chip may modify nwrite, pdir and npdata in preparation of the next cycle. epp 1.7 read the timing for a read operation (data) is shown in timing diagram epp 1.7 read data cycle. iochrdy is driven active low when nwait is active low during the epp cycle. this can be used to extend the cycle time. the read cycle can complete when nwait is inactive high. read sequence of operation 1 . the host sets pdir bit in the control register to a logic "1". this deasserts nwrite and tri-states the pdata bus. 2 . the host selects an epp register and drives nior active. 3 . chip asserts ndatastb or naddrstrb indicating that pdata bus is tri-stated, pdir is set and the nwrite signal is valid. 4 . if nwait is asserted, iochrdy is deasserted until the peripheral deasserts nwait or a time-out occurs. 5 . the peripheral drives pdata bus valid.
93 6 . the peripheral deasserts nwait, indicating that pdata is valid and the chip may begin the termination phase of the cycle. 7 . when the host deasserts nior the chip deasserts ndatastb or naddrstrb. 8 . peripheral tri-states the pdata bus. 9 . chip may modify nwrite, pdir and npdata in preparation of the next cycle.
94 table 37 - epp pin descriptions epp signal epp name type epp description nwrite nwrite o this signal is active low. it denotes a write operation. pd<0:7> address/data i/o bi-directional epp byte wide address and data bus. intr interrupt i this signal is active high and positive edge triggered. (pass through with no inversion, same as spp.) wait nwait i this signal is active low. it is driven inactive as a positive acknowledgement from the device that the transfer of data is completed. it is driven active as an indication that the device is ready for the next transfer. datastb ndata strobe o this signal is active low. it is used to denote data read or write operation. reset nreset o this signal is active low. when driven active, the epp device is reset to its initial operational mode. addrstb naddress strobe o this signal is active low. it is used to denote address read or write operation. pe paper end i same as spp mode. slct printer selected status i same as spp mode. nerr error i same as spp mode. pdir parallel port direction o this output shows the direction of the data transfer on the parallel port bus. a low means an output/write condition and a high means an input/read condition. this signal is normally a low (output/write) unless pcd of the control register is set or if an epp read cycle is in progress. note 1: spp and epp can use one common register. note 2: nwrite is the only epp output that can be over-ridden by spp control port during an epp cycle. for correct epp read cycles, pcd is required to be a low.
95 extended capabilities parallel port ecp provides a number of advantages, some of which are listed below. the individual features are explained in greater detail in the remainder of this section. high performance half -duplex forward and reverse channel interlocked handshake, for fast reliable transfer optional single byte rle compression for improved throughput (64:1) channel addressing for low -cost peripherals maintains link and data layer separation permits the use of active output drivers permits the use of adaptive signal timing peer -to -peer capability vocabulary the following terms are used in this document: assert: when a signal asserts it transitions to a "true" state, when a signal deasserts it transitions to a "false" state. forward: host to peripheral communication. reverse: peripheral to host communication pword: a port word; equal in size to the width of the isa interface. for this implementation, pword is always 8 bits. 1 a high level. 0 a low level. these terms may be considered synonymous: periphclk, nack hostack, nautofd periphack, busy nperiphrequest, nfault nreverserequest, ninit nackreverse, perror xflag, select ecpmode, nselectln hostclk, nstrobe reference document: ieee 1284 extended capabilities port protocol and isa interface standard , rev 1.14, july 14, 1993. this document is available from microsoft. the bit map of the extended parallel port registers is shown in the table on the following page.
96 d7 d6 d5 d4 d3 d2 d1 d0 note data pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 ecpafifo addr/rle address or rle field 2 dsr nbusy nack perror select nfault 0 0 0 1 dcr 0 0 direction ackinten selectin ninit autofd strobe 1 cfifo parallel port data fifo 2 ecpdfifo ecp data fifo 2 tfifo test fifo 2 cnfga 0 0 0 1 0 0 0 0 cnfgb compress intrvalue parallel port irq parallel port dma ecr mode nerrintren dmaen serviceintr full empty note 1: these registers are available in all modes. note 2: all fifos use one common 16 byte fifo. note 3: the ecp parallel port config reg b reflects the irq and drq selected by the configuration registers. isa implementation standard this specification describes the standard isa interface to the extended capabilities port (ecp). all isa devices supporting ecp must meet the requirements contained in this section or the port will not be supported by microsoft. for a description of the ecp protocol, please refer to the ieee 1284 extended capabilities port protocol and isa interface standard , rev. 1.14, july 14, 1993. this document is available from microsoft. description the port is software and hardware compatible with existing parallel ports so that it may be used as a standard lpt port if ecp is not required. the port is designed to be simple and requires a small number of gates to implement. it does not do any "protocol" negotiation, rather it provides an automatic high burst -bandwidth channel that supports dma for ecp in both the forward and reverse directions. small fifos are employed in both forward and reverse directions to smooth data flow and improve the maximum bandwidth requirement. the size of the fifo is 16 bytes deep. the port supports an automatic handshake for the standard parallel port to improve compatibility mode transfer speed. the port also supports run length encoded (rle) decompression (required) in hardware. compression is accomplished by counting identical bytes and transmitting an rle byte that indicates how many times the next byte is to be repeated. decompression simply intercepts the rle byte and repeats the following byte the specified number of times. hardware support for compression is optional.
97 table 38 - ecp pin descriptions name type description nstrobe o during write operations nstrobe registers data or address into the slave on the asserting edge (handshakes with busy). pdata 7:0 i/o contains address or data or rle data. nack i indicates valid data driven by the peripheral when asserted. this signal handshakes with nautofd in reverse. periphack (busy) i this signal deasserts to indicate that the peripheral can accept data. this signal handshakes with nstrobe in the forward direction. in the reverse direction this signal indicates whether the data lines contain ecp command information or data. the peripheral uses this signal to flow control in the forward direction. it is an "interlocked" handshake with nstrobe. periphack also provides command information in the reverse direction. perror (nackreverse) i used to acknowledge a change in the direction the transfer (asserted = forward). the peripheral drives this signal low to acknowledge nreverserequest. it is an "interlocked" handshake with nreverserequest. the host relies upon nackreverse to determine when it is permitted to drive the data bus. select i indicates printer on line. nautofd (hostack) o requests a byte of data from the peripheral when asserted, handshaking with nack in the reverse direction. in the forward direction this signal indicates whether the data lines contain ecp address or data. the host drives this signal to flow control in the reverse direction. it is an "interlocked" handshake with nack. hostack also provides command information in the forward phase. nfault (nperiphrequest) i generates an error interrupt when asserted. this signal provides a mechanism for peer -to -peer communication. this signal is valid only in the forward direction. during ecp mode the peripheral is permitted (but not required) to drive this pin low to request a reverse transfer. the request is merely a "hint" to the host; the host has ultimate control over the transfer direction. this signal would be typically used to generate an interrupt to the host cpu. ninit o sets the transfer direction (asserted = reverse, deasserted = forward). this pin is driven low to place the channel in the reverse direction. the peripheral is only allowed to drive the bi -directional data bus while in ecp mode and hostack is low and nselectin is high. nselectin o always deasserted in ecp mode.
98 register definitions the register definitions are based on the standard ibm addresses for lpt. all of the standard printer ports are supported. the additional registers attach to an upper bit decode of the standard lpt port definition to avoid conflict with standard isa devices. the port is equivalent to a generic parallel port interface and may be operated in that mode. the port registers vary depending on the mode field in the ecr. the table below lists these dependencies. operation of the devices in modes other that those specified is undefined. table 39 - ecp register definitions name address (note 1) ecp modes function data +000h r/w 000-001 data register ecpafifo +000h r/w 011 ecp fifo (address) dsr +001h r/w all status register dcr +002h r/w all control register cfifo +400h r/w 010 parallel port data fifo ecpdfifo +400h r/w 011 ecp fifo (data) tfifo +400h r/w 110 test fifo cnfga +400h r 111 configuration register a cnfgb +401h r/w 111 configuration register b ecr +402h r/w all extended control register note 1: these addresses are added to the parallel port base address as selected by configuration register or jumpers. note 2: all addresses are qualified with aen. refer to the aen pin definition. table 40 - mode descriptions mode description* 000 spp mode 001 ps/2 parallel port mde 010 parallel port data fifo mode 011 ecp parallel port mode 100 epp mode (if this option is enabled in the configuration registers) 101 (reserved) 110 test mode 111 configuration mode *refer to ecr register description
99 data and ecpafifo port address offset = 00h modes 000 and 001 (data port) the data port is located at an offset of '00h' from the base address. the data register is cleared at initialization by reset. during a write operation, the data register latches the contents of the data bus on the rising edge of the niow input. the contents of this register are buffered (non inverting) and output onto the pd0 -pd7 ports. during a read operation, pd0 -pd7 ports are read and output to the hos t cpu. mode 011 (ecp fifo - address/rle) a data byte written to this address is placed in the fifo and tagged as an ecp address/rle. the hardware at the ecp port transmits this byte to the peripheral automatically. the operation of this register is ony defined for the forward direction (direction is 0). refer to the ecp parallel port forward timing diagram, located in the timing diagrams section of this data sheet. device status register (dsr) address offset = 01h the status port is located at an offset of '01h' from the base address. bits 0 -2 are not implemented as register bits, during a read of the printer status register these bits are a low level. the bits of the status port are defined as follows: bit 3 nfault the level on the nfault input is read by the cpu as bit 3 of the device status register. bit 4 select the level on the select input is read by the cpu as bit 4 of the device status register. bit 5 perror the level on the perror input is read by the cpu as bit 5 of the device status register. printer status register. bit 6 nack the level on the nack input is read by the cpu as bit 6 of the device status register. bit 7 nbusy the complement of the level on the busy input is read by the cpu as bit 7 of the device status register. device control register (dcr) address offset = 02h the control register is located at an offset of '02h' from the base address. the control register is initialized to zero by the reset input, bits 0 to 5 only being affected; bits 6 and 7 are hard wired low. bit 0 strobe - strobe this bit is inverted and output onto the nstrobe output. bit 1 autofd - autofeed this bit is inverted and output onto the nautofd output. a logic 1 causes the printer to generate a line feed after each line is printed. a logic 0 means no autofeed. bit 2 ninit - ninitiate output this bit is output onto the ninit output without inversion. bit 3 selectin this bit is inverted and output onto the nslctin output. a logic 1 on this bit selects the printer; a logic 0 means the printer is not selected.
100 bit 4 ackinten - interrupt request enable the interrupt request enable bit when set to a high level may be used to enable interrupt requests from the parallel port to the cpu due to a low to high transition on the nack input. refer to the description of the interrupt under operation, interrupts. bit 5 direction if mode=000 or mode=010, this bit has no effect and the direction is always out regardless of the state of this bit. in all other modes, direction is valid and a logic 0 means that the printer port is in output mode (write); a logic 1 means that the printer port is in input mode (read). bits 6 and 7 during a read are a low level, and cannot be written. cfifo (parallel port data fifo) address offset = 400h mode = 010 bytes written or dmaed from the system to this fifo are transmitted by a hardware handshake to the peripheral using the standard parallel port protocol. transfers to the fifo are byte aligned. this mode is only defined for the forward direction. ecpdfifo (ecp data fifo) address offset = 400h mode = 011 bytes written or dmaed from the system to this fifo, when the direction bit is 0, are transmitted by a hardware handshake to the peripheral using the ecp parallel port protocol. transfers to the fifo are byte aligned. data bytes from the peripheral are read under automatic hardware handshake from ecp into this fifo when the direction bit is 1. reads or dmas from the fifo will return bytes of ecp data to the system. tfifo (test fifo mode) address offset = 400h mode = 110 data bytes may be read, written or dmaed to or from the system to this fifo in any direction. data in the tfifo will not be transmitted to the parallel port lines using a hardware protocol handshake. however, data in the tfifo may be displayed on the parallel port data lines. the tfifo will not stall when overwritten or underrun. if an attempt is made to write data to a full tfifo, the new data is not accepted into the tfifo. if an attempt is made to read data from an empty tfifo, the last data byte is re- read again. the full and empty bits must always keep track of the correct fifo state. the tfifo will transfer data at the maximum isa rate so that software may generate performance metrics. the fifo size and interrupt threshold can be determined by writing bytes to the fifo and checking the full and serviceintr bits. the writeintrthreshold can be determined by starting with a full tfifo, setting the direction bit to 0 and emptying it a byte at a time until serviceintr is set. this may generate a spurious interrupt, but will indicate that the threshold has been reached. the readintrthreshold can be determined by setting the direction bit to 1 and filling the empty tfifo a byte at a time until serviceintr is set. this may generate a spurious interrupt, but will indicate that the threshold has been reached.
101 data bytes are always read from the head of tfifo regardless of the value of the direction bit. for example if 44h, 33h, 22h are written to the fifo, then reading the tfifo will return 44h, 33h, 22h in the same order as was written. cnfga (configuration register a) address offset = 400h mode = 111 this register is a read-only register. when read, 10h is returned. this indicates to the system that this is an 8-bit implementation. (pword = 1 byte) cnfgb (configuration register b) address offset = 401h mode = 111 bit 7 compress this bit is read only. during a read it is a low level. this means that this chip does not support hardware rle compression. it does support hardware de-compression! bit 6 intrvalue returns the value on the isa irq line to determine possible conflicts. bits 3 - 0 parallel port irq refer to table 41b. bits 2 - 0 parallel port dma refer to table 41c. ecr (extended control register) address offset = 402h mode = all this register controls the extended ecp parallel port functions. bits 7 - 5 these bits are read/write and select the mode. bit 4 nerrintren read/write (valid only in ecp mode) 1: disables the interrupt generated on the asserting edge of nfault. 0: enables an interrupt pulse on the high to low edge of nfault. note that an interrupt will be generated if nfault is asserted (interrupting) and this bit is written from a ?1? to a ?0?. this prevents interrupts from being lost in the time between the read of the ecr and the write of the ecr. bit 3 dmaen read/write 1: enables dma (dma starts when serviceintr is 0). 0: disables dma unconditionally. bit 2 serviceintr read/write 1: disables dma and all of the service interrupts. 0: enables one of the following three cases of interrupts. once one of the three service interrupts has occurred serviceintr bit shall be set to a ?1? by hardware. it must be reset to ?0? to re-enable the interrupts. writing this bit to a ?1? will not cause an interrupt. case dmaen=1: during dma (this bit is set to a ?1? when terminal count is reached). case dmaen=0 direction=0: this bit shall be set to 1 whenever there are writeintrthreshold or more bytes free in the fifo. case dmaen=0 direction=1: this bit shall be set to 1 whenever there are readintrthreshold or more valid bytes to be read from the fifo.
102 bit 1 full read only 1: the fifo cannot accept another byte or the fifo is completely full. 0: the fifo has at least one free byte. bit 0 empty read only 1: the fifo is completely empty. 0: the fifo contains at least one byte of data.
103 table 41a - extended control register r/w mode 000: standard parallel port mode. in this mode the fifo is reset and common collector drivers are used on the control lines (nstrobe, nautofd, ninit and nselectin). setting the direction bit will not tri -state the output drivers in this mode. 001: ps/2 parallel port mode. same as above except that direction may be used to tri -state the data lines and reading the data register returns the value on the data lines and not the value in the data register. all drivers have active pull -ups (push -pull). 010: parallel port fifo mode. this is the same as 000 except that bytes are written or dmaed to the fifo. fifo data is automatically transmitted using the standard parallel port protocol. note that this mode is only useful when direction is 0. all drivers have active pull -ups (push -pull). 011: ecp parallel port mode. in the forward direction (direction is 0) bytes placed into the ecpdfifo and bytes written to the ecpafifo are placed in a single fifo and transmitted automatically to the peripheral using ecp protocol. in the reverse direction (direction is 1) bytes are moved from the ecp parallel port and packed into bytes in the ecpdfifo. all drivers have active pull -ups (push -pull). 100: selects epp mode: in this mode, epp is selected if the epp supported option is selected in configuration register l3-crf0. all drivers have active pull -ups (push -pu ll). 101: reserved 110: test mode. in this mode the fifo may be written and read, but the data will not be transmitted on the parallel port. all drivers have active pull -ups (push -pull). 111: configuration mode. in this mode the confga, confgb registers are accessible at 0x400 and 0x401. all drivers have active pull -ups (push -pull). table 41b table 41c irq selected config reg b bits 5:3 dma selected config reg b bits 2:0 15 110 3 011 14 101 2 010 11 100 1 001 10 011 all others 000 9 010 7 001 5 111 all others 000
104 operation mode switching/software control software will execute p1284 negotiation and all operation prior to a data transfer phase under programmed i/o control (mode 000 or 001). hardware provides an automatic control line handshake, moving data between the fifo and the ecp port only in the data transfer phase (modes 011 or 010). setting the mode to 011 or 010 will cause the hardware to initiate data transfer. if the port is in mode 000 or 001 it may switch to any other mode. if the port is not in mode 000 or 001 it can only be switched into mode 000 or 001. the direction can only be changed in mode 001. once in an extended forward mode the software should wait for the fifo to be empty before switching back to mode 000 or 001. in this case all control signals will be deasserted before the mode switch. in an ecp reverse mode the software waits for all the data to be read from the fifo before changing back to mode 000 or 001. since the automatic hardware ecp reverse handshake only cares about the state of the fifo it may have acquired extra data which will be discarded. it may in fact be in the middle of a transfer when the mode is changed back to 000 or 001. in this case the port will deassert nautofd independent of the state of the transfer. the design shall not cause glitches on the handshake signals if the software meets the constraints above. ecp operation prior to ecp operation the host must negotiate on the parallel port to determine if the peripheral supports the ecp protocol. this is a somewhat complex negotiation carried out under program control in mode 000. after negotiation, it is necessary to initialize some of the port bits. the following are required: set direction = 0, enabling the drivers. set strobe = 0, causing the nstrobe signal to default to the deasserted state. set autofd = 0, causing the nautofd signal to default to the deasserted state. set mode = 011 (ecp mode) ecp address/rle bytes or data bytes may be sent automatically by writing the ecpafifo or ecpdfifo respectively. note that all fifo data transfers are byte wide and byte aligned. address/rle transfers are byte -wide and only allowed in the forward direction. the host may switch directions by first switching to mode = 001, negotiating for the forward or reverse channel, setting direction to 1 or 0, then setting mode = 011. when direction is 1 the hardware shall handshake for each ecp read data byte and attempt to fill the fifo. bytes may then be read from the ecpdfifo as long as it is not empty. ecp transfers may also be accomplished (albeit slowly) by handshaking individual bytes under program control in mode = 001, or 000. termination from ecp mode termination from ecp mode is similar to the termination from nibble/byte modes. the host is permitted to terminate from ecp mode only in specific well -defined states. the termination can only be executed while the bus is in the forward direction. to terminate while the channel is in the reverse direction, it must first be transitioned into the forward direction.
105 command/data ecp mode supports two advanced features to improve the effectiveness of the protocol for some applications. the features are implemented by allowing the transfer of normal 8 -bit data or 8 -bit commands. when in the forward direction, normal data is transferred when hostack is high and an 8 -bit command is transferred when hostack is low. the most significant bit of the command indicates whether it is a run -length cou nt (for compression) or a channel address. when in the reverse direction, normal data is transferred when periphack is high and an 8 -bit command is transferred when periphack is low. the most significant bit of the command is always zero. reverse channel addresses are seldom used and may not be supported in hardware. table 42 forward channel commands (hostack low) reverse channel commands (peripack low) d7 d[6:0] 0 run -length count (0 -127) (mode 0011 0x00 only) 1 channel address (0 -127) data compression the ecp port supports run length encoded (rle) decompression in hardware and can transfer compressed data to a peripheral. run length encoded (rle) compression in hardware is not supported. to transfer compressed data in ecp mode, the compression count is written to the ecpafifo and the data byte is written to the ecpdfifo. compression is accomplished by counting identical bytes and transmitting an rle byte that indicates how many times the next byte is to be repeated. decompression simply intercepts the rle byte and repeats the following byte the specified number of times. when a run -length count is received from a peripheral, the subsequent data byte is replicated the specified number of times. a run -length count of zero specifies that only one byte of data is represented by the next data byte, whereas a run -length count of 127 indicates that the next byte should be expanded to 128 bytes. to prevent data expansion, however, run -length counts of zero should be avoided. pin definition the drivers for nstrobe, nautofd, ninit and nselectin are open-collector in mode 000 and are push-pull in all other modes. isa connections the interface can never stall causing the host to hang. the width of data transfers is strictly controlled on an i/o address basis per this specification. all fifo -dma transfers are byte wide, byte aligned and end on a byte boundary. (the pword value can be obtained by reading configuration register a, cnfga, described in the next section.) single byte wide transfers are always possible with standard or ps/2 mode using program control of the control signals.
106 interrupts the interrupts are enabled by serviceintr in the ecr register. serviceintr = 1 disables the dma and all of the service interrupts. serviceintr = 0 enables the selected interrupt condition. if the interrupting condition is valid, then the interrupt is generated immediately when this bit is changed from a 1 to a 0. this can occur during programmed i/o if the number of bytes removed or added from/to the fifo does not cross the threshold. the interrupt generated is isa friendly in that it must pulse the interrupt line low, allowing for interrupt sharing. after a brief pulse low following the interrupt event, the interrupt line is tri -stated so that other interrupts may assert. an interrupt is generated when: 1 . for dma transfers: when serviceintr is 0, dmaen is 1 and the dma tc is received. 2 . for programmed i/o: a . when serviceintr is 0, dmaen is 0, direction is 0 and there are writeintrthreshold or more free bytes in the fifo. also, an interrupt is generated when serviceintr is cleared to 0 whenever there are writeintrthreshold or more free bytes in the fifo. b . ( 1 ) when serviceintr is 0, dmaen is 0, direction is 1 and there are readintrthreshold or more bytes in the fifo. also, an interrupt is generated when serviceintr is cleared to 0 whenever there are readintrthreshold or more bytes in the fifo. 3 . when nerrintren is 0 and nfault transitions from high to low or when nerrintren is set from 1 to 0 and nfault is asserted. 4 . when ackinten is 1 and the nack signal transitions from a low to a high. fifo operation the fifo threshold is set in the chip configuration registers. all data transfers to or from the parallel port can proceed in dma or programmed i/o (non-dma) mode as indicated by the selected mode. the fifo is used by selecting the parallel port fifo mode or ecp parallel port mode. (fifo test mode will be addressed separately.) after a reset, the fifo is disabled. each data byte is transferred by a programmed i/o cycle or pdrq depending on the selection of dma or programmed i/o mode. the following paragraphs detail the operation of the fifo flow control. in these descriptions, ranges from 1 to 16. the parameter fifothr, which the user programs, is one less and ranges from 0 to 15. a low threshold value (i.e. 2) results in longer periods of time between service requests, but requires faster servicing of the request for both read and write cases. the host must be very responsive to the service request. this is the desired case for use with a "fast" system. a high value of threshold (i.e. 12) is used with a "sluggish" system by affording a long latency period after a service request, but results in more frequent service requests.
107 dma transfers dma transfers are always to or from the ecpdfifo, tfifo or cfifo. dma utilizes the standard pc dma services. to use the dma transfers, the host first sets up the direction and state as in the programmed i/o case. then it programs the dma controller in the host with the desired count and memory address. lastly it sets dmaen to 1 and serviceintr to 0. the ecp requests dma transfers from the host by activating the pdrq pin. the dma will empty or fill the fifo using the appropriate direction and mode. when the terminal count in the dma controller is reached, an interrupt is generated and serviceintr is asserted, disabling dma. in order to prevent possible blocking of refresh requests dreq shall not be asserted for more than 32 dma cycles in a row. the fifo is enabled directly by asserting npdack and addresses need not be valid. pintr is generated when a tc is received. pdrq must not be asserted for more than 32 dma cycles in a row. after the 32nd cycle, pdrq must be kept unasserted until npdack is deasserted for a minimum of 350nsec. (note: the only way to properly terminate dma transfers is with a tc.) dma may be disabled in the middle of a transfer by first disabling the host dma controller. then setting serviceintr to 1, followed by setting dmaen to 0, and waiting for the fifo to become empty or full. restarting the dma is accomplished by enabling dma in the host, setting dmaen to 1, followed by setting serviceintr to 0. dma mode - transfers from the fifo to the host (note: in the reverse mode, the peripheral may not continue to fill the fifo if it runs out of data to transfer, even if the chip continues to request more data from the peripheral.) the ecp activates the pdrq pin whenever there is data in the fifo. the dma controller must respond to the request by reading data from the fifo. the ecp will deactivate the pdrq pin when the fifo becomes empty or when the tc becomes true (qualified by npdack), indicating that no more data is required. pdrq goes inactive after npdack goes active for the last byte of a data transfer (or on the active edge of nior, on the last byte, if no edge is present on npdack). if pdrq goes inactive due to the fifo going empty, then pdrq is active again as soon as there is one byte in the fifo. if pdrq goes inactive due to the tc, then pdrq is active again when there is one byte in the fifo, and serviceintr has been re-enabled. (note: a data underrun may occur if pdrq is not removed in time to prevent an unwanted cycle.) programmed i/o mode or non-dma mode the ecp or parallel port fifos may also be operated using interrupt driven programmed i/o. software can determine the writeintrthreshold, readintrthreshold, and fifo depth by accessing the fifo in test mode. programmed i/o transfers are to the ecpdfifo at 400h and ecpafifo at 000h or from the ecpdfifo located at 400h, or to/from the tfifo at 400h. to use the programmed i/o transfers, the host first sets up the direction and state, sets dmaen to 0 and serviceintr to 0.
108 the ecp requests programmed i/o transfers from the host by activating the pintr pin. the programmed i/o will empty or fill the fifo using the appropriate direction and mode. note: a threshold of 16 is equivalent to a threshold of 15. these two cases are treated the same. programmed i/o - transfers from the fifo to the host in the reverse direction an interrupt occurs when serviceintr is 0 and readintrthreshold bytes are available in the fifo. if at this time the fifo is full it can be emptied completely in a single burst, otherwise readintrthreshold bytes may be read from the fifo in a single burst. readintrthreshold = (16-) data bytes in fifo an interrupt is generated when serviceintr is 0 and the number of bytes in the fifo is greater than or equal to (16-). (if the threshold = 12, then the interrupt is set whenever there are 4-16 bytes in the fifo). the pint pin can be used for interrupt-driven systems. the host must respond to the request by reading data from the fifo. this process is repeated until the last byte is transferred out of the fifo. if at this time the fifo is full, it can be completely emptied in a single burst, otherwise a minimum of (16-) bytes may be read from the fifo in a single burst. programmed i/o - transfers from the host to the fifo in the forward direction an interrupt occurs when serviceintr is 0 and there are writeintrthreshold or more bytes free in the fifo. at this time if the fifo is empty it can be filled with a single burst before the empty bit needs to be re -read. otherwise it may be filled with writeintrthreshold bytes. writeintrthreshold = (16-) free bytes in fifo an interrupt is generated when serviceintr is 0 and the number of bytes in the fifo is less than or equal to . (if the threshold = 12, then the interrupt is set whenever there are 12 or less bytes of data in the fifo.) the pint pin can be used for interrupt-driven systems. the host must respond to the request by writing data to the fifo. if at this time the fifo is empty, it can be completely filled in a single burst, otherwise a minimum of (16-) bytes may be written to the fifo in a single burst. this process is repeated until the last byte is transferred into the fifo.
109 parallel port floppy disk controller in this mode, the floppy disk control signals are available on the parallel port pins. when this mode is selected, the parallel port is not available. there are two modes of operation, ppfd1 and ppfd2. these modes can be selected in the parallel port mode register, as defined in the parallel port mode register, logical device 3, at 0xf1. ppfd1 has only drive 1 on the parallel port pins; ppfd2 has drive 0 and 1 on the parallel port pins. when the ppfdc is selected the following pins are set as follows: 1. npdack: high-z 2. pdrq: not ecp = h igh-z, ecp & dmaen = 0, ecp & not dmaen = high-z 3. pintr: not active, this is hi-z or low depending on settings. note: npdack, pdrq and pintr refer to the ndack, drq and irq chosen for the parallel port. the following parallel port pins are read as follows by a read of the parallel port register: 1. data register (read) = last data register (write) 2. control register read as "cable not connected" strobe, autofd and slc = 0 and ninit =1 3. status register reads: nbusy = 0, pe = 0, slct = 0, nack = 1, nerr = 1. the following fdc pins are all in the high impedence state when the ppfdc is actually selected by the drive select register: 1. nwdata, densel, nhdsel, nwgate, ndir, nstep, nds1, nds0, nmtr0, nmtr1. 2. if ppfdx is selecte d, then the parallel port can not be used as a parallel port until "normal" mode is selected. the fdc signals are muxed onto the parallel port pins as shown in table 43.
110 table 43 - fdc parallel port pins connector pin # chip pin # spp mode pin direction fdc mode pin direction 1 144 nstb i/o (nds0) i/(o) (note1) 2 138 pd0 i/o nindex i 3 137 pd1 i/o ntrk0 i 4 136 pd2 i/o nwp i 5 135 pd3 i/o nrdata i 6 134 pd4 i/o ndskchg i 7 133 pd5 i/o nmedia_id0 i 8 132 pd6 i/o (nmtr0) i/(o) (note1) 9 131 pd7 i/o media_id1 i 10 129 nack i nds1 o 11 128 busy i nmtr1 o 12 127 pe i nwdata o 13 126 slct i nwgate o 14 143 nalf i/o drvden0 o 15 142 nerror i nhdsel o 16 141 ninit i/o ndir o 17 140 nslctin i/o nstep o note 1: these pins are outputs in mode ppfd2, inputs in mode ppfd1.
111 auto power management power management capabilities are provided for the following logical devices: floppy disk, uart 1, uart 2 and the parallel port. for each logical device, two types of power management are provided; direct powerdown and auto powerdown. fdc power management direct power management is controlled by cr22. refer to cr22 for more information. auto power management is enabled by cr23- b0. when set, this bit allows fdc to enter powerdown when all of the following conditions have been met: 1. the motor enable pins of register 3f2h are inactive (zero). 2. the part must be idle; msr=80h and int = 0 (int may be high even if msr = 80h due to polling interrupts). 3. the head unload timer must have expired. 4. the auto powerdown timer (10msec) must have timed out. an internal timer is initiated as soon as the auto powerdown command is enabled. the part is then powered down when all the conditions are met. disabling the auto powerdown mode cancels the timer and holds the fdc block out of auto powerdown. dsr from powerdown if dsr powerdown is used when the part is in auto powerdown, the dsr power down will override the auto powerdown. however, when the part is awakened from dsr powerdown, the auto powerdown will once again become effective. wake up from auto powerdown if the part enters the powerdown state through the auto powerdown mode, then the part can be awakened by reset or by appropriate access to certain registers. if a hardware or software reset is used then the part will go through the normal reset sequence. if the access is through the selected registers, then the fdc resumes operation as though it was never in powerdown. besides activating the reset pin or one of the software reset bits in the dor or dsr, the following register accesses will wake up the part: 1. enabling any one of the motor enable bits in the dor register (reading the dor does not awaken the part). 2. a read from the msr register. 3. a read or write to the data register. once awake, the fdc will reinitiate the auto powerdown timer for 10 ms. the part will powerdown again when all the powerdown conditions are satisfied.
112 register behavior table 44 reiterates the at and ps/2 (including model 30) configura tion registers available. it also shows the type of access permitted. in order to maintain software transparency, access to all the registers must be maintained. as table 44 shows, two sets of registers are distinguished based on whether their access results in the part remaining in powerdown state or exiting it. access to all other registers is possible without awakening the part. these registers can be accessed during powerdown without changing the status of the part. a read from these registers will reflect the true status as shown in the register description in the fdc description. a write to the part will result in the part retaining the data and subsequently reflecting it when the part awakens. access ing the part during powerdown may cause an increase in the power consumption by the part. the part will revert back to its low power mode when the access has been completed. pin behavior the FDC37C93XAPM is specifically designed for portable pc systems in which power conservation is a primary concern. this makes the behavior of the pins during powerdown very important. the pins of the FDC37C93XAPM can be divided into two major categories: system interface and floppy disk drive interface. the floppy disk drive pins are disabled so that no power will be drawn through the part as a result of any voltage applied to the pin within the part's power supply range. most of the system interface pins are left active to monitor system accesses that may wake up the part. system interface pins table 45 gives the state of the system interface pins in the powerdown state. pins unaffected by the powerdown are labeled "unchanged". input pins are "disabled" to prevent them from causing currents internal to the FDC37C93XAPM when they have indeterminate input values.
113 table 44 - pc/at and ps/2 available registers available registers base + address pc-at ps/2 (model 30) access permitted access to these registers does not wake up the part 00h ---- sra r 01h ---- srb r 02h dor (1) dor (1) r/w 03h --- --- --- 04h dsr (1) dsr (1) w 06h --- --- --- 07h dir dir r 07h ccr ccr w access to these registers wakes up the part 04h msr msr r 05h data data r/w note 1: writing t o the dor or dsr does not wake up the part, however, writing any of the motor enable bits or doing a software reset (via dor or dsr reset bits) will wake up the part. table 45 - state of system pins in auto powerdown system pins state in auto powerdown input pins ior unchanged iow unchanged a[0:9] unchanged d[0:7] unchanged reset unchanged ident unchanged dackx unchanged tc unchanged output pins irqx unchanged (low) db[0:7] unchanged drqx unchanged (low)
114 fdd interface pins all pins in the fdd interface which can be connected directly to the floppy disk drive itself are either disabled or tristated. pins used for local logic control or part programming are unaffected. table 46 depicts the state of the floppy disk drive interface pins in the powerdown state. table 46 - state of floppy disk drive interface pins in powerdown fdd pins state in auto powerdown input pins rdata input wp input trk0 input indx input drv2 input dskchg input output pins moten[0:3] tristated ds[0:3] tristated dir active step active wrdata tristated we tristated hdsel active densel active drate[0:1] active
115 uart power management direct power management is controlled by cr22. refer to cr22 for more information. auto power management is enabled by cr23- b4 and b5. when set, these bits allow the following auto power management operations: 1. the transmitter enters auto powerdown when the transmit buffer and shift register are empty. 2. the receiver enters powerdown when the following conditions are all met: a . receive fifo is empty b . the receiver is waiting for a start bit. note: while in powerdown the ring indicator interrupt is still valid and transitions when the ri input changes. exit auto powerdown the transmitter exits powerdown on a write to the xmit buffer. the receiver exits auto powerdown when rxdx changes state. parallel port direct power management is controlled by cr22. refer to cr22 for more information. auto power management is enabled by cr23- b3. when set, this bit allows the ecp or epp logical parallel port blocks to be placed into powerdown when not being used. the epp logic is in powerdown under any of the following conditions: 1. epp is not enabled in the configuration registers. 2. epp is not selected through ecr while in ecp mode. the ecp logic is in powerdown under any of the following conditions: 1. ecp is not enabled in the configuration registers. 2 spp, ps/2 parallel port or epp mode is selected through ecr while in ecp mode. exit auto powerdown the parallel port logic can change powerdown modes when the ecp mode is changed through the ecr register or when the parallel port mode is changed through the configuration registers.
116 integrated drive electronics interface the FDC37C93XAPM contains two ide interfaces. this enables hard disks with embedded controllers (at or ide) to be interfaced to the host processor. the ide interface performs the address decoding for the ide interface, generates the buffer enables for external buffers and provides internal buffers for the low byte ide data transfers. for more information, refer to the ide pin descriptions and the ata specification. the following example uses ide1 base1=1f0h, base2=3f6h and ide2 base1=170h, base2 =376h. host file registers the host file registers are accessed by the at host. there are two groups of registers, the at task file, and the miscellaneous at register. address 1f0h-1f7h; 170h-177h these at registers contain the task file registers. these registers communicate data, command, and status information with the at host, and are addressed when nhcs0 or nhcs2 is low. address 3f6h/376h; these at registers may be used by the bios for drive control. they are accessed by the at interface when nhcs1 or nhcs3 is active low. host processor register address map (at mode) primary secondary 1f0h | 1f7h 1 7 0h | 1 7 7h task file registers 3f6h 376h misc at registers task file registers task file registers may be accessed by the host at when pin nhdcs0 is active (low). the data register (1f0h) is 16 bits wide; the remaining task file registers are 8 bits wide. the task file registers are ata and eata compatible. please refer to the ata and eata specifications. these are available from: global engineering 2805 mcgaw street irvine, ca 92714 (800) 854-7179 or (714) 261-1455
117 ide output enables two ide output enables are available. the ide output enables treat all ide transfers as 16 bit transfers. nide1_oe nide2_oe option 1 ide1 (1) ide2 (2) option 2 ide1&ide2 (3) (not used) note 1: the low and high byte transfers for id e1 goes through external buffers controlled by ide1_oe. (refer to option 1) note 2: the low and high byte transfers for ide2 goes through external buffers controlled by ide2_oe. (refer to option 1) note 3: the low and high byte transfers of ide1 and id e2 go through one set of external buffers controlled by ide1. (refer to option 2) hdcs0 and hdcs1 of ide1 as general purpose address decoders hdcs0 and hdcs1 of ide1, initially configured to support ide drives, can be programmed as general purpose address decoders. refer to the configuration register section, logical device 1, crf0 and crf1.
118 bios buffer the FDC37C93XAPM contains one 245 type buffer that can be used for a bios buffer. if the bios buffer is not used, then nromcs and nromdir must be tied high so as not to interfere with the boot rom. this function allows data transmission from the rd bus to the sd bus or from the sd bus to the rd bus. the direction of the transfer is controlled by nromdir. the enable input, nromcs, can be used to disable the transfer and isolate the buses. nromcs nromdir l l rd[0:7] data to sd[0:7] bus l h sd[0:7] data to rd[0:7] h x isolation figure 2 - ide output enable option 1 b1 FDC37C93XAPM bios ide2_oe ide1_oe sd[7:0] sd[15:8] option 1 ide channel 1 ide channel 2
119 figure 3 - ide output enable option 2 b1 FDC37C93XAPM bios ide2_oe ide1_oe sd[7:0] sd[15:8] option 2 ide channel 1 ide channel 2 nc
120 rd bus functionality the following four cases described below illustrate the use of the rd bus. case 1 : nromcs and nromoe as original function. the rd bus can be used as the rd bus or one or more rd pins can be programmed as alternate function. these alternate functions behave as follows: if in rd to sd mode, any value on rdx will appear on sdx; if in sd to rd mode, sdx will not appear on rdx, rdx gets the alternate function value. note: in this case, nromcs=0, nromoe=1. case 2 : nromoe as alternate function (nromoe internally tied to ground). in this case, the rd bus is a unidirectional bus (read only) controlled by nromcs. if nromcs = 0, the values on rd0-7 appear on sd0-7. if nromcs = 1, the rd bus is disabled and nothing appears on the sd bus. note: any rd bus pin can be programmed as an alternate function, however, if nromcs=0, then anything on the rd bus will appear on the sd bus. case 3 : nromcs as alternate function (nromcs internally tied to vdd). the rd bus floats - cannot use as a bus. any pin can be programmed as an alternate function. case 4 : nromcs and nromoe as alternate function. same as case 3. 8042 functions the second alternate function for pins 113-118 are the 8042 functions p12-p17. these are implemented as in a true 8042 part. reference the 8042 specification for all timing. a port signal of 0 drives the output to 0. a port signal of 1 causes the port enable signal to drive the output to 1 within 20-30nsec. after several (# tbd) clocks, the port enable goes away and the internal 90a pull-up maintains the output signal as 1. in 8042 mode, the pins can be programmed as open drain. when programmed in open drain mode, the port enables do not come into play. if the port signal is 0 the output will be 0. if the port signal is 1, the output tristates: an external pull-up can pull the pin high, and the pin can be shared i.e., p12 and nsmi can be externally tied together. in 8042 mode, the pins cannot be programmed as input nor inverted through the gp configuration registers.
121 general purpose i/o functional description the FDC37C93XAPM provides a set of flexible input/output control functions to the system designer through a set of general purpose i/o pins (gpi/o). these gpi/o pins may perform simple i/o or may be individually configured to provide a predefined alternate function. power- on reset configures all gpi/o pins as simple non-inverting inputs. general purpose i/o ports the FDC37C93XAPM has 14 dedicated, independently-programmable general purpose i/o ports (gpi/o). each gpi/o port is represented as a bit in one of two gpi/o 8-bit registers, gp1 or gp2. only 6 bits of gp2 are implemented. each gpi/o port and its alternate function is listed in table 47a. table 47a - general purpose i/o port assignments pin number original function alternate function 1 alternate function 2 alternate function 3 register assignment 96 gp10 interrupt steering* - - gp1, bit 0 97 gp11 interrupt steering* irq 13 - gp1, bit 1 98 gp12 wd timer output irrx input - gp1, bit 2 99 gp13 power led irtx output - gp1, bit 3 100 gp14 gp address decoder - - gp1, bit 4 102 gp15 gp write strobe - - gp1, bit 5 103 gp16 joystick rd strobe joystick chip sel - gp1, bit 6 104 gp17 joystick wr strobe - - gp1, bit 7 105 gp20 ide2 buffer enable 8042 p20 - gp2, bit 0 106 gp21 serial eeprom data in * ab_data - gp2, bit 1 107 gp22 serial eeprom data out ab_clk - gp2, bit 2 108 gp23 serial eeprom clock - - gp2, bit 3 109 gp24 serial eeprom enable - - gp2, bit 4 110 gp25 8042 p21 - - gp2, bit 5 note 1: 8042 p21 is normally used for gate a20 note 2: 8042 p20 is normally used for the keyboard reset output * these are input-type alternate functions; all other gpi/o pins contain output-type alternate functions.
122 the FDC37C93XAPM also has 28 gpi/o ports that are the first alternate functions of pins with other default functions. these pins are listed in table 47b below. table 47b - multifunction gpi/o pins pin number original function alternate function 1 alternate function 2 alternate function 3 gpi/o register assignment 19 media_id1 gp40 - - gp4, bit 0 20 media_id0 gp41 - - gp4, bit 1 23 nide1_oe gp42 - - gp4, bit 2 24 nhdcs0 gp43 - - gp4, bit 3 25 nhdcs1 gp44 - - gp4, bit 4 26 ide1_irq gp45 - - gp4, bit 5 30 niorop gp46 power led output wdt gp4, bit 6 31 niowop gp47 nsmi - gp4, bit 7 33 npoweron gp51 - - gp5, bit 1 34 button_in gp50 - - gp5, bit 0 111 rd0 (1) (3) gp60 power led output - gp6, bit 0 112 rd1 (1) (3) gp61 wdt - gp6, bit 1 113 rd2 (1) (3) gp62 8042 - p12 - gp6, bit 2 114 rd3 (1) (3) gp63 8042 - p13 - gp6, bit 3 115 rd4 (1) (3) gp64 8042 - p14 - gp6, bit 4 116 rd5 (1) (3) gp65 8042 - p15 - gp6, bit 5 117 rd6 (1) (3) gp66 8042 - p16 - gp6, bit 6 118 rd7 (1) (3) gp67 8042 - p17 - gp6, bit 7 119 nromcs (1) gp53 - - gp5, bit 3 120 nromoe (1) gp54 - - gp5, bit 4 153 nri2 (2) gp70 - - gp7, bit 0 154 ndcd2 (2) gp71 - - gp7, bit 1 155 rxd2 (2) gp72 - - gp7, bit 2 156 txd2 (2) (3) gp73 - - gp7, bit 3
123 pin number original function alternate function 1 alternate function 2 alternate function 3 gpi/o register assignment 157 ndsr2 (2) gp74 - - gp7, bit 4 158 nrts2 (2) (3) gp75 - - gp7, bit 5 159 ncts2 (2) gp76 - - gp7, bit 6 160 ndtr2 (2) (3) gp77 - - gp7, bit 7 note 1: a t power-up, rd0-rd7, nromcs and nromoe function as the xd bus. to use rd0- rd7 for functions other than the xd bus, nromcs must stay high until those pins are finished being reprogrammed. note 2: these pins are input (high-z) until programmed for second serial port. note 3: these pins cannot be programmed as open drain pins in their original function. note 4: no pins in their original function can be programmed as inverted input or inverted output. gpi/o registers gp1 through gp7 as well as the soft power and smi enable and status registers can be accessed by the host when the chip is in the normal run mode if cr03 bit[7]=1. the host uses an index and data register to access these registers. the power on default index and data registers are 0xea and 0xeb respectively. in configuration mode the index address may be programmed to reside on addresses 0xe0, 0xe2, 0xe4 or 0xea. the data address is automatically set to the index address + 1. upon exiting the configuration mode the new index and data registers are used to access registers gp1 through gp7 and soft power and smi enable and status registers. to access the gp1 register when in normal (run) mode, the host should perform an iow of 0x01 to the index register (at 0xex) to select gp1 and then read or write the data register (at index+1) to access the gp1 register. to access gp2 the host should perform an iow of 0x02 to the index register and then access gp2 through the data register. gp4-7 and the soft power and smi registers are acessed similarly. additionally the host can access the wdt_ctrl (watch dog timer control) configuration register while in the normal (run) mode by writing an 0x03 to the index register. the gp registers can also be accessed by the host when in configuration mode through crf6- fb of logical device 8.
124 table 48a - index and data register register address normal (run) mode index 0xe0, e2, e4, ea 0x01-0x0f data index address + 1 access to gp1, gp2, watchdog timer control, gp4, gp5, gp6, gp7, soft power and smi enable and status registers (see table 48b) table 48b - index and data register normal (run) mode index normal (run) mode 0x01 access to gp1 (l8 - crf6) 0x02 access to gp2 (l8 - crf7) 0x03 access to watchdog timer control (l8 - crf4) 0x04 access to gp4 (l8 - crf8) 0x05 access to gp5 (l8 - crf9) 0x06 access to gp6 (l8 - crfa) 0x07 access to gp7 (l8 - crfb) 0x08 access to soft power enable register 1 (l8-crb0) 0x09 access to soft power enable register 2 (l8-crb1) 0x0a access to soft power status register 1 (l8-crb2) 0x0b access to soft power status register 2 (l8-crb3) 0x0c access to smi enable register 1 (l8-crb4) 0x0d access to smi enable register 2 (l8-crb5) 0x0e access to smi status register 1 (l8-crb6) 0x0f access to smi status register 2 (l8-crb7) note 1: these registers can also be accessed through the configuration registers at l8 - crxx shown in the table above.
125 gpi/o ports contain alternate functions which are either output-type or input-type. the gpi/o port structure for each type is illustrated in the following two figures. note: the input pin buffer is always enabled. figure 4 - gpi/o having an input-type alternate function [gp10, gp11, gp12, gp21] gpi/o pin gpi/o register bit-n sd-bit niow nior gpi/o configuration register bit-1 (polarity) gpio configuration register bit-3 (alt function) gpi/o configuration register bit-2 (int en) gpi/o configuration register bit-0 (input/output) to gp interrupt 0 1 1 0 alternate input function d-type transparent
126 figure 5 - gpi/o having an output-type alternate function [gp12 - gp17, gp20, gp22 - gp25] gpi/o pin gpi/o register bit-n sd-bit niow nior alternate output function gpi/o configuration register bit-1 (polarity) gpio configuration register bit-3 (alt function) 0 1 gpi/o configuration register bit-2 (int en) gpi/o configuration register bit-0 (input/output) to gp interrupt 0 1 1 0 d-type transparent
127 general purpose i/o configuration registers assigned to each gpi/o port is an 8-bit gpi/o configuration register which is used to independently program each i/o port. the gpi/o configuration registers are only accessible when the FDC37C93XAPM is in the configuration mode; more information can be found in the configuration section of this specification. each gpi/o port may be programmed as either a simple inverting or non-inverting input or output port, or as an alternate function port. the least-significant four bits of each gpi/o configuration register define the operation of the respective gpi/o port. the basic gpi/o operations are outlined in table 49. in addition, the gpi/o port may be optionally programmed to steer its signal to a combined general purpose interrupt request output pin on the FDC37C93XAPM. the interrupt channel for the combined interrupt is selected by the gp_int configuration register defined in the FDC37C93XAPM system configuration section. the combined interrupt is the "ored" function of the interrupt enabled gpi/o ports and will represent a standard isa interrupt (edge high). when programmed as an input steered onto the general purpose combined interrupt (gp irq), the interrupt circuitry contains a selectable debounce/digital filter circuit in order that switches or push-buttons may be directly connected to the chip. this filter will reject signals with pulse widths of 1ms or less. table 49 - gpi/o configuration register bits [3:0] alt func bit 3 0= disable 1=select int en bit 2 0=disable 1=enable polarity bit 1 0= no invert 1=invert i/o bit 0 1=input 0=output gpi/o port operation 0 0 0 0 simple non-inverting output 0 0 0 1 simple non-inverting input 0 0 1 0 simple inverting output 0 0 1 1 simple inverting input 0 1 0 0 non-inverting output steered back to gp irq 0 1 0 1 non-inverting input steered to gp irq 0 1 1 0 inverting output steered back to gp irq 0 1 1 1 inverting input steered to gp irq 1 0 0 0 alternate function output-type : alternate non-inverted output. alternate function input-type : alternate function not valid, gpi/o pin acts as a simple non-inverting output.
128 table 49 - gpi/o configuration register bits [3:0] alt func bit 3 0= disable 1=select int en bit 2 0=disable 1=enable polarity bit 1 0= no invert 1=invert i/o bit 0 1=input 0=output gpi/o port operation 1 0 0 1 alternate function output-type : alternate function not valid, gpi/o pin acts as a simple non-inverting input. alternate function input-type : alternate non-inverting input. 1 0 1 0 alternate function output-type : alternate output function with inverted sense alternate function input-type : alternate function not valid, gpi/o pin acts as a simple inverting output. 1 0 1 1 alternate function output-type : alternate output function not valid, gpi/o pin acts as a simple inverting input. alternate function input-type : inverting input to alternate input function. 1 1 0 0 alternate function output-type : alternate output function with non inverted sense steered to gp irq alternate function input-type : alternate function not valid, gpi/o pin acts as a simple non-inverting output steered to gp irq 1 1 0 1 alternate function output-type : alternate output function not valid, gpi/o pin acts as a simple non-inverting input steered to gp irq. alternate function input-type : non-inverting input to alternate input function also steered to the gp irq.
129 table 49 - gpi/o configuration register bits [3:0] alt func bit 3 0= disable 1=select int en bit 2 0=disable 1=enable polarity bit 1 0= no invert 1=invert i/o bit 0 1=input 0=output gpi/o port operation 1 1 1 0 alternate function output-type : alternate output function with inverted sense steered to gp irq alternate function input- type : alternate function not valid, gpi/o pin acts as a simple inverting output steered to gp irq. 1 1 1 1 alternate function output-type : alternate output function not valid, gpi/o pin acts as a simple inverting input steered to gp irq. alternate function input-type : inverting input to alternate input function also steered to the gp irq. the alternate function of gp10 and gp11 allows these gpi/o port pins to be mapped to their own independent interrupt channels. the upper nibble of the gp10 and gp11 gpi/o configuration registers is used to select the active interrupt channel for each of these ports as shown in the configuration section of this specification.
130 reading and writing gpi/o ports when a gpi/o port is programmed as an input, reading it through the gpi/o register latches either the inverted or non-inverted logic value present at the gpi/o pin; writing it has no effect. when a gpi/o port is programmed as an output, the logic value written into the gpi/o register is either output to or inverted to the gpi/o pin; when read the result will reflect the contents of the gpi/o register bit. this is summarized in table 50. table 50 - gpi/o read/write behavior host operation gpi/o input port gpi/o output port read latched value of gpi/o pin bit value in gp register write no effect bit placed in gp register watch dog timer/power led control basic functions the FDC37C93XAPM contains a watch dog timer (wdt) and also has the capability to directly drive the system's power-on led. the watch dog time-out status bit (wdt_ctrl bit 0) is mapped to gp12 when the alternate function bit of the gp12 configuration register is set "and" bit 6 of the ir options register = 0. in addition, the watch dog time- out status bit may be mapped to an interrupt through the wdt_cfg configuration register. pins 30 (niorop/gp46) and 112 (rd1/gp61) can also be configured for wdt. gp13 may be configured as a high current led driver to drive the power led. this is accomplished by setting the alternate function bit of the gp13 configuration register "and" clearing bit 6 of the ir options register. the infared signals, irrx and irtx, are mapped to gp12 and gp13 when the alternate function bit of the gp12 and gp13 configuration registers is set "and" bit 6 of the ir options register is set. pins 30 (niorop/gp46) and 111 (rd0/gp60) can also be configured for power led. watch dog timer the FDC37C93XAPM's wdt has a programmable time-out ranging from one to 255 minutes with one minute resolution, or one to 255 seconds with one second resolution. the units of the wdt timeout value are selected via bit 7 of the gpa_gpw_en register (located at 0xf1 of logical device 8). the wdt time-out value is set through the wdt_val configuration register. setting the wdt_val register to 0x00 disables the wdt function (this is its power on default). setting the wdt_val to any other non-zero value will cause the wdt to reload and begin counting down from the value loaded. when the wdt count value reaches zero the counter stops and sets the watchdog time-out status bit in the wdt_ctrl configuration register. note: regardless of the current state of the wdt, the wdt time-out status bit can be directly set or cleared by the host cpu.
131 there are three system events which can reset the wdt; these are a keyboard interrupt, a mouse interrupt, or i/o reads/writes to address 0x201 (the internal or an external joystick port). the effect on the wdt for each of these system events may be individually enabled or disabled through bits in the wdt_cfg configuration register. when a system event is enabled through the wdt_cfg register, the occurence of that event will cause the wdt to reload the value stored in wdt_val and reset the wdt time-out status bit if set. if all three system events are disabled, the wdt will inevitably time out. the watch dog timer may be configured to generate an interrupt on the rising edge of the time-out status bit. the wdt interrupt is mapped to an interrupt channel through the wdt_cfg configuration register. when mapped to an interrupt the interrupt request pin reflects the value of the wdt time-out status bit. when the polarity bit is 0, gp12 reflect the value of the watch dog time-out status bit, however when the polarity bit is 1, gp12 reflects the inverted value of the watch dog time-out status bit. this is also true for the other two pins used for wdt, niorop (gp46) and rd1 (gp61). the host may force a watch dog time-out to occur by writing a "1" to bit 2 of the wdt_ctrl (force wd time-out) configuration register. writing a "1" to this bit forces the wdt count value to zero and sets bit 0 of the wdt_ctrl (watch dog status). bit 2 of the wdt_ctrl is self-clearing. power led toggle setting bit 1 of the wdt_ctrl configuration register will cause the power led output driver to toggle at 1 hertz with a 50 percent duty cycle. when this bit is cleared the power led output will drive continuously unless it has been configured to toggle on watch dog time-out conditions. setting bit 3 of the wdt_cfg configuration register will cause the power led output driver to toggle at 1 hertz with a 50 percent duty cycle whenever the wdt time-out status bit is set. the truth table below clarifies the conditions for which the power led will toggle. when the polarity bit is 0, the power led output asserts or drives low. if the polarity bit is 1 then the power led output asserts or drives high. table 51 - led toggle truth table wdt_ctrl bit 1 power led toggle wdt_cfg bit 3 power led toggle on wdt wdt_ctrl bit 0 wdt t/o status bit power led state 1 x x toggle 0 0 x continuous 0 1 0 continuous 0 1 1 toggle
132 table 52 - watchdog timer/power led configuration registers config reg. bit field description wdt_val bits[7:0] binary coded time-out value, 0x00 disables the wdt. wdt_cfg bit[0] joystick enable bit[1] keyboard enable bit[2] mouse enable bit[3] power led toggle on wdt time-out bits[7:4] wdt interrupt mapping, 0000b = diables irq mapping wdt_ctrl bit[0] wdt time-out status bit bit[1] power led toggle bit[2] force timeout, self-clearing bit[3] p20 force timeout enable bit[4] reserved, set to zero bit[5,6,7] stop_cnt, restart_cnt, spoff: used for soft power mgt general purpose address decoder general purpose i/o pin gp14 may be configured as a general purpose address decode pin. the general purpose address decoder provides an output decoded from bits a11-a1 of the 12-bit address stored in a two- byte base i/o address register (logical device 8 configuration registers 0x60, 0x61) qualified with aen. thus, the decoder provides a two address decode where a0=x. this general purpose output is normally active low, however the polarity may be altered through the polarity bit in its gpi/o configuration register. the pins nhdcs0 and nhdcs1 can also be used as general purpose address decoders. see configuration section, logical device 1, for more information. general purpose write general purpose i/o pin gp15 may be configured as a general purpose write pin. the general purpose write provides an output decoded from the 12-bit address stored in a two-byte base i/o address register (logical device 8 configuration registers 0x62, 0x63) qualified with iow and aen. this general purpose output is normally active low, however the polarity may be altered through the polarity bit in its gpi/o configuration register. the gpa_gpw_en configuration register contains two bits which allow the general purpose address decode and write functions to be independently enabled or disabled. joystick control the base i/o address of the joystick (game) port is fixed at address 0x201.
133 gp16 joystick function the FDC37C93XAPM may be configured to generate either a joystick chip select or a joystick read strobe on gp16. the polarity is programmable through a bit in the gp16 confiugration register. when configured as a joystick chip select the output is simply a decode of the address = 0x201 qualified by aen active. when configured as a joystick read strobe the output is a decode of the address = 0x201 qualified by ior and aen both active. the joystick chip select or read strobe is normally active low, however its polarity is programmable through a bit in the gp20 configuration register. gp17 joystick function the FDC37C93XAPM may be configured to generate a joystick write strobe on gp17. when configured as a joystick write strobe the output is a decode of the address = 0x201 qualified by iow and aen both active. the joystick write strobe is normally active low, however, its polarity is programmable through a bit in the gp20 configuration register. ide2 buffer enable/reset out the FDC37C93XAPM may be configured to provide an nide2_oe buffer enable signal on pin gp20. the ide2 mode register (0xf0 of logical device 2) contains a bit which determines whether nide1_oe or nide2_oe is active for ide2 transfers. if gp20 is selected as a general purpose i/o pin, ide2 i/o accesses must be configured to activate nide1_oe for ide2 transfers if a secondary hard drive interface is present. the polarity of nide2_oe, which is normally active low, is programmable through a bit in the gp20 configuration register. serial eeprom interface four of the FDC37C93XAPM's general purpose i/o pins may be configured to provide a four wire direct interface to a family of industry standard serial eeproms. for proper operation the polarity bits of these four pins must be set to 0 (non-inverting). the interface is depicted below and will allow connection to either a 93c06 (256-bit), a 93c46 (1k-bit), a 93c56 (2k-bit), or a 93c66 (4k-bit) device. gp21 <---- serial eeprom data in gp22 ----> serial eeprom data out gp23 ----> serial eeprom clock gp24 ----> serial eeprom enable reset out is an internal signal from the keyboard controller (port 20). the FDC37C93XAPM may be configured to drive this signal onto gp20 by programming its gpi/o configuration register. access to the serial eeprom is only available when the FDC37C93XAPM is in the configuration mode. a set of six configuration registers, located in logical device 6 (rtc) is used to fully access and configure the serial eeprom. the registers are defined as follows: serial eeprom mode register, 0xf1 bit 3 and 0 these are the lock bits which once set deny access to the serial eeprom's first 128 bytes in 32 byte blocks. bit 0 locks the first block, bit 1 the second block, bit 2 the third block and bit 3 the fourth block of 32 bytes. once these lock bits are set they cannot be reset in any way other than by a hard reset or a power-on reset. bit 4 this selects the type of eeprom connected to the FDC37C93XAPM. if cleared the device must be either a 93c06 or 93c46 and if set the device must be either an 93c56 or 93c66. this bit must be properly set before attempting to access the serial eeprom.
134 bit 7 - 5 reserved, set to zero. serial eeprom pointer register, 0xf2 bit 7 - 0 use this register to set the serial eeprom's pointer. the value in this register always reflects the current eeprom pointer address. the serial device pointer increments after each pair of reads from the resource data register or after each pair of writes to the program resource data register. write eeprom data register, 0xf3 bit 7 - 0 this register allows the host to write data into the serial eeprom. the FDC37C93XAPM supports serial eeproms with x16 configurations. two bytes must be written to this register in order to generate an eeprom write cycle. the lsb leads the msb. the first write to this register resets bit 0 of the write status register. the second write resets bit 1 of the write status register and generates a write cycle to the serial eeprom. the write status register must be polled before performing a pair of writes to this register. write status register, 0xf4 bit 1 and 0 when = (1,1)indicates that the write eeprom data register is ready to accept a pair of bytes. when = (1,0) bit 0 is cleared on the first write of the write eeprom data register. this status indicates that the serial device controller has received one byte (lsb) and is waiting for the second byte (msb). when = (0,0) bit 1 is cleared on the second write of the write eeprom data register indicating that two bytes have been accepted and that the serial device interface is busy writing the word to the eeprom. bit 6 - 2 reserved, set to ?0? bit 7 this bit is cleared to configure the eeprom interface for read operations. clearing this bit enables the serial eeprom prefetch when the serial eeprom pointer register is updated (written or auto-incremented). this bit is set to configure the eeprom interface for write operations. setting this bit disables the serial eeprom prefetch when the serial eeprom pointer register is updated (written or auto-incremented). read eeprom data register, 0xf5 bit 7 - 0 this register allows the host to read data from the serial eeprom. data is not valid in this register until bit 0 of the read status register is set. since the eeprom is a 16-bit device this register presents the lsb followed by the msb for each pair of register reads. immediately after the msb is read bit-0 of the read status register will be cleared, then the serial eeprom pointer register will be auto- incremented, then the next word of eeprom data will be fetched, followed by the read status register, bit 0 being set. read status register, 0xf6 bit[0] when set, indicates that data in the read eeprom data register is valid. this bit is cleared when eeprom data is read until the next byte is valid. reading the read eeprom data register when bit 0 is clear will have no detremental effects; the data will simply be invalid.
135 gatea20 gatea20 is an internal signal from the keyboard controller (port 21). the FDC37C93XAPM may be configured to drive this signal onto gp25 by programming its gpi/o configuration register. see the 8042 keyboard controller section for more information. either edge triggered interrupts three gpios will allow an interrupt to be generated on either a high-to-low or low-to-high edge transition, instead of one or the other as selected by the polarity bit. these gpios, gp42, gp23, gp24, pins 23, 108, 109, respectively, can be used to detect system changes. note: these pins are enabled as interrupts by selecting the ?either edge triggered interrupt input x enable? function through bits[4:3]. selecting the ?either edge triggered interrupt input x enable? function for these gpi/o pins is only applicable if the combined interrupt is enabled (gp42 can be enabled onto either gpint1 or gpint2; gp23 and gp24 can be enabled onto gpint1). otherwise, selection of this function will produce no function for the pin. in addition, if this function is selected, then the bits that control in/out, polarity and open collector/push-pull will have no effect on the function of the pin. however, the polarity will affect the value of the gp bit. an interrupt occurs if the status bit is set and the interrupt is enabled. the status bits indicate which of these interrupts transitioned. these status bits are located in the msc_sts register (see acpi section). these bits are cleared by a writing a 1 to their respective bit locations (writing a 0 has no effect). the status is valid whether the interrupt is enabled or not and whether or not the pin is selected for either edge triggered interrupt. note: these additional interrupts will go through the same selectable debounce/digital filter circuit as any interrupt that is steered onto one of the gp group interrupts. these interrupts function as follows: when an edge comes in, an interrupt is generated and the status bit is set. when the interrupt is serviced, the status bit is cleared. when the next edge comes in, an interrupt is generated and the status bit is set. again, when the interrupt is serviced, the status bit is cleared. see figure 6 below. figure 6 - either edge triggered interrupt timing example cleared by a write to the status bit gpi/o pin gp interrupt
136 8042 keyboard controller and real time clock functional description the FDC37C93XAPM is a ultra i/o, real time clock and universal keyboard controller de- signed for intelligent keyboard manage ment in desktop computer applica tions. the ultra i/o supports a floppy disk controller, two 16550- type serial ports, one ecp/epp parallel port and two ide drive interfaces with support for four drives. the universal keyboard controller uses an 8042 microcontro ller cpu core. this section concentrates on the FDC37C93XAPM enhancements to the 8042. for general information about the 8042, refer to the "hard- ware description of the 8042" in the 8-bit embedded controller hand book. figure 6 - keyboard and mouse interface kirq is the keyboard irq mirq is the mouse irq gp25 - port 21 is gp25's alternate function output and can be used to create a gatea20 signal from the FDC37C93XAPM. gp20 - this general purpose output can be configured as the 8042 port 2.0 which is typically used to create a "keyboard reset" signal. the 8042's p20 can be used to optionally reset the watch dog timer. 8042a kirq mirq gp25 gp20 (wd timer) p24 p25 p21 p20 p27 p10 p26 tst0 p23 tst1 p22 p11 kdat kclk mclk mdat ls05
137 keyboard and rtc isa interface the FDC37C93XAPM isa interface is functionally compatible with the 8042-style host interface. it consists of the d0-7 data bus, the nior, niow and the status register, input data register, and output data register. table 53 shows how the interface decodes the control signals. in addition to the above signals, the host interface includes keyboard and mouse irqs. table 53 - isa i/o address map addresses 0x60, 0x64, 0x70 and 0x71 are qualified by a en isa address (note 1) block function 0x70 (r/w) rtc address register 0x71 (r/w) rtc data register bank 0 is at 70h. bank 1 and 2 are relocatable via the rtc mode register and the secondary base address for rtc bank 1 and 2 (cr62 and cr63). see configuration section. isa address niow nior block function* 0x60 0 1 kdata keyboard data write (c/d=0) 1 0 kdata keyboard data read 0x64 0 1 kdctl keyboard command write (c/d=1) 1 0 kdctl keyboard status read note*: these registers consist of three separate 8 bit registers: status, data/command write and data read. keyboard data write this is an 8 bit write only register. when written, the c/d status bit of the status register is cleared to zero and the ibf bit is set. keyboard data read this is an 8 bit read only register. if enabled by "enable flags", when read, the kirq output is cleared and the obf flag in the status register is cleared. if not enabled, the kirq and/or auxobf1 must be cleared in software. keyboard command write this is an 8 bit write only register. when written, the c/d status bit of the status register is set to one and the ibf bit is set. keyboard status read this is an 8 bit read only register. refer to the description of the status register for more information. rtc address register writing to this register sets the cmos address that will be read or written.
138 rtc data register a read of this register will read the contents of the selected cmos register. a write to this register will write to the selected cmos register. cpu-to-host communication the FDC37C93XAPM cpu can write to the out- put data register via register dbb. a write to this register auto matically sets bit 0 (obf) in the status register. see table 54. table 54 - host interface flags 8042 instruction flag out dbb set obf, and, if enabled, the kirq output signal goes high host-to-cpu communication the host system can send both commands and data to the input data regis ter. the cpu differentiates between commands and data by reading the value of bit 3 of the status register. when bit 3 is "1", the cpu interprets the register contents as a command. when bit 3 is "0", the cpu interprets the register contents as data. during a host write operation, bit 3 is set to "1" if sa2 = 1 or reset to "0" if sa2 = 0. kirq if "en flags" has been executed and p24 is set to a one: the obf flag is gated onto kirq. the kirq signal can be connected to sys tem interrupt to signify that the FDC37C93XAPM?s cpu has written to the output data register via "out dbb,a". if p24 is set to a ?0?, kirq is forced low. on power-up, after a valid rst pulse has been delivered to the device, kirq is reset to 0. kirq will normally reflects the status of writes "dbb". (kirq is normally selected as irq1 for keyboard support.) if "en flags? has not been executed, kirq can be controlled by writing to p24. writing a ?0? to p24 forces kirq low; a high forces kirq high. mirq if "en flags" has been executed and p25 is set to a ?1?, ibf is inverted and gated onto mirq. the mirq signal can be connected to sys tem interrupt to signify that the FDC37C93XAPM?s cpu has read the dbb register. if "en flags? has not been executed, mirq is controlled by p25, writing a ?0? to p25 forces mirq low; a high forces mirq high. (mirq is normally selected as irq12 for mouse support.) gate a20 a general purpose p21 can be routed out to the general purpose pin gp25 for use as a software-controlled gate a20 or user-defined output.
139 external keyboard and mouse interface industry-standard pc/at-compatible keyboards employ a two-wire, bidirectional ttl interface for data transmission. several sources also supply ps/2 mouse products that employ the same type of interface. to facilitate system expansion, the FDC37C93XAPM provides four signal pins that may be used to implement this interface directly for an external keyboard and mouse. the FDC37C93XAPM has four high-drive, open- drain output, bidirectional port pins that can be used for external serial interfaces, such as isa external keyboard and ps/2-type mouse interfaces. they are kclk, kdat, mclk, and mdat. p26 is inverted and output as kclk. the kclk pin is connected to test0. p27 is inverted and output as kdat. the kdat pin is connected to p10. p23 is inverted and output as mclk. the mclk pin is connected to test1. p22 is inverted and output as mdat. the mdat pin is connected to p11. note: external pull-ups may be required. keyboard power management the keyboard provides support for two power- saving modes: soft powerdown mode and hard powerdown mode. in soft powerdown mode, the clock to the alu is stopped but the timer/counter and interrupts are still active. in hard power down mode the clock to the 8042 is stopped. efforts must be made to reduce power wherever possible! soft powerdown mode this mode is entered by executing a halt instruction. the execution of program code is halted until either reset is driven active or a data byte is written to the dbbin register by a master cpu. if this mode is exited using the interrupt and the ibf interrupt is enabled, then program execution resumes with a call to the interrupt routine, otherwise the next instruction is executed. if it is exited using reset, then a normal reset sequence is initiated and program execution starts from program memory location 0. hard powerdown mode this mode is entered by executing a stop instruction. the oscillator is stopped by disabling the oscillator driver cell. when either reset is driven active or a data byte is written to the dbbin register by a master cpu, this mode will be exited (as above). however, as the oscillator cell will require an initialization time, either reset must be held active for sufficient time to allow the oscillator to stabilise. program execution will resume as above. interrupts the FDC37C93XAPM provides the two 8042 interrupts, ibf and the timer/counter overflow. memory configurations the FDC37C93XAPM provides 2k of on-chip rom and 256 bytes of on-chip ram. register definitions host i/f data register the input data register and output data register are each 8 bits wide. a write to this 8 bit register will load the keyboard data read buffer, set the obf flag and set the kirq output if enabled. a read of this register will read the data from the keyboard data or command write buffer and clear the ibf flag. refer to the kirq and status register descriptions for more information.
140 host i/f status register the status register is 8 bits wide. table 55 shows the contents of the status register. table 55 - status register d7 d6 d5 d4 d3 d2 d1 d0 ud ud ud ud c/d ud ibf obf status register this register is cleared on a reset. this register is read-only for the host and read/write by the FDC37C93XAPM cpu. ud writeable by FDC37C93XAPM cpu. these bits are user-definable. c/d command data this bit specifies whether the input data register contains data or a command (0 = data, 1 = command). during a host data/command write operation, this bit is set to "1" if sa2 = 1 or reset to "0" if sa2 = 0. ibf input buffer full this flag is set to 1 whenever the host system writes data into the input data register. setting this flag activates the FDC37C93XAPM cpu's nibf (mirq) interrupt if enabled. when the FDC37C93XAPM?s cpu reads the input data register (dbb), this bit is automatically reset and the interrupt is cleared. there is no output pin associated with this internal signal. obf output buffer full this flag is set to 1 whenever the FDC37C93XAPM cpu write to the output data register (dbb). when the host system reads the output data register, this bit is automatically reset. external clock signal the FDC37C93XAPM?s x1k clock source is a 12 mhz clock generated from a 14.318 mhz clock. the reset pulse must last for at least 24 16 mhz clock periods. the pulse-width requirement applies to both internally - and externally - generated reset signals. in powerdown mode, the external clock signal on x1k is not loaded by the chip. the FDC37C93XAPM?s x1c clock source must be from a crystal connected across x1c and x2c. due to the low current internal oscillator circuit, this x1c can not be driven by an external clock signal. default reset conditions the FDC37C93XAPM has one source of reset, an external reset via the reset pin. refer to table 56 for the effect of each type of reset on the internal registers.
141 table 56 - resets description hardware reset (reset) kclk weak high kdat weak high mclk weak high mdat weak high host i/f data reg n/a host i/f status reg 00h rtccntrl 80h rtcaddr nc rtcdata nc nc: no change n/a: not applicable gatea20 and keyboard reset the FDC37C93XAPM provides several options for gatea20 and keyboard reset: 8042 software generated gatea20 and kreset, fast gatea20 and kreset (via hardware speed-up) and port 92 fast gatea20 and k reset . port 92 fast gatea20 and keyboard reset port 92 register this port can only be read or written if port 92 has been enabled via bit 2 of the krst_ga20 register (logical device 7, 0xf0) set to 1. this register is used to support the alternate reset (nalt_rst) and alternate a20 (alt_a20) functions. name port 92 location 92h default value 24h attribute read/write size 8 bits
142 table 57 - port 92 register bit function 7:6 reserved. returns 00 when read. 5 reserved. returns a 1 when read. 4 reserved. returns a 0 when read. 3 reserved. returns a 0 when read. 2 reserved. returns a 1 when read. 1 alt_a20 signal control. writing a 0 to this bit causes the alt_a20 signal to be driven low. writing a 1 to this bit causes the alt_a20 signal to be driven high. 0 alternate system reset. this read/write bit provides an alternate system reset function. this function provides an alternate means to reset the system cpu to effect a mode switch from protected virtual address mode to the real address mode. this provides a faster means of reset than is provided by the keyboard controller. this bit is set to a 0 by a system reset. writing a 1 to this bit will cause the nalt_rst signal to pulse acitive (low) for a minimum of 1 s after a delay of 500 ns. before another nalt_rst pulse can be generated, this bit must be written back to a 0. table 58 - ngatea20 8042 p21 alt_a20 system na20m 0 0 0 0 1 1 1 0 1 1 1 1 bit 0 of port 92, which generates the nalt_rst signal, is used to reset the cpu under program control. this signal is and?ed together externally with the reset signal (nkbdrst) from the keyboard controller to provide a software means of resetting the cpu. this provides a faster means of reset than is provided by the keyboard controller. writing a 1 to bit 0 in the port 92 register causes this signal to pulse low for a minimum of 6s after a delay of a minimum of 14s. before another nalt_rst pulse can be generated, bit 0 must be set to 0 either by a system reset of a write to port 92. upon reset, this signal is driven inactive high (bit 0 in the port 92 register is set to 0). the diagram on the following page illustrates the generation of the nalt_rst function. if software control is selected, i.e., bit 0 of krst_ga20 is set to 0, the reset pulse is generated by the 8042 upon writing an fe command to register 64. if hardware speed-up is selected, i.e., bit 0 of krst_ga20 is set to 1, the reset pulse is generated in hardware upon writing an fe command to register 64. in addition, if port 92 is enabled, i.e., bit 2 of krst_ga20 is set to 1, then a pulse is also generated by writing a 1 to bit 0 of the port 92 register and this pulse is anded with the
143 pulse generated above. this pulse is output on pin kreset and its polarity is controlled by the gpi/o polarity configuration. bit 1 of port 92, the alt_a20 signal, is used to force na20m to the cpu low for support of real mode compatible software. this signal is externally or?ed with the a20gate signal from the keyboard controller and cpurst to control the na20m input of the cpu. writing a 0 to bit 1 of the port 92 register forces alt_a20 low. alt_a20 low drives na20m to the cpu low, if a20gate from the keyboard controller is also low. writing a 1 to bit 1 of the port 92 register forces alt_a20 high. alt_a20 high drives na20m to the cpu high, regardless of the state of a20gate from the keyboard controller. upon reset, this signal is driven low. the diagram on the following page illustrates the logic for the generation of the gate a20 signal. 8042 mux pulse gen krst_ga20 bit 0 p92 pulse gen gpi/o polarity config kreset krst_ga20 bit 2 fe command bit 0 p20 krst nalt_rst 6us 14us ~ ~ 6us 14us ~ ~ note: when port 92 is disabled, writes are ignored and reads return undefined values. figure 7 - kreset generation
144 krst_ga20 bit 1 64&naen dd1 dff dfe krst_ga20 bit 0 naen&60 after d1 niow d d[1] ga20 niow a a niow to kreset gen niow 8042 naen&64 niow naen&60 mux krst_ga20 bit 1 cpurst p92 krst_ga20 bit 2 bit 1 alt_a20 gatea20 gpi/o polarity config niow address gatea20 logic trailing edge delay a niow 24mhz vcc delay note: use 64 and 60 or the alternate addresses for command and data ports. dd1 a20gate note: when port 92 is disabled, writes are ignored and reads return undefined values. figure 8 - gatea20 generation logic the timing for a d1 command write followed by a data write is shown on the following page. this is the gatea20 turn-on sequence shown in the table ?gate20 command/data sequence examples?.
145 0ns 250ns 500ns clk aen naen 64=i/o addr n64 niow na dd1 ndd1 ncntl niow' niow+n64 afterd1 nafterd1 60=i/o addr n60 niow+n60=b nafterd1+b d[1] ga20 figure 9 - gate a20 turn-on sequence timing when writing to the command and data port with hardware speedup, the iow timing shown in the figure titled ?iow timing for port 92? in the timing diagrams section is used. this setup time is only required to be met when using hardware speedup; the data must be valid a minimum of 0 nsec from the leading edge of the write and held throughout the entire write cycle.
146 fast gatea20 and keyboard reset gatea20/kreset hardware speed-up the FDC37C93XAPM contains on-chip logic support for the gatea20 and kreset hardware speed-up feature. gatea20 from the chip is part of the control required to mask address line a20 to emulate 8086 addressing. gatea20 and kreset is configured via a byte at f0 in the keyboard configuration space, logical device 7. the byte is defined below. table 59 - gatea20/kreset name reg index description state krst_ga20 0xf0 bits[7:3] reserved bit[2] port 92 select = 0 port 92 disabled = 1 port 92 enabled bit[1] gatea20 select = 0 8042 software control = 1 hardware speed-up bit[0] kreset select = 0 8042 software control = 1 hardware speed-up c when the chip receives a "d1" com mand followed by data (via the host interface), the on- chip hardware copies the value of data bit 1 in the received data field to the gatea20 host latch. it also copies the value of d[0] to kreset latch. at no time during this host- interface transaction will pcobf or the ibf flag (bit 1) in the status register be activated; i.e., this host control of gatea20 is transparent to firmware, with no conse quent degradation of overall system per formance. table 60 details the possible gatea20 sequences and the chip responses. on vcc1 por, gatea20 and kreset pins will float. gatea20 comes from either the software control or hardware speed-up and they are mutually exclusive. if port 92 is enabled, gatea20 from one of these two are merged along with port 92. see port 92 section. kreset comes from either the software control or hardware speed-up and they are mutually exclusive. if port 92 is enabled, kreset from one of these two are merged along with port 92. see port 92 section.
147 table 60 - gatea20 command/data sequence examples sa2 r/w d[0:7] ibf flag gatea20 comments 1 0 1 w w w d1 d[1]=1 ff 0 0 0 q 1 q gatea20 turn-on sequence 1 0 1 w w w d1 d[1]=0 ff 0 0 0 q 0 q gatea20 turn-off sequence 1 1 0 1 w w w w d1 d1 d[1]=1 ff 0 0 0 0 q q 1 q gatea20 turn-on sequence(*) 1 1 0 1 w w w w d1 d1 d[1]=0 ff 0 0 0 0 q q 0 q gatea20 turn-off sequence(*) 1 1 1 w w w d1 xx** ff 0 1 1 q q q invalid sequence notes: "q" indicates the bit remains set at the previous state. *not a standard sequence. **xx = anything except d1. if multiple data bytes, set ibf and wait at state 0. let the software know something unusual happened. for data bytes sa2=0, only d[1] is used; all other bits are don't care. the polarity control bit for gpi/o controls the polarity of gatea20. table 61 below details the possible kreset sequences and the chip responses. table 61 - kreset command/data sequence examples sa2 r/w d[0:7] ibf flag comments 1 w fe 0 pulse kreset when an fe command is received, pulse kreset. kreset is pulsed low for a minimum of 6s pulse width after a minimum of a 14s delay. the polarity control bit for gpi/o controls the polarity of kreset.
148 real time clock the real time clock is a complete time of day clock with two alarms, calendar (up to the year 9999), a programmable periodic interrupt, and a programmable square wave generator. features counts seconds, minutes, and hours of the day. counts days of the week, date, month, year and century. time of day alarm time of century wake-up alarm binary or bcd representation of time, calendar and alarms. three interrupts - each is separately software maskable. (no daylight savings time!) 256 bytes of cmos ram. port definition and description osc crystal oscillator input . maximum clock frequency is 32.768 khz. rtc reset the clock, calendar, or ram functions are not affected by the system reset (reset_drv active). when the reset_drv pin is active (i.e., system reset) and the battery voltage is above 1 volt nominal, the following occurs: 1 . periodic interrupt enable (pie) is cleared to 0. 2 . alarm i nterrupt enable (aie) bit is cleared to 0. 3 . update ended interrupt enable (uie) bit is cleared to 0. 4 . update ended interrupt flag (uf) bit is cleared to 0. 5 . interrupt request status fl ag (irqf) bit is cleared to 0. 6 . periodic interrupt flag (pif) is cleared to 0. 7 . the rtc and cmos registers are not accessable. 8 . alarm interrupt flag (af) is cleared to 0. 9 . nirq pin is in high impedance state. when reset_drv is active and the battery voltage is below 1 volt nominal, the following occurs: 1. registers 00-0d are initialized to 00h. 2. access to all registers from the host or FDC37C93XAPM?s cpu (8042) are blocked .
149 rtc interrupt the interrupt generated by the rtc is an active high output. the rtc interrupt output remains high as long as the status bit causing the interrupt is present and the corresponding interrupt-enable bit is set. activating reset_drv or reading register c clears the rtc interrupt. the rtc interrupt is brought out by programming the rtc primary interrupt select to a non-zero value. if irq 8 is selected then the polarity of this irq 8 output is programmable through a bit in the osc global configuration register. internal registers table 62a shows the address map of the rtc, ten bytes of time, calendar, and alarm 1 data, four control and status bytes and 114 bytes of "cmos" registers. table 62a - real time clock address ma p, bank 0 address register type register function 0 r/w register 0: seconds 1 r/w register 1: seconds alarm 1 2 r/w register 2: minutes 3 r/w register 3: minutes alarm 1 4 r/w register 4: hours 5 r/w register 5: hours alarm 1 6 r/w register 6: day of week 7 r/w register 7: date of month 8 r/w register 8: month 9 r/w register 9: year a r/w register a: b r/w register b: (bit 0 is read only) c r register c: d r register d: e-7f r/w register e-7f: general purpose all 14 bytes are directly writable and readable by the host with the following exceptions: a. registers c and d are read only b. bit 7 of register a is read only c. bits 0 of register b is read only
150 table 62b shows bank 1, the second bank of cmos registers which contains an additional 128 bytes of general purpose cmos registers. all 128 bytes are directly writeable and readable by the host. table 62b - real time clock address map, bank 1 address register type register function 0-7f r/w register 0-7f: general purpose table 62c shows the address map of bank 2, the third bank of cmos registers, which contain the registers for the century byte and the second alarm function. all 9 bytes are directly writable and readable by the host. table 62c - real time clock address map, bank 2 address register type register function 40 r/w register 0: century byte 41 r/w register 1: seconds alarm 2 42 r/w register 2: minutes alarm 2 43 r/w register 3: hours alarm 2 44 r/w register 4: day of week alarm 2 45 r/w register 5: date of month alarm 2 46 r/w register 6: month alarm 2 47 r/w register 7: year alarm 2 48 r/w register 8: control register 1 note: one or two of the three banks of cmos registers are selected via the rtc mode register (logical device 6, 0xf0). banks 1 and 2 are also relocatable via the rtc mode register and the secondary base address (cr62 and cr63). see configuration section. time calendar and alarm the processor program obtains time and calendar information by reading the appropriate locations. the program may initialize the time, calendar and alarm by writing to these locations. the contents of the ten time, calendar and alarm 1 bytes can be in binary or bcd as shown in table 63a. the contents of the century byte and seven alarm 2 bytes can also be in binary or bcd as shown in table 63b. before initializing the internal registers, the set bit in register b should be set to a "1" to prevent time/calendar updates from occurring. the program initializes the ten locations in the binary or bcd format as defined by the dm bit in register b. the set bit may now be cleared to allow updates. the 12/24 bit in register b establishes whether the hour locations represent 1 to 12 or 0 to 23. the 12/24 bit cannot be changed without reinitializing the hour locations. when the 12
151 hour format is selected, the high order bit of the hours byte represents pm when it is a "1". once per second, the ten time, calendar and alarm 1 bytes as well as the century byte and seven alarm 2 bytes are switched to the update logic to be advanced by one second and to check for an alarm condition. if any of these bytes are read at this time, the data outputs are undefined. the update cycle time is shown in table 63. the update logic contains circuitry for automatic end -of -month recognition as well as automatic leap year compensation. the three alarm 1 bytes may be used in two ways. first, when the program inserts an alarm time in the appropriate hours, minutes and seconds alarm locations, the alarm interrupt is initiated at the specified time each day if the alarm enable bit is high. the second usage is to insert a "don't care" state in one or more of three alarm bytes. the "don't care" code is any hexadecimal byte from c0 to ff inclusive. that is the two most significant bits of each byte, when set to "1" create a "don't care" situation. an alarm interrupt each hour is created with a "don't care" code in the hours alarm location. similarly, an alarm is generated every minute with "don't care" codes in the hours and minutes alarm bytes. the "don't care" codes in all three alarm bytes create an interrupt every second.
152 table 63a - time, calendar and alarm 1 bytes add register function bcd range binary range 0 register 0: seconds 00 -59 00 -3b 1 register 1: seconds alarm 00 -59 00 -3b 2 register 2: minutes 00 -59 00 -3b 3 register 3: minutes alarm 00 -59 00 -3b 4 register 4: hours 01 -12 am 01 -0c (12 hour mode) 81 -92 pm 81 -8c (24 hour mode) 00 -23 00 -17 5 register 5: hours alarm 01 -12 am 01 -0c (12 hour mode) 81 -92 pm 81 -8c (24 hour mode) 00 -23 00 -17 6 register 6: day of week 01 -07 01 -07 7 register 7: day of month 01 -31 01 -1f 8 register 8: month 01 -12 01 -0c 9 register 9: year 00 -99 00 -63 table 63b - century byte and alarm 2 bytes address register function decimal range bcd range binary range 40h register 0: century byte 0-99 00-99 00-63 41h register 1: seconds alarm 2 0-59 00-59 00-3b 42h register 2: minutes alarm 2 0-59 00-59 00-3b 43h register 3: hours alarm 2 12-hr mode 1-12 01-12 am 81-92 pm 01-0c am 81-8c pm 24-hr mode 0-23 00-23 00-17 44h register 4: day of week alarm 2 1-7 01-07 01-07 45h register 5: date of month alarm 2 1-31 01-31 01-1f 46h register 6: month alarm 2 1-12 01-12 01-0c 47h register 7: year alarm 2 0-99 00-99 00-63 alarm 2 function alarm 2 can only be used as a wake-up alarm to turn on power to the system when the system is powered off. there are two bits used to control alarm 2. the alarm 2 wake-up function is enabled via the alarm 2 enable bit, al2_en, in the soft power enable register 2. the alarm 2 remember enable bit, al2_rem_en, in the rtc control register 1, is used to power-up the
153 system upon return of power if the alarm 2 time has passed during loss of power. these bits function as follows: if vtr is present: al2_en controls whether or not alarm 2 is enabled as a wake-up function. if al2_en is set and vtr=5v, the npoweron pin will go active (low) when the date/time is equal to the alarm 2 date/time and the power supply will turn on the machine. if vtr is not present: al2_rem_en controls whether or not alarm 2 will power-up the system upon the return of vtr, regardless of the value of al2_en. if al2_rem_en is set and vtr=0 at the date/time that alarm 2 is set for, the npoweron pin will go active (low) as soon as vtr comes back and the machine will power- up. the seven alarm 2 bytes may be used in two ways. first, when the alarm time is written in the appropriate year, month, date, day, hours, minutes, and seconds alarm locations, the alarm interrupt is initiated at the specified time on the day of the week, on the date of the month, in the year if the alarm 2 enable bit is high. the second usage is to insert a ?don?t care? state into one or more of the alarm bytes. the ?don?t care? code is any hexadecimal byte from c0 to ff inclusive. that is, the two most significant bits of each byte, when set to ?1? create a ?don?t care? situation. an alarm is generated each year if the year byte is set to a ?don?t care? condition. similarly, an alarm is generated every month with ?don?t care? codes in the year and month bytes. an alarm is generated on every day of every month of every year with ?don?t care? codes in the year, month, date of month and day of week bytes. an alarm is generated each hour, every day of the month, every month, every year when the ?don?t care? code is set in the year, month, date, day and hours alarm byte. an alarm is generated every minute with ?don?t care? codes in the year, month, date, day, hours and minutes alarm bytes. the ?don?t care? codes in all seven alarm bytes creates an interrupt every second. as a final example, an alarm is generated every one of a certain day of the week, i.e., every friday, by specifying the ?don?t care? code in the year, month and date of month bytes. update cycle an update cycle is executed once per second if the set bit in register b is clear and the dv0 -dv2 divider is not clear. the se t bit in the "1" state permits the program to initialize the time and calendar bytes by stopping an existing update and preventing a new one from occurring. the primary function of the update cycle is to increment the seconds byte, check for overflow, increment the minutes byte when appropriate and so forth through to the year of the century byte. the update cycle also compares each alarm byte with the corresponding time byte and issues an alarm if a match or if a "don't care" code is present. the length of an update cycle is shown in table 58. during the update cycle the time, calendar and alarm bytes are not accessible by the processor program. if the processor reads these locations before the update cycle is complete the output will be undefined. the uip (update in progress) status bit is set during the interval. when the uip bit goes high, the update cycle will begin 244 us later. therefore, if a low is read on the uip bit the user has at least 244 m s before time/calendar data will be changed.
154 table 64 - update cycle time input clock frequency uip bit update cycle time minimum time update cycle 32.768 khz 32.768 khz 1 0 1948 m s - - 244 m s control and status registers, bank 0 bank 0 of the rtc has four registers which are accessible to the processor program at all times when bank 0 is enabled, even during the update cycle. register a (ah) msb lsb b7 b6 b5 b4 b3 b2 b1 b0 uip dv2 dv1 dv0 rs3 rs2 rs1 rs0 uip the update in progress bit is a status flag that may be monitored by the program. when uip is a "1" the update cycle is in progress or will soon begin. when uip is a "0" the update cycle is not in progress and will not be for at least 244us. the time, calendar, and alarm information is fully available to the program when the uip bit is zero. the uip bit is a read only bit and is not affected by reset_drv . writing the set bit in register b to a "1" inhibits any update cycle and then clears the uip status bit. the uip bit is only valid when the rtc is enabled. refer to table 64. dv2-0 three bits are used to permit the program to select various conditions of the 22 stage divider chain. table 65 shows the allowable combinations. the divider selection bits are also used to reset the divider chain. when the time/calendar is first initialized, the program may start the divider chain at the precise time stored in the registers. when the divider reset is removed the first update begins one -half second later. these three read/write bits are not affected by reset_drv . rs3-0 the four rate selection bits select one of 15 taps on the divider chain or disable the divider output. the selected tap determines rate or frequency of the periodic interrupt. the program may enable or disable the interrupt with the pie bit in register b. table 66 lists the periodic interrupt rates and equivalent output frequencies that may be chosen with the rs0 -rs3 bits. these four bits are read/write bits which are not affected by reset_drv.
155 table 65 - divider selection bits register a bits oscillator frequency dv2 dv1 dv0 mode 32.768 khz 32.768 khz 32.768 khz 32.768 khz 32.768 khz 0 0 0 0 1 1 0 0 1 1 0 1 0 1 0 1 x x oscillator disabled oscillator disabled normal operate test test reset driver table 66 - periodic interrupt rates rate select 32.768 khz time base rs3 rs2 rs1 rs0 period rate of interrupt frequency of interrupt 0 0 0 0 0.0 0 0 0 1 3.90625 ms 256 hz 0 0 1 0 7.8125 ms 128 hz 0 0 1 1 122.070 us 8.192 khz 0 1 0 0 244.141 us 4.096 khz 0 1 0 1 488.281 us 2.048 khz 0 1 1 0 976.562 us 1.024 khz 0 1 1 1 1.953125 ms 512 hz 1 0 0 0 3.90625 ms 256 hz 1 0 0 1 7.8125 ms 128 hz 1 0 1 0 15.625 ms 64 hz 1 0 1 1 31.25 ms 32 hz 1 1 0 0 62.5 ms 16 hz 1 1 0 1 125 ms 8 hz 1 1 1 0 250 ms 4 hz 1 1 1 1 500 ms 2 hz
156 register b (bh) msb lsb b7 b6 b5 b4 b3 b2 b1 b0 set pie aie uie res dm2 24/12 dse set when the set bit is a "0", the update functions normally by advancing the counts once per second. when the set bit is a "1", an update cycle in progress is aborted and the program may initialize the time and calendar bytes without an update occurring in the middle of initialization. set is a read/write bit which is not modified by reset_drv or any internal functions. pie the periodic interrupt enable bit is a read/write bit which allows the periodic -interrupt flag (pf) bit in register c to cause the irqb port to be driven low. the program writes a "1" to the pie bit in order to receive periodic interrupts at the rate specified by the rs3 -rs0 bits in register a. a zero in pie blocks irqb from being initiated by a periodic interrupt, but the periodic flag (pf) is still set at the periodic rate. pie is not modified by any internal function, but is cleared to "0" by a reset_drv. aie the alarm interrupt enable bit is a read/write bit, which when set to a "1" permits the alarm flag (af) bit in register c to assert irqb. an alarm interrupt occurs for each second that the three time bytes equal the three alarm bytes (including a "don't care" alarm code of binary 11xxxxxx). when the aie bit is a "0", the af bit does not initiate an irqb signal. the reset_drv port clears aie to "0". the aie bit is not affected by any internal functions. uie the update -ended interrupt enable bit is a read/write bit which enables the update -end flag (uf) bit in register c to assert irqb. the reset_drv port or the set bit going high clears the uie bit. res reserved - read as ?0?. dm the data mode bit indicates whether time and calendar updates are to use binary or bcd formats. the dm bit is written by the processor program and may be read by the program, but is not modified by any internal functions or by reset_drv. a "1" in dm signifies binary data, while a "0" in dm specifies bcd data. 24/12 the 24/12 control bit establishes the format of the hours byte as either the 24 hour mode if set to a "1", or the 12 hour mode if cleared to a "0". this is a read/write bit which is not affected by reset_drv or any internal function. dse the daylight savings enable bit is read only and is always set to a "0" to indicate that the daylight savings time option is not available.
157 register c (ch) - read only register msb lsb b7 b6 b5 b4 b3 b2 b1 b0 irqf pf af uf 0 0 0 0 irqf the interrupt request flag is set to a "1" when one or more of the following are true: pf = pie = 1 af = aie = 1 uf = uie = 1 any time the irqf bit is a "1", the irqb signal is driven low. all flag bits are cleared after register c is read or by the reset_drv port. pf the periodic interrupt flag is a read-only bit which is set to a "1" when a particular edge is detected on the selected tap of the divider chain. the rs3 -rs0 bits establish the periodic rate. pf is set to a "1" independent of the state of the pie bit. pf being a "1" sets the irqf bit and initiates an irqb signal when pie is also a "1". the pf bit is cleared by reset_drv or by a read of register c. af the alarm interrupt flag when set to a "1" indicates that the current time has matched the alarm time. a "1" in af causes a "1" to appear in irqf and the irqb port to go low when the aie bit is also a "1". a reset_drv or a read of register c clears the af bit. uf the update -ended interrupt flag bit is set after each update cycle. when the uie bit is also a "1", the "1" in uf causes the irqf bit to be set and asserts irqb. a reset_drv or a read of register c causes uf to be cleared. b3-0 the unused bits of register c are read as zeros and cannot be written.
158 register d (dh) read only register msb lsb b7 b6 b5 b4 b3 b2 b1 b0 vrt 0 0 0 0 0 0 0 vrt when a "1", this bit indicates that the contents of the rtc are valid. a "0" appears in the vrt bit when the battery voltage is low. the vrt bit is read only bit which can only be set by a read of register d. refer to power management for the conditions when this bit is reset. the processor program can set the vrt bit when the time and calendar are initialized to indicate that the time is valid. b6:b0 the remaining bits of register d are read as zeros and cannot be written. register eh-ffh: general purpose registers eh-ffh are general purpose cmos registers. these registers can be used by the host or 8042 and are fully available during the time update cycle. the contents of these registers are preserved by the battery power. interrupts the rtc includes three separate fully- automatic sources of interrupts to the processor. the alarm interrupt may be programmed to occur at rates from one -per -second to one -a -day. the periodic interrupt may be selected for rates from half -a -second to 122.070 m s. the update ended interrupt may be used to indicate to the program that an update cycle is completed. each of these independent interrupts are described in greater detail in other sections. the processor program selects which interrupts, if any, it wishes to receive by writing a "1" to the appropriate enable bits in register b. a "0" in an enable bit prohibits the irqb port from being asserted due to that interrupt cause. when an interrupt event occurs a flag bit is set to a "1" in register c. each of the three interrupt sources have separate flag bits in register c, which are set independent of the state of the corresponding enable bits in register b. the flag bits may be used with or without enabling the corresponding enable bits. the flag bits in register c are cleared (record of the interrupt event is erased) when register c is read. double latching is included in register c to ensure the bits that are set are stable throughout the read cycle. all bits which are high when read by the program are cleared, and new interrupts are held until after the read cycle. if an interrupt flag is already set when the interrupt becomes enabled, the irqb port is immediately activated, though the interrupt initiating the event may have occurred much earlier. when an interrupt flag bit is set and the corresponding interrupt -enable bit is also set, the irqb port is driven low. irqb is asserted as long as at least one of the three interrupt sources has its flag and enable bits both set. the irqf bit in register c is a "1" whenever the irqb port is being driven low.
159 control registers, bank 2 bank 2 of the rtc has one control register. control register 1 default is 0; cleared upon vbat por. this register is battery backed-up. d7 d6 d5 d4 d3 d2 d1 d0 0 0 0 0 0 vtr_por _en 0 al2_rem _en al2_rem_en - one of the two control bits for the alarm 2 wakeup function; it is the ?remember? enable bit for the second alarm. this bit, if set to 1, wil cause the system to power-up upon return of power if the alarm 2 time has passed during loss of power. it is only applicable when vtr=0. this bit is independent of the other control bit for the alarm 2 wake-up function, al2_en (bit 4 of the soft power enable register 2) which controls alarm 2 when vtr=5v. see the alarm 2 function section for more information. the function of bit 0 is summarized as follows: if al2_rem_en is set and vtr=0 at the date/time that alarm 2 is set for, the npoweron pin will go active (low) and the machine will power-up as soon as vtr comes back. vtr por - the enable bit for vtr por. if vtr_por_en is set, the npoweron pin will go active (low) and the machine will power-up as soon as a vtr por occurs. frequency divider the rtc has 22 binary divider stages following the clock input. the output of the divider is a 1 hz signal to the update -cycle logic. the divider is controlled by the three divider bits (dv3 -dv0) in register a. as shown in table 65 the divider control bits can select the operating mode or be used to hold the divider chain reset which allows precision setting of the time. when the divider chain is changed from reset to the operating mode, the first update cycle is one -half second later. the divider control bits are also used to facilitate testing of the rtc. periodic interrupt selection the periodic interrupt allows the irqb port to be triggered from once every 500 ms to once every 122.07 m s. as table 66 shows, the periodic interrupt is selected with the rs0 -rs3 bits in register a. the periodic interrupt is enabled with the pie bit in register b.
160 power supply operational modes note: see the operational description section for the power supply operational modes. power management the ramd signal controls all bus inputs to the rtc and ram (niow, nior, reset_drv). when asserted, it disallows any modification of the rtc and ram data by the host or 8042. ramd is asserted whenever: v cc is below 4.0 volts nominal. when the vtr voltage drops below the battery voltage, the rtc switches to battery power. when vtr rises above the battery voltage, the rtc switches back to vtr power. when the v cc voltage drops below 4.0 volts nominal, all inputs are locked out so that the internal registers cannot be modified by the system. this lockout condition continues for 62 msec (min) to 125 msec (max) after the system power has been restored. the 62 msec lockout does not occur under the following conditions: 1 . the divider chain controls (bi ts 6-4) are in any mode but normal operation ("010"). 2 . the vrt bit is a "0". 3 . when battery voltage is below 1 volt nominal and reset_drv is a "1". this will also initialize all registers 00-0d to a "00". to minimize power consumption, the oscillator is not operational under the following conditions: 1. the divider chain controls (bits 6-4) are in oscillator disabled mode (000, or 001). 2. if vtr and v cc =0 and the battery power is removed and then re-applied (a new battery is installed) the following occurs: a . the oscillator is disabled immediately. b . initialize all registers 00-0d to a "00" when v cc is applied. if the battery voltage is between 1 volt nominal and 2.4 volt nominal when v cc is applied: 1. clear vrt bit to "0". maintain all other rtc bits in the state as before v cc was applied v cc hyster battery register access <4.0 1 1 n >4.0 0 x y hyster=1 implie s that v cc <4.0 volts +/-0.25v; hyster=0 implies that v cc >4.0 volts +/-0.25v.
161 soft power management the FDC37C93XAPM employs soft power management to allow the chip to enter low power mode and to provide a variety of wakeup events to power up the chip. this technique allows for software control over powerdown and wakeup events. in low power mode, the chip runs off of the trickle voltage, vtr, which is 5 volts at 2ma maximum. in this mode, the chip is ready to power up from either the power button or from one of a number of wakeup events including pressing a key, touching the mouse or receiving data from one of the uarts. the alarm can also be set to power up the system at a predetermined time to perform one or more tasks. the implementation of soft power management is illustrated in figure 11. a high to low transition on the button input or on any of the enabled wakeup events (spx) causes the npoweron output to go active low which turns on the main power supply. even if the power supply is completely lost (i.e., vtr is not present) the power supply can still be turned on upon the return of vtr by an alarm 2 event that has already passed (if the alarm 2 remember bit is enabled) or by a vtr power on reset (if the vtr por bit is enabled). these bits are described in the rtc section. the button input can be used to turn off the power supply after a debounce delay. the power supply can also be turned off under software control (via a write to register wdt_ctrl with bit 7 set).
162 figure 11 - soft power management functional diagram note 1: all soft power management functions run off of vtr. when vtr is present, it supplies power to the rtc. when vtr is not present, vbat supplies power to the rtc and flip flop 1. note 2: flip flop 1 is battery backed-up so that it returns the last valid state of the machine. note 3: a battery backed-up enable bit in the alarm control register can be set to force flip flop 1 in the soft power management circuit to come up ?on? if an alarm occurred when vtr was not present. this is gated into wakeup circuitry. refer to the al2_rem_en bit description in the rtc control register section for more information. en1 enx d q clr soft power mangement button input sp1 spx open collector type output soft power off a transition on the button input or on any enabled spx inputs causes the npoweron output to go active low. a low pulse on the soft power off signal causes the npoweron bit to float. npoweron ed;pg = edge detect, pulse generator ed;l = edge detect and latch vtr nspoff1 nspoff1 nspoff1 ed; pg ed; l ed; l alarm 2 off_en nspoff1 nspoff delay1 off_dly delay2 nbint off_dly logic l button v bat por al2_rem_en flip flop 1 vtr por vtr_por_en logic logic override timer pwrbtnor_sts pwrbtnor_en
163 registers the following registers can be accessed when in configuration mode at logical device 8, registers b0-b3, b8 and f4, and when not in configuration they can be accessed through the index and data register. soft power enable registers soft power enable register 1 (configuration register b0, logical device 8) this register contains the enable bits for the wake-up function of the npoweron bit. when enabled, these bits allow their corresponding function to turn on power to the system. soft power enable register 2 (configuration register b1, logical device 8) this register contains additional enable bits for the wake-up function of the npoweron bit. when enabled, these bits allow their corresponding function to turn on power to the system. it also contains off_en: after power up, this bit defaults to 1, i.e., enabled. this bit allows the software to enable or disable the button control of power off. soft power status registers soft power status register 1 (configuration register b2, logical device 8) this register contains the status for the wake-up events. note: the status bit gets set if the wakeup event occurs, whether or not it is enabled as a wakeup function by setting the corresponding bit in soft power enable register 1. however, only the enabled wakeup functions will turn on power to the system. soft power status register 2 (configuration register b3, logical device 8) this register contains additional status for the wake-up events. note: the status bit gets set if the wakeup event occurs, whether or not it is enabled as a wakeup function by setting the corresponding bit in soft power enable register 2. however, only the enabled wakeup functions will turn on power to the system. soft power control registers wdt_ctrl (configuration register f4, logical device 8) this register is used for soft power management and watchdog timer control. bits[7:5] are for soft power management: spoff, restart_cnt, stop_cnt. delay 2 time set register (configuration register b8, logical device 8) this register is used to set delay 2 to value from 500msec to 32sec. the default value is 500msec.
164 the power button has an override event as required by the acpi specification. if the user presses the power button for more than four seconds while the system is in the working state, a hardware event is generated and the system will transition to the off state. there are status and enable bits associated with this feature in the pm1_blk registers. see the acpi section. this override event utilizes power button logic to determine that the power button (button_in) has been pressed for more that four seconds. the override enable/disable bit, pwrbtnor_en, allows this override function to be turned on/off. if enabled, this override event will result in setting the override status bit, pwrbtnor_sts (to be cleared by writing a 1 to its bit position - writing a 0 has no effect), clearing the regular button status bit, pwrbtn_sts, and generating an event to be routed into the soft power management logic to turn off the system. the override status bit alerts the system upon power-up that an override event was used to power down the system, and will be used to properly power-up the system. figure 11 shows the soft power management logic with the override timer path from the button input. the override timer counts while the button is held (in the present implementation this would be when the button input is high) and is cleared upon release of the button. it has a 0.5 second or faster resolution (run off of the 32khz clock divided down) and the minimum time for triggering the override power down is four seconds, with a maximum of 4.5 seconds. the timer output will pulse the clear on the flip flop 1. figure 12 illustrates the timing of the blanking period relative to button_in and npoweron for the override event. figure 12 - blanking period button_in npoweron blanking period v cc 4+ sec release sec 4 sec 4
165 system management interrupt (smi) the FDC37C93XAPM implements a group nsmi output pin. the system management interrupt is a non-maskable interrupt with the highest priority level used for transparent power management. the nsmi group interrupt output consists of the enabled interrupts from each of the functional blocks in the chip. the interrupts are enabled onto the group nsmi output via the smi enable registers 1 and 2. the nsmi output is then enabled onto the group nsmi output pin via bit[7] in the smi enable register 2. the logic equation for the nsmi output is as follows: nsmi = (en_ide1 and irq_ide1) or (en_pint and irq_pint) or (en_u2int and irq_u2int) or (en_u1int and irq_u1int) or (en_fint and irq_fint) or (en_gpint2 and irq_gpint2) or (en_gpint1 and irq_gpint1) or (en_wdt and irq_wdt) or (en_mint and irq_mint) or (en_kint and irq_kint) or (en_irint and irq_irint) or (en_bint and irq_bint) or (en_abint and irq_abint) registers the following registers can be accessed when in configuration mode at logical device 8, registers b4-b7 and when not in configuration they can be accessed through the index and data register. smi enable registers smi enable register 1 (configuration register b4, logical device 8) this register is used to enable the different interrupt sources onto the group nsmi output. smi enable register 2 (configuration register b5, logical device 8) this register is used to enable additional interrupt sources onto the group nsmi output. this register is also used to enable the group nsmi output onto the nsmi gpi/o pin and the routing of 8042 p12 internally to nsmi. smi status registers smi status register 1 (configuration register b6, logical device 8) this register is used to read the status of the smi input events. note: the status bit gets set whether or not the interrupt is enabled onto the group smi output. smi status register 2 (configuration register b7, logical device 8) this register is used to read the status of the smi input events. note: the status bit gets set whether or not the interrupt is enabled onto the group smi output.
166 access.bus the FDC37C93XAPM supports access.bus. access.bus is a serial communication protocol between a computer host and its peripheral devices. it provides a simple, uniform and inexpensive way to connect peripheral devices to a single computer port. a single access.bus on a host can accommodate up to 125 peripheral devices. the access.bus protocol includes a physical layer based on the i 2 c serial bus developed by philips, and several software layers. the software layers include the base protocol, the device driver interface, and several specific device protocols. for a description of the access.bus protocol, please refer to the access.bus specifications version 2.2, february 1994, available from the access.bus industry group. the access.bus interface is based on the pdc8584 controller. the registers are mapped into the isa i/o register space as set by the configuration registers. the addresses for the registers are shown in table 67. table 67 - access.bus register addresses address* register base+0 control/status base+1 own address base+2 data base+3 clock note 1: base i/o range: [0x00:0x0ffc] on 4 byte boundaries registers the access.bus interface has four internal register locations. two of these, own address register s0 and clock register s2, are used for initialization of the chip. normally they are only written once directly after resetting of the chip. the other two registers, the data shift register s0 and the control/status register s1 (which functions as a double register), are used during actual data transmission/reception. register s0 performs all serial-to-parallel interfacing with the access.bus. register s1 contains access.bus status information required for bus access and or monitoring. access.bus control/status register s1 the control/status register controls the access.bus operation and provides status information. this register has separate read and write functions for all bit positions. the write- only section provides register access control and control over access.bus signals, while the read-only section provides access.bus status information.
167 table 68 - access.bus control/status register s1: control d7 d6 d5 d4 d3 d2 d1 d0 r/w w w w w w w w w bit def pin es0 reserved reserved eni sta sto ack status d7 d6 d5 d4 d3 d2 d1 d0 r/w r r r r r r r r bit def pin 0 sts ber lrb aas lab nbb bit definitions register s1 control section the write-only section of s1 enables access to registers s0, s0?, s1 and s2, and controls access.bus operation. bit 7: pin pending interrupt not. when the pin bit is written with a logic 1, all status bits are reset to logic 0, with the exception of pin which is set to 1, and nbb which is not affected. this may serve as a software reset function. bit 6: eso enable serial output. eso enables or disables the serial access.bus i/o. when eso is high, access.bus communication is enabled; communication with serial shift register s0 is enabled and the s1 bus status bits are made available for reading. with eso = 0, bits eni, sta, sto and ack of s1 can be read for test purposes. bits 5 and 4: reserved bit 3: eni this bit enables the internal interrupt, nint, which is generated when the pin bit is active (logic ?0?). bits 2 and 1: sta and sto these bits control the generation of the access.bus start condition and transmission of slave address and r/nw bit, generation of repeated start condition, and generation of the stop condition (see table 69) table 69 - instruction table for serial bus control sta sto present mode function operation 1 0 slv/rec start transmit start+address, remain mst/trm if r/nw=0; go to mst/rec if r/nw=1 1 0 mst/trm repeat start same as for slv/rec 0 1 mst/rec; mst/trm stop read; stop write transmit stop go to slv/rec mode; note 1 1 1 mst data chaining send stop, start and address after last master frame without stop sent; note 2 0 0 any nop no operation; note 3
168 note 1: in master receiver mode, the last byte must be terminated with ack bit high (?negative acknowledge?) note 2: if both sta and sto are set high simultaneously in master mode, a stop condition followed by a start condition + address will be generated. this allows ?chaining? of transmissions without relinquishing bus control. note 3: all other sta and sto mode combinations not mentioned in table 69 are nops. bit 0: ack this bit must be set normally to logic ?1?. this causes the access.bus to send an acknowledge automatically after each byte (this occurs during the ninth clock pulse) . the bit must be reset (to logic 0) when the access.bus controller is operating in master/receiver mode and requires no further data to be sent from the slave transmitter. this causes a negative acknowledge on the access.bus, which halts further transmission from the slave device. register s1 status section the read-only section of s1 enables access to access.bus status information. bit 7: pin (pending interrupt not) this bit is a status flag which is used to synchronize serial communication and is set to logic ?0? whenever the chip requires servicing. the pin bit is normally read in polled applications to determine when an access.bus byte transmission/reception is completed. each time a serial data transmission is initiated (by setting the sta bit in the same register) the pin bit will be set to logic ?1? automatically (inactive). when acting as transmitter, pin is also set to logic ?1? (inactive) each time s0 is written. in receiver mode, the pin bit is automatically set to logic ?1? each time the data register s0 is read. after transmission or reception of one byte on the access.bus (9 clock pulses, including acknowledge) the pin bit will be automatically reset to logic ?0? (active) indicating a complete byte transmission/reception. when the pin bit is subsequently set to logic ?1? (inactive), all status bits will be reset to ?0? on a ber (bus error) condition. in polled applications, the pin bit is tested to determine when a serial transmission/reception has been completed. when the eni bit (bit 4 of write-only section of register s1) is also set to logic 1 the hardware interrupt is enabled. in this case, the pi flag also triggers and internal interrupt (active low) via the nint output each time pin is reset to logic ?0?. when acting as a slave transmitter or slave receiver, while pin=?0?, the chip will suspend access.bus transmission by holding the scl line low until the pin bit is set to logic ?1? (inactive). this prevents further data from being transmitted or received until the current data byte in s0 has been read (when acting as slave receiver) or the next data byte is written to s0 (when acting as slave transmitter). pin bit summary: the pin bit can be used in polled applications to test when a serial transmission has been completed. when the eni bit is also set, the pin flag sets the internal interrupt via the nint output. setting the sta bit (start bit) will set pin=?1? (inactive). in transmitter mode, after successful transmission of one byte on the access.bus the pin bit will be
169 automatically reset to logic ?0? (active) indicating a complete byte transmission. in transmitter mode, pin is set to logic ?1? (inactive) each time register s0 is written. in receiver mode, pin is set to logic ?0? (inactive) on completion of each received byte. subsequently, the scl line will be held low until pin is set to logic ?1?. in receiver mode, when register s0 is read, pin is set to logic ?1? (inactive). in slave receiver mode, an access.bus stop condition will set pin=?0? (active). pin= ?0? if a bus error (ber) occurs. bit 6: logic 0 bit 5: sts when in slave receiver mode, this flag is asserted when an externally generated stop condition is detected (used only in slave receiver mode). bit 4: ber bus error; a misplaced start or stop condition has been detected. resets nbb (to logic ?1?; inactive), sets pin= ?0? (active). bit 3: lrb/ad0 last received bit or address 0 (general call) bit. this status bit serves a dual function, and is valid only while pin= ?0?. 1. lrb holds the value of the last received bit over the access.bus while aas=?0? (not addressed as slave). normally this will be the value of the slave acknowledgment; thus checking for slave acknowledgment is done via testing of the lrb. 2. ado; when aas=?1? (addressed as slave condition) the access.bus controller has been addressed as a slave. under this condition, this bit becomes the ad0 bit and will be set to logic ?1? if the slave address received was the ?general call? (00h) address, or logic ?0? if it was the access.bus controller?s own slave address. bit 2: aas addressed as slave bit. valid only when pin=?0?. when acting as slave receiver, this flag is set when an incoming address over the access.bus matches the value in own address register s0? (shifted by one bit) or if the access.bus ?general call? address (00h) has been received (?general call? is indicated when ad0 status bit is also set to logic ?1?). bit 1: lab lost arbitration bit. this bit is set when, in multi-master operation, arbitration is lost to another master on the access.bus. bit 0: nbb bus busy bit. this is a read-only flag indicating when the access.bus is in use. a ?0? indicates that the bus is busy and access is not possible. this bit is set/reset (logic ?1?/logic ?0?) by start/stop conditions.
170 own address register s0? when the chip is addressed as slave, this register must be loaded with the 7-bit access.bus address to which the chip is to respond. during initialization, the own address register s0? must be written to, regardless whether it is later used. the addressed as slave (aas) bit in status register s1 is set when this address is received (the value in s0 is compared with the value in s0?). note that the s0 and s0? registers are offset by one bit; hence, programming the own address register s0? with a value of 55h will result in the value aah being recognized as the chip?s access.bus slave address. after reset, s0? has default address 00h. d7 d6 d5 d4 d3 d2 d1 d0 r/w r/w r/w r/w r/w r/w r/w r/w reserved slave address 6 slave address 5 slave address 4 slave address 3 slave address 2 slave address 1 slave address 0 data shift register s0 register s0 acts as serial shift register and read buffer interfacing to the access.bus. all read and write operations to/from the access.bus are done via this register. access.bus data is always shifted in or out of shift register s0. in receiver mode the access.bus data is shifted into the shift register until the acknowledge phase. further reception of data is inhibited (scl held low) until the s0 data shift register is read. in the transmitter mode data is transmitted to the access.bus as soon as it is written to the s0 shift register if the serial i/o is enabled (eso=1). d7 d6 d5 d4 d3 d2 d1 d0 r/w r/w r/w r/w r/w r/w r/w r/w
171 clock register s2 register s2 controls the selection of the internal chip clock frequency used for the access.bus block. this determines the scl clock frequency generated by the chip. the selection is made via bits[2:0] (see table 70). d7 d6 d5 d4 d3 d2 d1 d0 r r/w ab rst reserved see table 70 default = 00 at hard reset and power on reset. bit 7: ab_rst access.bus reset bit. this bit resets the entire access.bus block. not self-clearing, must be written high and then written low. table 70 - internal clock rates and access.bus data rates in the FDC37C93XAPM access bus clock register d[2:0] clock rate data rate nominal high nominal low minimum high 000 off 001 12mhz 50khz 8 m s 12 m s 4 m s 010 14.318 mhz 60khz 6.7 m s 10.1 m s 4 m s 011 16mhz 67khz 6 m s 9 m s 4 m s 100 24mhz 100khz 4 m s 6 m s 4 m s 101 110
172 advanced configuration and power interface the FDC37C93XAPM supports the advanced configuration and power interface (acpi) as described in this section. legacy/acpi select capability this capability consists of an smi/sci switch which is required if the system supports both legacy and acpi power management models. this is due to the fact that the system software for legacy power management consists of the smi interrupt handler while for acpi it consists of the acpi driver (sci interrupt handler). this support uses logical device a at 0x0a to hold the address pointers to the acpi power management register block, pm1_blk, and the miscellaneous register block, msc_blk. these are run-time registers. contained in the msc_blk are sci enable and status registers which will allow the smi interrupt events to be enabled as sci interrupt events. included in the pm1_blk is an enable bit to allow the sci group interrupt to be switched out to sci interrupt 13 (pin 97, irq13) or routed to one of the dedicated interrupts. the software power management events (those that generate an smi in legacy mode and an sci in acpi mode) are controlled by the en_smi and sci_en bits. for legacy power management, the en_smi bit is used; if set, it routes the power management events to the smi interrupt logic. for acpi power management, the sci_en bit is used; if set, it routes the power management events to the sci interrupt logic. the sci enable bit, sci_en, is located in the pm1_cntrl register, bit 0. this bit is used in conjunction with en_smi, bit 7 of the smi enable register 2, to enable either sci or smi (or both). the sci enable and status registers are run- time registers which have the same interrupt event enable and status bits as the smi registers. the sci registers are contained in the msc_blk. logical device a will hold the address pointers to the acpi power management register block, pm1_blk, and the miscellaneous register block, msc_blk. the sci pin is the second alternate function added to pin 97, with the resulting pin having the multiple functions gp11/irqin/irq13. the configuration register for this pin (0xe1) allows polarity control and selection of open collector for this interrupt. the nsmi output pin is the second alternate function of pin 31 in the FDC37C93XAPM. the sci interrupt can be routed to any of the dedicated interrupt request pins, irq[1,3:15]. the sci interrupt is active low open collector for all of these irq pins. note that the sci interrupt is the only one routed to irq13 and its polarity and output type is selected through configuration register 0xe1. global status and bios status figure 13 shows the process of generating an interrupt from smi to sci and sci to smi. this figure shows the bits involved in this process. the gbl_en, gbl_sts and gbl_rls bits are located in the pm1_blk registers. the bios_rls, bios_en and bios_sts bits are located in the misc_blk registers. these bits are described below. the bios_rls bit is used by the bios to raise an event to the acpi software. gbl_en and gbl_sts are the corresponding enable and status bits used by acpi software to control its ability to receive sci events. setting bios_rls sets gbl_sts. if gbl_en is set and bios_rls is set an sci is raised. bios_rls is
173 set by writing ?1? to its bit location; it is cleared by writing a ?1? to the gbl_sts bit. writing a ?0? to bios_rls has no effect. writing a ?0? to gbl_sts has no effect. the gbl_rls bit is used by the acpi software to raise an event to the bios. bios_en and bios_sts are the corresponding enable and status bits used by the bios to control its ability to receive acpi events. setting gbl_rls sets bios_sts. if bios_en is set and gbl_rls is set an smi is raised. gbl_rls is set by writing a ?1? to its bit location; it is cleared by writing a ?1? to the bios_sts bit. writing a ?0? to gbl_rls has no effect. writing a ?0? to bios_sts has no effect. bios_rls gbl_en to smi logic bios_sts gbl_rls bios_en smi to sci sci to smi to sci logic gbl_sts clears clears sticky status bit. this bit is set by a hardware signal assertion high. cleared by software writing a one to its bit position. latched on trailing edge of write strobe. enable bit. software writing this bit high or low will result in the bit being read as high or low. symbol definition figure 13 - process of generating an interrupt from smi to sci and sci to smi
174 bus master the bus master event logic is shown in figure 14. the bm_rld and bm_sts bits are located in the pm1_blk and bm_cntrl is located in the msc_blk. these bits are described below. setting bm_cntrl sets bm_sts. if bm_rld is set and bm_cntrl is set, an sci is raised. bm_cntrl is set by writing a 1 to its bit location; it is cleared by writing a ?1? to the bm_sts bit. writing a ?0? to bm_cntrl has no effect. writing a ?0? to bm_sts has no effect. figure 14 - bus master sci event logic bm_cntrl bm_rld sci bm_sts clears
175 power management timer this is a 24-bit free running timer that is required for acpi compliance. the power management timer provides an accurate time function while the system is in the working state. this feature is a 24-bit counter which runs off of a 3.579545 mhz clock. to allow software to extend the number of bits in the timer, the power management timer generates an sci interrupt (if enabled) when the last bit of the timer changes from 0 to 1 or 1 to 0. the implementation also includes a timer enable bit and a timer status bit. three additional registers are used to read the timer value. figure 15 shows the power management timer functional diagram. 24-bit counter 3.5795454mhz 24 tmr_val tmr_en tmr_sts tmr_pme tmr_on_off figure 15 - power management timer this circuit has an enable/disable bit to turn the timer on/off (tmr_on_off, msc_en register, bit 1). the default of this bit is disabled (off). it also has a status bit, tmr_sts (pm1_sts register, bit 0), which is set when the timer changes from 0 to 1 or 1 to 0 and is cleared by writing a 1 to its bit location (writing a 0 has no effect). in addition, it has a bit (tmr_en, pm1_en register, bit 0) to enable the power management event, tmr_pme, as an sci event. the default of this enable/disable bit is disabled. the three bytes used to read the 24 bit timer value, tmr_val, are located in the pm1_tmr register at bits 0-23. note: reading the lower byte of the timer value latches the value in the other 2 bytes. reading any byte other than the lower byte first won?t latch the other 2 bytes, and the data read will be the previous latched data.
176 power button override event the power button has an override event as required for acpi compliance. see the soft power management section. if the user presses the power button for more than four seconds while the system is in the working state, a hardware event is generated and the system will transition to the off state. there are status and enable bits associated with this feature in the pm1_blk registers. rtc alarm the acpi specification requires that the rtc alarm generate a hardware wake-up event from the sleeping state. the extended rtc alarm 2 event can be enabled as both an smi and an sci event. there is a bit in the smi enable register 2 and the smi status register 2 to enable the rtc alarm 2 event as an smi interrupt and to read its status. the status bit is set when the rtc generates an alarm event and is cleared by writing a ?1? to this bit (writing a ?0? has no effect). when the rtc generates an alarm event, the rtc_sts bit will be set. if the rtc_en bit is set, an rtc hardware power management event will be generated. the rtc_en bit will be located at bit 6 of the smi enable register 2, logical device 8, 0xb5. the rtc_sts bit will be located at bit 6 of the smi status register 2, logical device 8, 0xb7. for sci, the rtc_sts and rtc_en bits are in the pm1_sts and pm1_en registers. acpi register block description the acpi register model consists of a number of fixed register blocks that perform designated functions. a register block consists of a number of registers that perform status, enable and control functions. the acpi specification deals with events (which have an associated interrupt status and enable bits, and sometimes an associated control function) and control features. the status registers illustrate what defined function is requesting acpi interrupt services (sci). any status bit in the acpi specification has the following attributes: a. status bits are only set through some defined ?hardware event?. b. unless otherwise noted, status bits are cleared by writing a ?high? to that bit position and upon vtr por. writing a ?0? has no effect. c. status bits only generate interrupts while their associated bits in the enable register are set. d. function bit positions in the status register have the same bit position in the enable register (there are exceptions to this rule; special status bits have no enables). note that this implies that if the respective enable bit is reset and the hardware event occurs, the respective status bit is set, however no interrupt is generated until the enable bit is set. this allows software to test the state of the event (by examining the status bit) without necessarily generating an interrupt. there is a special class of status bits that have no respective enable bit; these are called out specifically, and the respective enable bit in the enable register is marked as reserved for these special cases. the enable registers allow the setting of the status bit to generate an interrupt. as a general rule, there is an enable bit in the enable register for every status bit in the status register. the control register provides special controls for the associated event, or special control features that are not associated with an interrupt event. the ordering of a register block is the status registers, followed by enable registers, followed by control registers.
177 table 71a and 71b list the pm1 and mscregister blocks and the locations of the registers contained in these blocks. all of these new registers are to be powered by vtr. table 71c shows the block size and range of base addresses for each block. table 71a - pm1 register block register size address pm1_sts 1 8 pm1_sts 2 8 +1h pm1_en 1 8 +2h pm1_en 2 8 +3h pm1_cntrl 1 8 +4h pm1_cntrl 2 8 +5h reserved 8 +6h reserved 8 +7h pm1_tmr 1 8 +8h pm1_tmr 2 8 +9h pm1_tmr 3 8 +ah pm1_tmr 4 8 +bh table 71b - msc register block register size address sci_sts 1 8 sci_sts 2 8 +1h sci_en 1 8 +2h sci_en 2 8 +3h msc_sts 8 +4h reserved 8 +5h msc_en 8 +6h msc_cntrl 8 +7h table 71c - register block attributes block name block size base address range pm1_blk 16 0-ffff msc_blk 8 0-ffff
178 power management 1 register block (pm1_blk) the registers in this block are powered by vtr. power management 1 status register 1 (pm1_sts 1) register location: system i/o space default value: 00h on vtr por attribute: read/write (note 0) size: 8 bits table 72 - power management 1 status register 1 bit name description 0 tmr_sts this is the timer status bit. this bit gets set any time bit 23 of the 24 bit counter changes (whenever the msb changes from low to high or high to low). note: bits are counted from 0 to 23. while tmr_en and tmr_sts are set a power management event is raised. note: this bit is only set by hardware and is reset by software writing a ?1? to this bit position and by vtr por. writing a ?0? has no effect. 1-3 reserved reserved. 4 bm_sts this is the bus master status bit. cleared by vtr por, and writing a ?1? to this bit position (writing a ?0? has no effect). writing a ?1? to this bit also clears bm_cntrl. bm_cntrl, bit 1 of the msc_cntrl register, sets this bit. 5 gbl_sts the global status bit. this bit is set when bios_rls is set. setting bios_rls will also raise an sci if gbl_en is set. this bit is only set by hardware and is reset by software writing a ?1? to this bit position and by vtr por. writing a ?0? has no effect. writing a ?1? to this bit also clears bios_rls. 6-7 reserved reserved. these bits always return a value of ?0?.
179 power management 1 status register 2 (pm1_sts 2) register location: +1h system i/o space default value: 00h on vtr por attribute: read/write (note 0) size: 8 bits table 73 - power management 1 status register 2 bit name description 0 pwrbtn_st s this bit is set when the button_in signal is asserted. in the system working state, while pwrbtn_en and pwrbtn_sts are both set, an sci interrupt event is raised. in the sleeping state, while pwrbtn_en and pwrbtn_sts are both set a wake-up event is generated (note 2). this bit is only set, by hardware and is reset by software writing a ?1? to this bit position, by vtr por. writing a 0 has no effect. it is also reset as follows: if pwrbtnor_en is set, and if the button_in signal is held asserted for more than four seconds, then this bit is cleared, the pwrbtnor_sts bit is set and the system will transition into the soft off state (npoweron floats). note: the implementation of the pwrbtn_sts and pwrbtn_en as described here which requires that pwrbtn_en be set for the button to generate a wake-up event is redundant relative to our present implementation of button_in where pressing the button will always wake the machine (i.e., activate npoweron). 1 reserved reserved. 2 rtc_sts this bit is set when the rtc generates an alarm 2. additionally if the rtc_en bit is set then the setting of the rtc_sts bit will generate an sci. (see note) 3 pwrbtnor_ sts this bit is set when the power switch over-ride function is set: if pwrbtnor_en is set, and if the button_in signal is held asserted for more than four seconds. hardware is also required to reset the pwrbtn_sts when issuing a power switch over-ride function. (see note) 4-6 reserved reserved. these bits always return a value of ?0?. 7 wak_sts this bit is set when the system is in the suspended state and an enabled resume event occurs. this bit is set on the high-to-low transition of npoweron. it is cleared by writing a 1 to its bit location when npoweron is active. upon setting this bit, the suspend/resume state machine will transition the system to the on state. (see note) note: this bit is only set by hardware and is reset by software writing a ?1? to this bit position and by vtr por. writing a ?0? has no effect.
180 power management 1 enable register 1 (pm1_en 1) register location: +2 system i/o space default value: 00h on vtr por attribute: read/write (note 0) size: 8 bits table 74 - power management 1 enable register 1 bit name description 0 tmr_en this is the timer interrupt enable bit. when this bit is set, then, an sci event is generated any time the tmr_sts bit is set. when this bit is reset, then no interrupt is generated when the tmr_sts bit is set. 1-4 reserved reserved. these bits always return a value of ?0?. 5 gbl_en the global enable bit. when both the gbl_en and the gbl_sts are set, an sci is raised. 6-7 reserved reserved. power management 1 enable register 2 (pm1_en 2) register location: +3 system i/o space default value: 00h on vtr por attribute: read/write (note 0) size: 8 bits table 75 - power management 1 enable register 2 bit name description 0 pwrbtn_en this bit is used to enable the assertion of the button_in to generate an sci or wake-up event. the pwrbtn_sts bit is set any time the button_in signal is asserted. the enable bit does not have to be set to enable the setting of the pwrbtn_sts bit by the assertion of the button_in signal. 1 reserved reserved. 2 rtc_en this bit is used to enable the setting of the rtc_sts bit to generate an sci. the rtc_sts bit is set any time the rtc generates an alarm 2. 3-7 reserved reserved. these bits always return a value of ?0?.
181 power management 1 control register 1 (pm1_cntrl 1) register location: +4 system i/o space default value: 00h on vtr por attribute: read/write (note 0) size: 8 bits table 76 - power management 1 control register 1 bit name description 0 sci_en when this bit is set, then the sci enabled power management events will generate an sci interrupt. when this bit is reset, power management events will not generate an sci interrupt. 1 bm_rld when set, this bit allows the generation of a bus master request to cause any processor in the ?soft off? state (npoweron floats) to transition to the working state (npoweron active). when this bit is reset, the generation of a bus master request does not affect any processor in the ?soft off? state. if this bit is set and bm_cntrl is set, an sci is raised. 2 gbl_rls the global release bit. this bit is used by the acpi software to raise an event to the bios software. bios software has corresponding enable and status bits to control its ability to receive acpi events. setting gbl_rls sets bios_sts, and, if bios_en is set, generates an smi. cleared by writing a ?1? to bios_sts (writing a ?0? has no effect). 3-7 reserved reserved. these bits always return a value of ?0?. power management 1 control register 2 (pm1_cntrl 2) register location: +5 system i/o space default value: 00h on vtr por attribute: read/write (note 0) size: 8 bits table 77 - power management 1 control register 2 bit name description 0 reserved reserved. this field always returns ?0?. 1 pwrbtnor_e n this bit controls the power button over-ride function. when set, then any time the button_in signal is asserted for more than four seconds the system will transition to the off state. when a power button over- ride event occurs, the logic should clear the pwrbtn_sts bit, and set the pwrbtnor_sts bit. 2-7 reserved reserved. this field always returns ?0?.
182 power management 1 timer 1 (pm1_tmr 1) register location: +8h system i/o space default value: 00h on vtr por and res et_drv attribute: read-only size: 8 bits table 78 - power management 1 timer 1 bit name description 0-7 tmr_val this read-only field returns the first byte of the running count of the power management timer. note: reading this byte latches the other two bytes. this is a 24-bit counter that runs off a 3.579545 mhz clock, and counts while in the working system state. the timer is reset to an initial value of ?0? during a reset_drv or vtr por and then continues counting until the 14.31818 mhz input to the chip is stopped. if the 14.31818 mhz clock is restarted without a reset_drv or vtr por, then the counter will continue counting from where it stopped. any time bit 23 of the timer changes state (goes from low to high or high to low), the tmr_sts bit is set. if the tmr_en bit is set an sci interrupt is also generated. power management 1 timer 2 (pm1_tmr 2) register location: +9h system i/o space default value: 00h on vtr por and reset_drv attribute: read-only size: 8 bits table 79 - power management 1 timer 2 bit name description 0-7 tmr_val this read-only field returns the second byte of the running count of the power management timer. this is a 24-bit counter that runs off a 3.579545 mhz clock and counts while in the working system state. the timer is reset to an initial value of ?0? during a reset_drv or vtr por and then continues counting until the 14.31818 mhz input to the chip is stopped. if the 14.31818 mhz clock is restarted without a reset_drv or vtr por, then the counter will continue counting from where it stopped. any time bit 23 of the timer changes state (goes from low to high or high to low), the tmr_sts bit is set. if the tmr_en bit is set an sci interrupt is also generated.
183 power management 1 timer 3 (pm1_tmr 3) register location: +ah system i/o space default value: 00h on vtr por and reset_drv attribute: read-only size: 8 bits table 80 - power management 1 timer 3 bit name description 0-7 tmr_val this read-only field returns the third byte of the running count of the power management timer. this is a 24-bit counter that runs off a 3.579545 mhz clock and counts while in the working system state. the timer is reset to an initial value of ?0? during a reset_drv or vtr por and then continues counting until the 14.31818 mhz input to the chip is stopped. if the 14.31818 mhz clock is restarted without a reset_drv or vtr por, then the counter will continue counting from where it stopped. any time bit 23 of the timer changes state (goes from low to high or high to low), the tmr_sts bit is set. if the tmr_en bit is set an sci interrupt is also generated. power management 1 timer 4 (pm1_tmr 4) register location: +bh system i/o space default value: 00h on vtr por and rese t_drv attribute: read-only size: 8 bits table 81 - power management 1 timer4 bit name description 0-7 reserved reserved.
184 miscellaneous block (msc_blk) the registers in this block are powered by vtr. sci status register 1 (sci_sts1) this register is used to read the status of the sci inputs. register location: +0h system i/o space default value: n/a (status bits cleared at source) attribute: read only size: 8 bits table 82 - sci status register 1 bit name definition 0 ide1 ide interrupt status. cleared at source. 1 pint parallel port interrupt status. cleared at source. 2 u2int uart 2 interrupt status. cleared at source. 3 u1int uart 1 interrupt status. cleared at source. 4 fint floppy disk controller interrupt status. cleared at source. 5 gpint2 group interrupt 2 status. cleared at source. 6 gpint1 group interrupt 1 status. cleared at source. 7 wdt watch dog timer status. cleared at source. sci status register 2 (sci_sts2) this register is used to read the status of the sci inputs. register location: +1h system i/o space default value: bits 2, 3 cleared on vtr por, others n/a attribute: read/write (bits 0,1,4-7 are read only) (note 0) size: 8 bits table 83 - sci status register 2 bit name definition 0 mint mouse interrupt. cleared at source. 1 kint keyboard interrupt. cleared at source. 2 irint ir interrupt. this bit is set by a transition on the ir pin (irdx2 or gp12 as selected in cr l5-f1-b6 i.e., after the mux). cleared by writing a ?1? to this bit location (writing a ?0? has no effect) . note: this bit is cleared by vtr por. 3 bint button interrupt. this bit is set when the delay counter is started. cleared by writing a ?1? to this bit location (writing a 0 has no effect) . note: this bit is cleared by vtr por. 4 p12 8042 p1.2. cleared at source. 5 abint access.bus interrupt. cleared at source. 6 reserved reserved. this bit always returns ?0?. note: rtc_sts is located in the pm1_sts register. 7 reserved reserved. this bit always returns zero.
185 sci enable register 1 (sci_en1). this register is used to enable the different interrupt sources onto the group sci output, and the group sci output onto an irq pin for sci. register location: +2h system i/o spac e default value: 00h on vtr por attribute: read/write (note 0) size: 8 bits table 84 - sci enable register 1 bit name definition 0 en_ide1 ide interrupt enable. 1=enable, 0=disable 1 en_pint parallel port interrupt enable. 1=enable, 0=disable 2 en_u2int uart 2 interrupt enable. 1=enable, 0=disable 3 en_u1int uart 1 interrupt enable. 1=enable, 0=disable 4 en_fint floppy disk controller interrupt enable. 1=enable, 0=disable 5 en_gpint2 group interrupt 2 enable. 1=enable, 0=disable 6 en_gpint1 group interrupt 1 enable. 1=enable, 0=disable 7 en_wdt watch dog timer enable. 1=enable, 0=disable sci enable register 2 (sci_en2). this register is used to enable the different interrupt sources onto the group sci output, and the group sci output onto an irq pin for sci. register location: +3h system i/o space default value: 00h on vtr por attribute: read/write (note 0) size: 8 bits table 85 - sci enable register 2 name reg index definition 0 en_mint mouse interrupt. 1=enable, 0=disable 1 en_kint keyboard interrupt. 1=enable, 0=disable 2 en_irint ir interrupt. 1=enable, 0=disable 3 en_bint button interrupt. 1=enable, 0=disable 4 en_p12 8042 p1.2 interrupt. 1=enable, 0=disable 5 en_abint access.bus interrupt. 1=enable, 0=disable 6 reserved reserved. this bit always returns ?0?. note: rtc_en is located in the pm1_en register. 7 reserved reserved. this bit always returns zero. note sci_en is located in the pm1_cntrl register.
186 miscellaneous status register (msc_sts) register location: +4h system i/o space default value: 02h on vtr por attribute: read/write (note 0) size: 8 bits table 86 - miscellaneous status register bit name definition 0 bios_sts this bit is set when gbl_rls is set. setting gbl_rls will also raise an smi if bios_en is set. this bit is cleared by a writing a ?1? to its bit location (writing a ?0? has no effect). writing a ?1? to this bit also clears gbl_rls. note: this bit is cleared by vtr por 1 vtrp_sts vtr por status. this bit is set upon vtrpor; it is cleared by a writing a ?1? to its bit location (writing a ?0? has no effect). note: this bit is cleared by vtr por 2 eeti1_sts either edge triggered interrupt input 1 status. this bit is cleared by writing a ?1? to this bit position (writing a ?0? has no effect). note: this bit is cleared by vtr por 3 eeti2_sts either edge triggered interrupt input 2 status. this bit is cleared by writing a ?1? to this bit position (writing a ?0? has no effect). note: this bit is cleared by vtr por 4 eeti3_sts either edge triggered interrupt input 3 status. this bit is cleared by writing a ?1? to this bit position (writing a ?0? has no effect). note: this bit is cleared by vtr por 5-7 reserved reserved. this bit always returns ?0?. miscellaneous enable register (msc_en) register location: +6h system i/o space default value: 00h on vtr por attribute: read/write (note 0) size: 8 bits table 87 - miscellaneous enable register bit name definition 0 bios_en this bit is used to enable the smi event. when both the bios_en and gbl_rls are set, an smi is generated. 1 tmr_on_of f this bit is used to turn the power management timer on/off. 0=off, 1=on. 2-7 reserved reserved. this bit always returns ?0?.
187 miscellaneous control register (msc_cntrl) register location: +7h system i/o space default value: 00h on vtr por attribute: read/write (note 0) size: 8 bits table 88 - miscellaneous control register bit name definition 0 bios_rls this bit is used by the bios to raise an event to the acpi software. acpi software has corresponding enable and status bits to control its ability to receive sci events. set by writing ?1? to this bit location. setting bios_rls sets gbl_sts, and if gbl_en is set, generates an sci. writing ?0? has no effect. cleared by writing a ?1? to the gbl_sts bit (writing a ?0? has no effect). 1 bm_cntrl this bit is used to set the bm_sts bit and generate an sci. bm_sts is set by writing ?1? to this bit location. writing ?0? has no effect. it is cleared by writing a ?1? to the bm_sts bit (writing a ?0? has no effect). if bm_rld is set, setting this bit also raises an sci. 2-7 reserved reserved. this bit always returns ?0?. note: all bits described as "reserved" in writeable registers must be written with the value 0 when the register is written.
188 configuration the configuration of the FDC37C93XAPM is very flexible and is based on the configuration architecture implemented in typical plug-and- play components. the FDC37C93XAPM is designed for motherboard applications in which the resources required by their components are known. with its flexible resource allocation architecture, the FDC37C93XAPM allows the bios to assign resources at post. system elements primary configuration address decoder after a hard reset (reset_drv pin asserted) or v cc power on reset the FDC37C93XAPM is in the run mode with all logical devices disabled. the logical devices may be configured through two standard configuration i/o ports (index and data) by placing the FDC37C93XAPM into configuration mode. the bios uses these configuration ports to initialize the logical devices at post. the index and data ports are only valid when the FDC37C93XAPM is in configuration mode. the sysopt pin is latched on the falling edge of the reset_drv or on v cc power on reset to determine the configuration register's base address. the sysopt pin is used to select the config port's i/o address at power-up. once powered up the configuration port base address can be changed through configuration registers cr26 and cr27. the sysopt pin is a hardware configuration pin which is shared with the nrts1 signal on pin 148. during reset this pin is a weak active low signal which sinks 30a. note: all i/o addresses are qualified with aen. the index and data ports are effective only when the chip is in the configuration state. table 89 - configuration port i/o address port name sysopt= 0 (pull-down resistor) refer to note 1 sysopt= 1 (10k pull-up resistor) type config port ( note 2) 0x03f0 0x0370 write index port ( note 2) 0x03f0 0x0370 write data port index port + 1 read/write note 1: if using ttl rs232 drivers use 1k pull-down. if using cmos rs232 drivers use 10k pu ll-down. note 2: the configuration port base address can be relocated through cr26 and cr27. entering the configuration state the device enters the configuration state when the following config key is successfully written to the config port. config k ey = < 0x55 > exiting the configuration state the device exits the configuration state when the following config key is successfully written to the config port. config key = < 0xaa >
189 configuration sequence to program the configuration registers, the following sequence must be followed: 1. enter configuration mode 2. configure the configuration registers 3. exit configuration mode. enter configuration mode to place the chip into the configuration state the config key is sent to the chip's config port. the config key consists of a single write of 0x55 data to the config port. once the initiation key is received correctly the chip enters into the configuration state (the auto config ports are enabled). configuration mode the system sets the logical device information and activates desired logical devices through the index and data ports. in configuration mode, the index port is located at the config port address and the data port is at index port address + 1. the desired configuration registers are accessed in two steps: a. write the index of the logical device number configuration register (i.e., 0x07) to the index port and then write the number of the desired logical device to the data port b. write the address of the desired configuration register within the logical device to the index port and then write or read the configuration register through the data port. note: if accessing the global configuration registers, step (a) is not required. exit configuration mode to exit the configuration state the system writes 0xaa to the config port. the chip returns to the run state. note: only two states are defined (run and configuration). in the run state the chip will always be ready to enter the configuration state. programming example the following is an example of a configuration program in intel 8086 assembly language. ;--------------------------------------------------. ; enter configuration mode | ;--------------------------------------------------' mov dx,3f0 h mov ax,055h out dx,al ;--------------------------------------------------. ; configure register cre0, | ; logical device 8 | ;--------------------------------------------------' mov dx,3f0h mov al,07h out dx,al ; point to l d# config reg mov dx,3f1h mov al, 08h out dx,al ; point to logical device 8 ; mov dx,3f0h mov al,e0h out dx,al ; point to cre0 mov dx,3f1h mov al,02h out dx,al ; update cre0 ;-------------------------------------------------. ; exit configuration mode | ;-------------------------------------------------' mov dx,3f0h mov ax,0aah out dx,al
190 notes: 1. hard reset: reset_drv pin asserted 2. soft reset: bit 0 of configuration control register set to one 3. all host accesses are blocked for 500s after vcc por (see power-up timing diagram) table 90 - configuration registers index type hard reset / v cc por vtr por soft reset configuration register global configuration registers 0x02 w 0x00 0x00 config control 0x03 r/w 0x03 n/a index address 0x07 r/w 0x00 0x00 logical device number 0x20 r 0x30 0x30 device id - hard wired 0x21 r 0x01 0x01 device rev - hard wired 0x22 r/w 0x00 0x00 power control 0x23 r/w 0x00 n/a power mgmt 0x24 r/w 0x04 n/a osc 0x26 r/w sysopt=0: 0xf0 sysopt=1: 0x70 n/a configuration port address byte 0 0x27 r/w sysopt=0: 0x03 sysopt=1: 0x03 n/a configuration port address byte 1 0x28 r/w 0x00 0x00 clock mask register 0x2d r/w n/a n/a test 1 0x2e r/w n/a n/a test 2 0x2f r/w 0x00 n/a test 3 logical device 0 configuration registers (fdd) 0x30 r/w 0x00 0x00 activate 0x60, 0x61 r/w 0x03, 0xf0 0x03, 0xf0 primary base i/o address 0x70 r/w 0x06 0x06 primary interrupt select 0x74 r/w 0x02 0x02 dma channel select 0xf0 r/w 0x0e n/a fdd mode register 0xf1 r/w 0x00 n/a fdd option register 0xf2 r/w 0xff n/a fdd type register 0xf4 r/w 0x00 n/a fdd0 0xf5 r/w 0x00 n/a fdd1
191 table 90 - configuration registers index type hard reset / v cc por vtr por soft reset configuration register logical device 1 configuration registers (ide1) 0x30 r/w 0x00 0x00 activate 0x60, 0x61 r/w 0x01, 0xf0 0x01, 0xf0 primary base i/o address 0x62, 0x63 r/w 0x03, 0xf6 0x03, 0xf6 second base i/o address 0x70 r/w 0x0e 0x0e primary interrupt select 0xf0 r/w 0x0c 0x0c hdcs0 address decoder 0xf1 r/w 0x00 0x00 hdcs1 address decoder logical device 2 configuration registers (ide2) 0x30 r/w 0x00 0x00 activate 0x60, 0x61 r/w 0x00, 0x00 0x00, 0x00 primary base i/o address 0x62, 0x63 r/w 0x00, 0x00 0x00, 0x00 second base i/o address 0x70 r/w 0x00 0x00 primary interrupt select 0xf0 r/w 0x00 n/a ide2 mode register logical device 3 configuration registers (parallel port) 0x30 r/w 0x00 0x00 activate 0x60, 0x61 r/w 0x00, 0x00 0x00, 0x00 primary base i/o address 0x70 r/w 0x00 0x00 primary interrupt select 0x74 r/w 0x04 0x04 dma channel select 0xf0 r/w 0x3c n/a parallel port mode register 0xf1 r/w 0x00 n/a parallel port mode register 2 logical device 4 configuration registers (serial port 1) 0x30 r/w 0x00 0x00 activate 0x60, 0x61 r/w 0x00, 0x00 0x00, 0x00 primary base i/o address 0x70 r/w 0x00 0x00 primary interrupt select 0xf0 r/w 0x00 n/a serial port 1 mode register
192 table 90 - configuration registers index type hard reset / v cc por vtr por soft reset configuration register logical device 5 configuration registers (serial port 2) 0x30 r/w 0x00 0x00 activate 0x60, 0x61 r/w 0x00, 0x00 0x00, 0x00 primary base i/o address 0x70 r/w 0x00 0x00 primary interrupt select 0xf0 r/w 0x00 n/a serial port 2 mode register 0xf1 r/w 0x02 n/a ir options register 0xf2 r/w 0x03 n/a ir half duplex timeout logical device 6 configuration registers (rtc) 0x30 r/w 0x00 0x00 activate 0x62, 0x63 r/w 0x00, 0x70 0x00, 0x70 secondary base address for rtc bank 1 and bank 2 0x70 r/w 0x00 0x00 primary interrupt select 0xf0 r/w 0x00 n/a real time clock mode register 0xf1 r/w 0x00 n/a serial eeprom mode register 0xf2 r/w 0x00 0x00 serial eeprom pointer 0xf3 w n/a n/a write eeprom data 0xf4 bits[6:0] r bit[7] r/w 0x03 0x03 write status 0xf5 r n/a n/a read eeprom data 0xf6 r n/a n/a read status logical device 7 configuration registers (keyboard) 0x30 r/w 0x00 0x00 activate 0x70 r/w 0x00 0x00 primary interrupt select 0x72 r/w 0x00 0x00 second interrupt select 0xf0 r/w 0x00 n/a kreset and gatea20 select logical device 8 configuration registers (aux i/o) 0x30 r/w 0x00 0x00 activate 0x60, r/w 0x00, 0x00 0x00, primary base i/o address
193 table 90 - configuration registers index type hard reset / v cc por vtr por soft reset configuration register 0x61 0x00 0x62, 0x63 r/w 0x00, 0x00 0x00, 0x00 second base i/o address 0xb0 r/w 0x00 n/a soft power enable register 1 0xb1 r/w 0x80 n/a soft power enable register 2 0xb2 r/w 0x00 n/a soft power status register 1 0xb3 r/w 0x00 n/a soft power status register 2 0xb4 r/w 0x00 n/a smi enable register 1 0xb5 r/w 0x00 n/a smi enable register 2 0xb6 r/w 0x00 n/a smi status register 1 0xb7 r/w 0x00 n/a smi status register 2 0xb8 r/w 0x00 n/a delay 2 time set register 0xc0 r/w 0x01 n/a gp40 0xc1 r/w 0x01 n/a gp41 0xc2 r/w 0x00 n/a gp42 0xc3 r/w 0x00 n/a gp43 0xc4 r/w 0x00 n/a gp44 0xc5 r/w 0x01 n/a gp45 0xc6 r/w 0x01 n/a gp46 0xc7 r/w 0x01 n/a gp47 0xc8 r/w 0x01 n/a gp50 0xc9 r/w 0x80 n/a gp51 0xcb r/w 0x01 n/a gp53 0xcc r/w 0x01 n/a gp54 0xd0 r/w 0x01 n/a gp60 0xd1 r/w 0x01 n/a gp61 0xd2 r/w 0x01 n/a gp62 0xd3 r/w 0x01 n/a gp63 0xd4 r/w 0x01 n/a gp64 0xd5 r/w 0x01 n/a gp65
194 table 90 - configuration registers index type hard reset / v cc por vtr por soft reset configuration register 0xd6 r/w 0x01 n/a gp66 0xd7 r/w 0x01 n/a gp67 0xd8 r/w 0x01 n/a gp70 0xd9 r/w 0x01 n/a gp71 0xda r/w 0x01 n/a gp72 0xdb r/w 0x01 n/a gp73 0xdc r/w 0x01 n/a gp74 0xdd r/w 0x01 n/a gp75 0xde r/w 0x01 n/a gp76 0xdf r/w 0x01 n/a gp77 0xe0 r/w 0x01 n/a gp10 0xe1 r/w 0x01 n/a gp11 0xe2 r/w 0x01 n/a gp12 0xe3 r/w 0x01 n/a gp13 0xe4 r/w 0x01 n/a gp14 0xe5 r/w 0x01 n/a gp15 0xe6 r/w 0x01 n/a gp16 0xe7 r/w 0x01 n/a gp17 0xe8 r/w 0x01 n/a gp20 0xe9 r/w 0x01 n/a gp21 0xea r/w 0x01 n/a gp22 0xeb r/w 0x01 n/a gp23 0xec r/w 0x01 n/a gp24 0xed r/w 0x01 n/a gp25 0xef r/w 0x00 n/a gp_int2 0xf0 r/w 0x00 n/a gp_int1 0xf1 r/w 0x00 n/a gpr_gpw_en 0xf2 r/w 0x00 n/a wdt_val 0xf3 r/w 0x00 n/a wdt_cfg 0xf4 r/w note1 0x00 n/a wdt_ctrl
195 table 90 - configuration registers index type hard reset / v cc por vtr por soft reset configuration register 0xf6 r/w 0x00 n/a gp1 0xf7 r/w 0x00 n/a gp2 0xf8 r/w 0x00 n/a gp4 0xf9 r/w 0x00 n/a gp5 0xfa r/w 0x00 n/a gp6 0xfb r/w 0x00 n/a gp7 logical device 9 configuration registers (access.bus) 0x30 r/w 0x00 0x00 activate 0x60, 0x61 r/w 0x00, 0x00 0x00, 0x00 primary base i/o address 0x70 r/w 0x00 0x00 primary interrupt select logical device a configuration registers (acpi) 0x30 r/w 0x00 0x00 activate 0x60, 0x61 (2) r/w 0x00, 0x00 0x00, 0x00 primary base i/o address pm1_blk 0x62, 0x63 (2) r/w 0x00, 0x00 0x00, 0x00 secondary base i/o address msc_blk 0x70 r/w 0x00 0x00 primary interrupt select note 1: this register contains some bits which are read or write only. note 2 : registers 60 and 62 are the high byte; 61 and 63 are the low byte. for example to set the primary base address to 1234h, write 12h into 60 and 34h into 6 1.
196 chip - level (global) control/configuration registers [0x00-0x2f] the chip-level (global) registers lie in the address range [0x00-0x2f]. the design must use all 8 bits of the address port for register selection. all unimplemented registers and bits ignore writes and return zero when read. the index port is used to select a configuration register in the chip. the data port is then used to access the selected register. these registers are accessable only in the configuration mode. table 91 - chip level registers register address description state chip (global) control registers 0x00 - 0x01 reserved - writes are ignored, reads return 0. config control default = 0x00 on vcc por or reset_drv 0x02 w the hardware automatically clears this bit after the write, there is no need for software to clear the bits. bit [0]=1: soft reset. refer to the "configuration registers" table for the soft reset value for each register. c index address default = 0x03 on vcc por or reset_drv 0x03 r/w bit[7] = 1 enable gp1, gp2, wdt_ctrl, gp4, gp5, gp6, gp7, soft power and smi enable and status register access when not in configuration mode = 0 disable gp1, gp2, wdt_ctrl, gp4, gp5, gp6, gp7, soft power and smi enable and status register access when not in configuration mode (default) bit [6:2] reserved - writes are ignored, reads return 0. bits[1:0] sets gp index register address, used when in run mode (not in configuration mode). = 11 0xea (default) = 10 0xe4 = 01 0xe2 = 00 0xe0 0x04 - 0x06 reserved - writes are ignored, reads return 0 .
197 table 91 - chip level registers register address description state logical device # default = 0x00 on v cc por or reset_drv 0x07 r/w a write to this register selects the current logical device. this allows access to the control and configuration registers for each logical device. note: the activate command operates only on the selected logical device. c card level reserved 0x08 - 0x1f reserved - writes are ignored, reads return 0 . chip level, smsc defined device id hard wired = 0x30 0x20 r a read-only register which provides device identification. bits[7:0] = 0x30 when read. c device rev hard wired = 0x01 0x21 r a read-only register which provides device revision information. bits[7:0] = 0x01 when read. c power control default = 0x00. on vcc por or reset_drv hardware signal. 0x22 r/w bit[0] fdc power bit[1] ide1 enable bit[2] ide2 enable bit[3] parallel port power bit[4] serial port 1 power bit[5] serial port 2 power bit[6] access.bus power bit[7] reserved (read as 0) = 0 power off or disabled = 1 power o n or enabled c power mgmt default = 0x00. on v cc por or reset_drv hardware signal 0x23 r/w bit[0] fdc bit[1] ide1 bit[2] ide2 bit[3] parallel port bit[4] serial port 1 bit[5] serial port 2 bit[6:7] reserved (read as 0) = 0 intelligent pwr mgmt off = 1 intelligent pwr mgmt on c
198 table 91 - chip level registers register address description state osc default = 0x04, on v cc por or reset_drv hardware signal. 0x24 r/w bit[0] 24/48 mhz clock select (pin 35) = 0 24 mhz (default) = 1 48 mhz bit [1] pll control = 0 pll is on (backward compatible) = 1 pll is off bit[3:2] osc = 01 osc is on, brg clock is on. = 10 same as above (01) case. = 00 osc is on, brg clock enabled. = 11 osc is off, brg clock is disabled. bit[5:4] reserved, set to ?0? bit[6] 16 bit address qualification = 0 12 bit address qualification = 1 16 bit address qualification (refer to the 16-bit address qualification in the smsc defined logical device configuration register, device 2 section.) bit[7] irq8 polarity = 0 irq8 is active high = 1 irq8 is active low c chip level vendor defined 0x25 reserved - writes are ignored, reads return 0. configuration address byte 0 default =0 x f0 (sysopt=0) =0 x 70 (sysopt=1) on v cc por or reset_drv 0x26 bit[7:1] configuration address bits [7:1] bit[0] = 0 see note 1 c configuration address byte 1 default = 0x03 on v cc por or reset_drv 0x27 bit[7:0] configuration address bits [15:8] see note 1 c clock mask register 0x28 mask clocks as defined below. 0= clock on, 1= clock masked (pin tri-states)
199 table 91 - chip level registers register address description state default = 0x00 on v cc por and hard reset bit[0] 14.318 mhz clock output 1 (pin 37) bit[1] 14.318 mhz clock output 2 (pin 38) bit[2] 14.318 mhz clock output 3 (pin 39) bit[3] 16 mhz clock output (pin 36) bit[4] high speed clock out 24/48 mhz (pin 35) bit[7:5] reserved - writes are ignored, reads return 0. chip level vendor defined 0x29 -0x2c reserved - writes are ignored, reads return 0. test 1 0x2d r/w test modes: reserved for smsc. users should not write to this register; may produce undesired results. c test 2 0x2e r/w test modes: reserved for smsc. users should not write to this register; may produce undesired results. c test 3 default = 0x00, on v cc por or reset_drv hardware signal 0x2f r/w test modes: reserved for smsc. users should not write to this register; may produce undesired results. c note 1: to allow the selection of the configuration address to a user defined location, these configuration address bytes are used. there is no restriction on the address chosen, except that a0 is 0, that is, the address must be on an even byte boundary. as soon as both bytes are changed, the configuration space is moved to the specified location with no delay (write byte 0, then byte 1; writing cr27 changes the base address). the configuration address is only reset to its default address upon a hard reset or v cc por. the default configuration address is either 3f0 or 370, as specified by the sysopt pin. this change affects smsc mode only.
200 logical device configuration/control registers [0x30-0xff] used to access the registers that are assigned to each logical unit. this chip supports nine logical units and has nine sets of logical device registers. the nine logical devices are floppy, ide1, ide2, parallel, serial 1 and serial 2, real time clock, keyboard controller, and auxiliary_i/o. a separate set (bank) of control and configuration registers exists for each logical device and is selected with the logical device # register (0x07). the index port is used to select a specific logical device register. these registers are then accessed through the data port. the logical device registers are accessible only when the device is in the configuration state. the logical register addresses are: table 92 - logical device registers logical device register address description state activate note1 default = 0x00 on v cc por or reset_drv (0x30) bit[7:1] reserved, set to ?0?. bit[0] = 1 activates the logical device currently selected through the logical device # register. = 0 logical device currently selected is inactive. c logical device control (0x31-0x37) reserved - writes are ignored, reads return 0. c logical device control (0x38-0x3f) vendor defined - reserved - writes are ignored, reads return 0. c mem base addr (0x40-0x5f) reserved - writes are ignored, reads return 0. c i/o base addr. (see device base i/o address table) default = 0x00 on v cc por or reset_drv (0x60-0x6f) 0x60,2,... = addr[15:8] 0x61,3,... = addr[7:0] registers 0x60 and 0x61 set the base address for the device. if more than one base address is required, the second base address is set by registers 0x62 and 0x63. refer to table 91 for the number of base address registers used by each device. unused registers will ignore writes and return ?0? when read. c
201 table 92 - logical device registers logical device register address description state interrupt select defaults : 0x70 = 0x00, on v cc por or reset_drv 0x72 = 0x00, on vcc por or reset_drv (0x70,072) 0x70 is implemented for each logical device. refer to interrupt configuration register description. only the keyboard controller uses interrupt select register 0x72. unused register (0x72) will ignore writes and return zero when read. interrupts default to edge high (isa compatible). c (0x71,0x73) reserved - not implemented. these register locations ignore writes and return zero when read. dma channel select default = 0x04 on v cc por or reset_drv (0x74,0x75) only 0x74 is implemented for fdc, serial port 2 and parallel port. 0x75 is not implemented and ignores writes and returns ?0? when read. refer to dma channel configuration. c 32-bit memory space configuration (0x76-0xa8) reserved - not implemented. these register locations ignore writes and return ?0? when read. logical device (0xa9-0xdf) reserved - not implemented. these register locations ignore writes and return ?0? when read. c logical device config. (0xe0-0xfe) reserved - vendor defined (see smsc defined logical device configuration registers) c reserved 0xff reserved c note 1: a logical device will be active and powered up according to the following equation: device on (active) = (activate bit set or pwr/control bit set). the logical device's activate bit and its pwr/control bit are linked such that setting or clearing one sets or clears the other. if the i/o base addr of the logical device is not within the base i/o range as shown in the logical device i/o map, then read or write is not valid and is ignored.
202 table 93 - i/o base address configuration register description logical device number logical device register index base i/o range (note 1) fixed base offsets 0x00 fdc (note 4) 0x60,0x61 [0x100:0x0ff8] on 8 byte boundaries +0 : sra +1 : srb +2 : dor +3 : tsr +4 : msr/dsr +5 : fifo +7 : dir/ccr 0x01 ide1 (note 4) 0x60,0x61 [0x100:0x0ff8] on 8 byte boundaries ide task +0 : data register (16 bit) +1 : errf/wpre +2 : sector count +3 : sector number +4 : cylinder low +5 : cylinder high +6 : head,drive +7 : status/command 0x62,0x63 [0x100:0x0fff] on 1 byte boundaries ide misc at + 0 : status/fixed disk 0x02 ide2 (note 4) 0x60,0x61 [0x100:0x0ff8] on 8 byte boundaries ide task +0 : data register (16 bit) +1 : errf/wpre +2 : sector count +3 : sector number +4 : cylinder low +5 : cylinder high +6 : head,drive +7 : status/command 0x62,0x63 [0x100:0x0fff] on 1 byte boundaries ide misc at + 0 : status/fixed disk
203 table 93 - i/o base address configuration register description logical device number logical device register index base i/o range (note 1) fixed base offsets 0x03 parallel port 0x60,0x61 [0x100:0x0ffc] on 4 byte boundaries (epp not supported) or [0x100:0x0ff8] on 8 byte boundaries (all modes supported, epp is only available when the base address is on an 8- byte boundary) +0 : data|ecpafifo +1 : status +2 : control +3 : epp address +4 : epp data 0 +5 : epp data 1 +6 : epp data 2 +7 : epp data 3 +400h : cfifo|ecpdfifo|tfifo |cnfga +401h : cnfgb +402h : ecr 0x04 serial port 1 0x60,0x61 [0x100:0x0ff8] on 8 byte boundaries +0 : rb/tb|lsb div +1 : ier|msb div +2 : iir/fcr +3 : lcr +4 : msr +5 : lsr +6 : msr +7 : scr 0x05 serial port 2 0x60,0x61 [0x100:0x0ff8] on 8 byte boundaries +0 : rb/tb|lsb div +1 : ier|msb div +2 : iir/fcr +3 : lcr +4 : msr +5 : lsr +6 : msr +7 : scr 0x06 rtc n/a not relocatable fixed base address: 70,71 +0: index register +1: data register 0x62,0x63 [0x100:0xffe] on 2 byte boundaries +0: index register +1: data register 0x07 kybd n/a not relocatable fixed base address: 60,64 +0 : data register +4 : command/status reg. 0x08 aux. i/o 0x60,0x61 [0x00:0xfff] on 1 byte boundaries +0 : gpr 0x62,0x63 [0x00:0xfff] on 1 byte boundaries +0 : gpw
204 table 93 - i/o base address configuration register description logical device number logical device register index base i/o range (note 1) fixed base offsets 0x09 access. bus 0x60,0x61 [0x00:0x0ffc] on 4 byte boundaries +0 : control/status reg +1 : own address reg +2 : data reg +3 : clock register 0x0a acpi 0x60,0x61 [0x0000:0xffff] on 16 byte boundaries +0: pm1_sts1 +1: pm1_sts2 +2: pm1_en1 +3: pm1_en2 +4: pm1_cntrl1 +5: pm1_cntrl2 +6: reserved +7: reserved +8: pm1_tmr1 +9: pm1_tmr2 +10: pm 1_tmr3 +11: pm 1_tmr4 0x62,0x63 [0x0000:0xffff] on 8 byte boundries +0: sci_sts1 +1: sci_sts2 +2: sci_en1 +3: sci_en2 +4: msc_sts +5: reserved +6: msc_en +7: msc_cntrl note 1: this chip uses isa address bits [a11:a0] to decode the base address of each of its logical devices. note 2: the ide/fdc split register, normally found at e ither 0x3f7 or 0x377 is now an fdc support only register. the ide logical device will now support only a status register (typically found at 0x3f6 or 0x376). the ide decoder operates as follows: nhdcs0# = ide task base + [7:0] nhdcs1# = ide misc at base + 0 (typically located at 0x3f6 or 0x376)
205 table 94 - interrupt select configuration register description name reg index definition state interrupt request level select 0 default = 0x00 on v cc por or reset_drv 0x70 (r/w) bit[3:0] selects which interrupt level is used for interrupt 0. 0x00=no interrupt selected. 0x01=irq1 0x02=reserved 0x03=irq3 0x0d=reserved/irq13 (note 1) 0x0e=irq14 0x0f=irq15 all interrupts are edge high (except ecp/epp) c note: an interrupt i s activated by setting the interrupt request level select 0 register to a non-zero value and : for the fdc logical device by setting dmaen, bit d3 of the digital output register. for the pp logical device by setting irqe, bit d4 of the control port and i n addition for the pp logical device in ecp mode by clearing serviceintr, bit d2 of the ecr. for the serial port logical device by setting any combination of bits d0-d3 in the ier and by setting the out2 bit in the uart's modem control (mcr) register. for the rtc by (refer to the rtc section of this spec.) for the kybd by (refer to the kybd controller section of this spec.) note: irq pins must tri-state if not used/selected by any logical device. refer to note a. note: irq 13 is only valid for sci, as selected through logical device a. table 95 - dma channel select configuration register description name reg index definition state dma channel select default = 0x04 on v cc por or reset_drv 0x74 (r/w) bit[2:0] select the dma channel. 0x0 0=dma0 0x01=dma1 0x02=dma2 0x03=dma3 0x04-0x07= no dma active c note 1: a dma channel is activated by setting the dma channel select register to [0x00-0x03] and : for the fdc logical device by setting dmaen, bit d3 of the digital output register . for the pp logical device in ecp mode by setting dmaen, bit d3 of the ecr. note 2: dmareq pins must tri-state if not used/selected by any logical device.
206 note a: logical device irq and dma operation 1. irq and dma enable and disable: any time the irq or dack for a logical block is disabled by a register bit in that logical block, the irq and/or dack must be disabled. this is in addition to the irq and dack disabled by the configuration registers (active bit or address not valid). a. fdc: for the following cases, the irq and dack used by the fdc are disabled (high impedance). will not respond to the dreq digital output register (base+2) bit d3 (dmaen) set to "0". the fdc is in power down (disabled). b. ide1 and ide2: no additional conditions. c. serial port 1 and 2: modem control register (mcr) bit d2 (out2) - when out2 is a logic "0", the serial port interrupt is forced to a high impedance state - disabled. d. parallel port: spp and epp modes: control port (base+2) bit d4 (irqe) set to "0", irq is disabled (high impedance). ecp mode: (1) (dma) dmaen from ecr register. see table. (2) irq - see table. mode (from ecr register) irq pin controlled by pdreq pin controlled by 000 printer irqe dmaen 001 spp irqe dmaen 010 fifo (on) dmaen 011 ecp (on) dmaen 100 epp irqe dmaen 101 res irqe dmaen 110 test (on) dmaen 111 config irqe dmaen e. game port and addr: no irq or dack used. f. real time clock and keyboard controller: refer to the rtc and kbd section of this spec .
207 smsc defined logical device configuration registers the smsc specific logical device configuration registers reset to their default values only on hard resets generated by v cc or vtr por (as shown) or the reset_drv signal. these registers are not affected by soft resets. table 96 - floppy disk controller, logical device 0 [logical device number = 0x00] name reg index definition state fdd mode register default = 0x0e on v cc por or reset_drv 0xf0 r/w bit[0] floppy mode = 0 norma l floppy mode (default) = 1 enhanced floppy mode 2 (os2) bit[1] fdc dma mode = 0 burst mode is enabled = 1 non-burst mode (default) bit[3:2] interface mode = 11 at mode (default) = 10 (reserved) = 01 ps/2 = 00 model 30 bit[4] swap drives 0,1 mode = 0 no swap (default) = 1 drive and motor sel 0 and 1 are swapped. bit[7:5] reserved, set to zero. c fdd option register default = 0x00 on v cc por or reset_drv 0xf1 r/w bit[1:0] reserved, set to zero bit[3:2] density select = 00 normal (defaul t) = 01 normal (reserved for users) = 10 1 (forced to logic "1") = 11 0 (forced to logic "0") bit[4] media id 0 polarity = 0: don?t invert (default) = 1: invert bit[5] media id 1 polarity = 0: don?t invert (default) = 1: invert bits[7:6] boot floppy = 00 fdd 0 (default) = 01 fdd 1 = 10 reserved (neither drive a or b is a boot drive). = 11 reserved (neither drive a or b is a boot drive). c
208 table 96 - floppy disk controller, logical device 0 [logical device number = 0x00] name reg index definition state fdd type register default = 0xff on v cc por or reset_drv 0xf2 r/w bit[1:0] floppy drive a type bit[3:2] floppy drive b type bit[5:4] reserved (could be used to store floppy drive c type) bit[7:6] reserved (could be used to store floppy drive d type) note: the FDC37C93XAPM supports two floppy drives c 0xf3 r reserved, read as 0 (read only) c fdd0 default = 0x00 on v cc por or reset_drv 0xf4 r/w bit[1:0] drive type select: dt1, dt0 bit[2] read as 0 (read only) bit[4:3] data rate table select: drt1, drt0 bit[5] read as 0 (read only) bit[6] precompensation disable pts =0 use precompensation =1 no precompensation bit[7] read as 0 (read only) c fdd1 0xf5 r/w refer to definition and default for 0xf4 c
209 table 97 - ide drive 1, logical device 1 [logical device number = 0x01] name reg index definition state hdcs0 address decoder default = 0x0c on vcc por or reset_drv or software reset 0xf0 r/w bit[7:5] reserved bit[4:2] mask bits 4 3 2 description 0 0 0 mask no bits (1 byte) 0 0 1 mask lowest bit (2 bytes) 0 1 0 mask lowest 2 bits (4 bytes) 0 1 1 mask lowest 3 bits (8 bytes) 1 0 0 mask lowest 4 bits (16 bytes) 1 0 1 mask lowest 5 bits (32 bytes) 1 1 0 reserved (do not program) 1 1 1 reserved ( do not program) bit[1:0] qualify for hdcs0 option select 1 0 description 0 0 = decoded with aen 0 1 = decoded with aen and nior 1 0 = decoded with aen and niow 1 1 = decoded with aen and (nior or niow) hdcs1 address decoder default = 0x00 on vcc por or reset_drv or software reset 0xf1 r/w bit[7:5] reserved bit[4:2] mask bits 4 3 2 description 0 0 0 mask no bits (1 byte) 0 0 1 mask lowest bit (2 bytes) 0 1 0 mask lowest 2 bits (4 bytes) 0 1 1 mask lowest 3 bits (8 bytes) 1 0 0 mask lowest 4 bits (16 bytes) 1 0 1 mask lowest 5 bits (32 bytes) 1 1 0 reserved (do not program) 1 1 1 reserved ( do not program) bit[1:0] qualify for hdcs1 option select 1 0 description 0 0 = decoded with aen 0 1 = decoded with aen and nior 1 0 = decoded with aen and niow 1 1 = decoded with aen and (nior or niow) note: ide1 hi and lo byte pass through external buffers controlled by ide1_oe.
210 table 98 - ide drive 2, logical device 2 [logical device number = 0x02] name reg index definition state ide2 mode register default = 0x00 on v cc por or reset_drv 0xf0 r/w bit[0] : ide2 configuration options = 0 : ide2 hi and lo b ytes pass through external buffers controlled by ide2_oe. = 1 : ide2_oe not used. ide2 hi and lo byte passes through external buffer controlled by ide1_oe. bit[7:1] : reserved, set to ?0? c when ide2 is not active (ide2 active bit = l2 - cr30 - bit 0), nhdcs2, nhdcs3 and ide2_irq are in high impedance; 16_adr = cr24.6 table 99 - 16 bit address qualification ide2 active bit = 1 16bit_adr = x ide2 active bit = 0 16bit_adr = 0 ide2 active bit = 0 16bit_adr = 1 nhdcs2 (pin 27) output hi-z input (sa13) nhdcs3 (pin 28) output hi-z input (sa14) ide2_irq (pin 29) input (irq) hi-z input (sa15) ncs (pin 53) input (sa12) input (sa12) input (sa12)
211 table 100 - parallel port, logical device 3 [logical device number = 0x03] name reg index definition state pp mode register default = 0x3c on v cc por or reset_drv 0xf0 r/w bit[2:0] parallel port mode = 100 printer mode (default) = 000 standard and bi-directional (spp) mode = 001 epp-1.9 and spp mode = 101 epp-1.7 and spp mode = 010 ecp m ode = 011 ecp and epp-1.9 mode = 111 ecp and epp-1.7 mode bit[6:3] ecp fifo threshold 0111b (default) bit[7] pp interupt type not valid when the parallel port is in the printer mode (100) or the standard & bi-directional mode (000). = 1 pulsed low, releas ed to high-z. = 0 irq follows nack when parallel port in epp mode or [printer,spp, epp] under ecp. irq level type when the parallel port is in ecp, test, or centronics fifo mode. c pp mode register 2 default = 0x00 on v cc por or reset_drv 0xf1 r/w bit[1:0] ppfdc - muxed pp/fdc control = 00 normal parallel port mode = 01 ppfd1: drive 0 is on the fdc pins drive 1 is on the parallel port pins drive 2 is on the fdc pins drive 3 is on the fdc pins = 10 ppfd2: drive 0 is on the parallel port pins drive 1 i s on the parallel port pins drive 2 is on the fdc pins drive 3 is on the fdc pins bit[7:2] reserved. set to ?0?
212 table 101 - serial port 1, logical device 4 [logical device number = 0x04] name reg index definition state serial port 1 mode register default = 0x00 on v cc por or reset_drv 0xf0 r/w bit[0] midi mode = 0 midi support disabled (default) = 1 midi support enabled bit[1] high speed = 0 high speed disabled(default) = 1 high speed enabled bit[6:2] reserved, set to zero bit[7]: share irq =0 uarts use different irqs =1 uarts share a common irq see note below c note: to properly share an irq: 1. configure uart1 (or uart2) to use the desired irq pin. 2. configure uart2 (or uart1) to use no irq selected. 3. set the share irq bit. if both uarts are configured to use different irq pins and the share irq bit is set, then both of the uart irq pins will assert when either uart generates an interrupt. table 102 - serial port 2, logical device 5 [logical device number = 0x05] name reg index definition state serial port 2 mode register default = 0x00 on v cc por or reset_drv 0xf0 r/w bit[0] midi mode = 0 midi support disabled (default) = 1 midi support enabled bit[1] high speed = 0 high speed disabled(default) = 1 high speed e nabled bit[7:2] reserved, set to ?0? c
213 table 102 - serial port 2, logical device 5 [logical device number = 0x05] name reg index definition state ir option register default = 0x02 on v cc por or reset_drv 0xf1 r/w bit[0] receive polarity = 0 active high (default) = 1 active low bit[1] transmit polarity = 0 active high = 1 active low (default) bit[2] duplex select = 0 full duplex (default) = 1 half duplex bit[5:3] ir mode = 000 standard (default) = 001 irda = 010 ask-ir = 011 reserved = 1xx reserved bit[6] ir location mux = 0 use serial port tx2 and rx2 (default) = 1 use alternate irrx (pin 98) and irtx (pin 99) bit[7] reserved, write 0. c ir half duplex timeout default = 0x03 on v cc por or reset_drv 0xf2 bit [7:0] these bits set the half duplex time-out for the ir port. this value is 0 to 10msec in 100 m sec increments. 0= blank during transmit/receive 1= blank during transmit/receive + 100 m sec
214 table 103 - rtc, logical device 6 [logical device number = 0x06] name reg index definition state rtc mode register default = 0x00 on v cc por or reset_drv 0xf0 r/w bit[0] = 1 lock cmos ram 80-9fh bit[1] = 1 lock cmos ram a0-bfh bit[2] = 1 lock cmos ram c0-dfh bit[3] = 1 lock cmos ram e0-ffh bit[6:4] bank selection if bit[7]=1 (note 1) =000 bank 1 at secondary base address (default) (note 2) =001 bank 0 at 70h and bank 1 at secondary base address (note 3) =010 reserved (note 2) =011 bank 0 at 70h =100 reserved (note 2) =101 bank 0 at 70h =110 bank 2 at secondary base address (note 2) =111 bank 0 at 70h and bank 2 at secondary base address (note 3) bit[7] bank selection (note 1) = 0 se lect bank 0 at 70h = 1 select bank(s) based on bits[6:4] once set, bit[3:0] cannot be cleared by a write; bit[3:0] are cleared only on v cc power on reset or upon a hard reset. c serial eeprom mode register default = 0x00 on v cc por or reset_drv 0xf1 r/w bit[0] = 1 : lock eeprom 00-1fh bit[1] = 1 : lock eeprom 20-3fh bit[2] = 1 : lock eeprom 40-5fh bit[3] = 1 : lock eeprom 60-7fh bit[4] eeprom type = 0 256 bit,1 kbps (93c06,93c46) = 1 2 kbps, 4 kbps (93c56,93c66) bit[7:5] reserved, set to zero once set, bit[3:0] can not be cleared by a write; bit[3:0] are cleared only on v cc power on reset or upon a hard reset. c serial eeprom pointer default = 0x00, on v cc por,reset_drv or software reset. 0xf2 r/w use this register to set the serial eeprom's pointer. the value in this register always reflects the current eeprom pointer address. the serial device pointer increments after each pair of reads from the resource data register or after each pair of writes to the program resource data register. c
215 table 103 - rtc, logical device 6 [logical device number = 0x06] name reg index definition state write eeprom data 0xf3 w this register is used to program the serial device from the host. this device supports serial eeproms in x16 configurations. two bytes must be written to this register in order to generate an eeprom write cycle. the lsb leads the msb. the first write to this register resets bit 0 of the write status register. the second write resets bit 1 of the write status register and generates a write cycle to the serial eeprom. the write status register must be polled before performing a pair of writes to this register. c write status default = 0x03, on v cc por, reset_drv or software reset 0xf4 bit[6:0] read only bit[7] r/w bit [1:0] = 1,1 indicates that the write eeprom data register is ready to accept a pair of bytes. = 1,0 bit 0 is cleared on the first write of the write eeprom data register. this status indicates that the serial device controller has received one byte (lsb) and is waiting for the second byte (msb). = 0,0 bit 1 is cleared on the second write of the write eeprom data register indicating that two bytes have been accepted and that the serial device interface is busy writing the word to the eeprom. bit [6:2] reserved, set to ?0? bit [7] = 0 enables a prefetch of serial eeprom when the serial eeprom pointer register is written. this will typically be used when the host cpu wishes random read access from the serial eeprom. = 1 disables a prefetch of serial eeprom when the serial eeprom pointer register is written. this bit is typically set when the host cpu wishes to perform random word or block writes to the serial eeprom. c
216 table 103 - rtc, logical device 6 [logical device number = 0x06] name reg index definition state read eeprom data 0xf5 r this register allows the host to read data from the serial eeprom. data is not valid in this register until bit 0 of the read status register is set. since the eeprom is a 16-bit device, this register presents the lsb followed by the msb for each pair of register reads. immediately after the msb is read, bit 0 of the read status register will be cleared, then the serial eeprom pointer register will be auto- incremented, then the next word of eeprom data will be fetched, followed by the read status register, bit 0 being set. c read status 0xf6 r bit 0 = 1 indicates that data in the read eeprom data register is valid. this bit is cleared when eeprom data is read until the next byte is valid. reading the read eeprom data register when bit-0 is clear will have no detremental effects; the data will simply be invalid. c note 1: the rtc modifications allow for backwards compatibility. if bit[7] of the rtc mode register is set to 0, bank 0 is selected at 70h. if bit[7] is set to 1, the default values for bit[6:4] and the secondary base address for rtc bank 1 and 2 (cr62 and cr63) are such that bank 1 is selected at 70h. for added capability, banks 1 and 2 can be selected and relocated to another address. bank 1 can be selected either individually or with bank 0 by setting bit[7] of the rtc mode register and setting bit[6:4] appropriately. for example, with bit[7] = 1, setting bit[6:4] to 000 selects bank 1; setting bit[6:4] to 001 selects bank 0 and bank 1. similarly, bank 2 can be selected either individually or with bank 0. for example, with bit[7] = 1, setting bit[6:4] to 110 selects bank 2; setting bit[6:4] to 111 selects bank 0 and bank 2. these banks are relocatable through configuration registers 62 and 63 in logical device 6, the secondary base address for rtc bank 1 and bank 2. this 16-bit address register only applies to banks 1 and 2 and will only be used for address decode if bit[7] in the rtc mode register is set to 1. as an example, setting cr62 to 04 and cr63 to 70 moves banks 1 and 2 to address 470h. bank 0 is always located at 70h. the secondary base address must be at an even address. the data register is at the secondary base address + 1. note 2: bank 0 is ?off? note 3: the secondary base address must be set to a value other than 70h prior to selecting this option.
217 table 104 - keyboard, logical device 7 [logical device number = 0x07] name reg index definition state krst_ga20 default = 0x00 on v cc por or reset_drv 0xf0 r/w kreset and gatea20 select bit[7] polarity select for p12 = 0 p12 active low (default) = 1 p12 active high bit[6:3] reserved bit[2] port 92 select = 0 port 92 disabled = 1 port 92 enabled bit[1] gatea20 select = 0 software control = 1 hardware speed-up bit[0] kreset select = 0 software control = 1 hardware speed-up 0xf1 - 0xff reserved - read as ?0?
218 table 105 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state soft power enable register 1 default = 0x00 on vtr por 0xb0 r/w the following bits are the enables for the wake-up function of the npoweron bit. when enabled, these bits allow their corresponding function to turn on power to the system. 1 = enabled 0 = disabled bit[0] sp_ri1: uart 1 ring indicator pin bit[1] sp_ri2: uart 2 ring indicator pin bit[2] sp_kclk: keyboard clock pin bit[3] sp_mclk: mouse clock pin bit[4] sp_gpint1: group interrupt 1 bit[5] sp_gpint2: group interrupt 2 bit[6] sp_irrx2: irrx2 input pin bit[7] sp_rtc alarm: rtc alarm c soft power enable register 2 default = 0x80 on vtr por 0xb1 r/w the following bits are the enables for the wake-up function of the npoweron bit. when enabled, these bits allow their corresponding function to turn on power to the system. 1 = enabled 0 = disabled bit[0] sp_rxd1: uart 1 receive data pin bit[1] sp_rxd2: uart 2 receive data pin bit[3:2] reserved bit[4] al2_en: alarm 2 enable. defaults to 0. bit[5] reserved bit[6] pg_en: power good enable. defaults to 0. =0 disabled (npoweron pin not used for power good) =1 enabled (npoweron pin used as power good) bit[7] off_en: after power up, this bit defaults to 1, i.e., enabled. this bit allows the software to enable or disable the button control of power off. c
219 table 105 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state soft power status register 1 default = 0x00 on vtr por 0xb2 r/w the following bits are the status for the wake-up function of the npoweron bit. these indicate which of the enabled wakeup functions caused the power up. 1 = occured 0 = did not occur since last cleared the following signals are latched to detect and hold the soft power event (type 1) bit[0] ri1: uart 1 ring indicator; high to low transition on the pin, cleared by a read of this register bit[1] ri2: uart 2 ring indicator; high to low transition on the pin, cleared by a read of this register bit[2] kclk: keyboard clock; high to low transition on the pin, cleared by a read of this register bit[3] mclk: mouse clock; high to low transition on the pin, cleared by a read of this register bit[6] irrx2: irrx2 input; high to low transition on the pin, cleared by a read of this register bit[7] rtc alarm: rtc alarm; status of the rtc alarm internal signal. cleared by a read of the status register. the following signals are not latched to detect and hold the soft power event (type 2) bit[4] gpint1: group interrupt 1; status of the gpint1 internal signal. cleared at the source. bit[5] gpint2: group interrupt 2; status of the gpint2 internal signal. cleared at the source. c
220 table 105 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state soft power status register 2 default = 0x00 on vtr por 0xb3 r/w the following bits are the status for the wake-up function of the npoweron bit. these indicate which of the enabled wakeup functions caused the power up. 1 = occured 0 = did not occur since last cleared the following signals are latched to detect and hold the soft power event (type 1) bit[0] rxd1: uart 1 receive data; high to low transition on the pin, cleared by a read of this register bit[1] rxd2: uart 2 receive data; high to low transition on the pin, cleared by a read of this register bit[4] al2: rtc alarm 2 status; cleared by a read of this register. bit[5] reserved the following signal is latched to detect and hold the soft power event (type 3) but the output of the latch does not feed into the power down circuitry: bit[2] button: button pressed, cleared by a read of this register bit[3] reserved bits[7:6] reserved c smi enable register 1 default = 0x00 on vtr por 0xb4 r/w this register is used to enable the different interrupt sources onto the group nsmi output. 1=enable 0=disable bit[0] en_ide1 bit[1] en_pint bit[2] en_u2int bit[3] en_u1int bit[4] en_fint bit[5] en_gpint2 bit[6] en_gpint1 bit[7] en_wdt c
221 table 105 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state smi enable register 2 default = 0x00 on vtr por 0xb5 r/w this register is used to enable the different interrupt sources onto the group nsmi output, and the group nsmi output onto the nsmi gpi/o pin. unless otherwise noted, 1=enable 0=disable bit[0] en_mint bit[1] en_kint bit[2] en_irint bit[3] en_bint bit[4] en_p12: enable 8042 p1.2 to route internally to nsmi. 0=do not route to nsmi, 1=enable routing to nsmi. bit[5] en_abint: access bus interrupt. bit[6] rtc_en: this bit is used to enable the setting of the rtc_sts bit to generate an smi. the rtc_sts bit is set anytime the rtc generates an alarm 2. bit[7] en_smi: enable the group nsmi output onto the nsmi gpi/o pin. 0=smi pin floats, 1=enable group nsmi output onto nsmi gpi/o pin. c smi status register 1 default = 0x00 on vtr por 0xb6 r/w this register is used to read the status of the smi inputs. the following bits must be cleared at their source. bit[0] ide1 (ideinterrupt) bit[1] pint (parallel port interrupt) bit[2] u2int (uart 2 interrupt) bit[3] u1int (uart 1 interrupt) bit[4] fint (floppy disk controller interrupt) bit[5] gpint2 (group interrupt 2) bit[6] gpint1 (group interrupt 1) bit[7] wdt (watch dog timer) c
222 table 105 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state smi status register 2 default = 0x00 on vtr por 0xb7 r/w this register is used to read the status of the smi inputs. bit[0] mint: mouse interrupt. cleared at source. bit[1] kint: keyboard interrupt. cleared at source. bit[2] irint: this bit is set by a transition on the ir pin (rdx2 or gp12 as selected in cr l5-f1-b6 i.e., after the mux). cleared by a read of this register. bit[3] bint: this bit is set when the delay counter is started. cleared by a read of this register. bit[4] p12: 8042 p1.2. cleared at source bit[5] abint: access bus interrupt. cleared at source. bit[6] rtc_sts: this bit is set when the rtc generates an alarm 2. additionally if the rtc_en bit is set then the setting of the rtc_sts bit will generate an smi. cleared by writing a 1 to this location. writing a 0 has no effect. bit[7] reserved c delay 2 time set register default = 0x00 on vtr por 0xb8 r/w this register is used to set delay 2 (for soft power management) to a value from 500 msec to 32 sec. the default value is 500msec. bit[5:0] the value of these bits correspond to the delay time as follows: 000000= 500msec min to 510msec max 000001= 1sec min to 1.01sec max 000010= 1.5sec min to 1.51sec max 000011= 2sec min to 2.01sec max ... 111111 = 32sec min to 32.01sec max bit[7:6] reserved c
223 table 105 (cont?d) - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp40 default= 0x01 on vtr por 0xc0 general purpose i/o bit 4.0 bit[4:3] function select =00 media_id1 =01 gpi/o =10 ir mode =11 irr3 c gp41 default= 0x01 on vtr por 0xc1 general purpose i/o bit 4.1 bit[4:3] function select =00 media_id0 =01 gpi/o =10 reserved =11 reserved c gp42 default= 0x00 on vtr por 0xc2 general purpose i/o bit 4.2 bit[4:3] function select =00 nide1_oe =01 gpi/o =10 either edge triggered interrupt input 1 enable =11 reserved c gp43 default= 0x00 on vtr por 0xc3 general purpose i/o bit 4.3 bit[4:3] function select =00 nhdcs0 =01 gpi/o =10 reserved =11 reserved c gp44 default= 0x00 on vtr por 0xc4 general purpose i/o bit 4.4 bit[4:3] function select =00 nhdcs1 =01 gpi/o =10 reserved =11 reserved c gp45 default= 0x01 on vtr por 0xc5 general purpose i/o bit 4.5 bit[4:3] function select =00 ide1_irq =01 gpi =10 reserved =11 reserved c
224 table 105 (cont?d) - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp46 default= 0x01 on vtr por 0xc6 general purpose i/o bit 4.6 bit[4:3] function select =00 niorop =01 gpi/o =10 power led output =11 wdt c gp47 default= 0x01 on vtr por 0xc7 general purpose i/o bit 4.7 bit[4:3] function select =00 niowop =01 gpi/o =10 nsmi =11 reserved c gp50 default= 0x01 on vtr por 0xc8 general purpose i/o bit 5.0 bit[4:3] function select =00 button_in =01 gpi/o =10 reserved =11 reserved c gp51 default= 0x80 on vtr por 0xc9 general purpose i/o bit 5.1 bit[4:3] function select =00 npoweron =01 gpi/o =10 reserved =11 reserved c gp53 default= 0x01 on vtr por 0xcb general purpose i/o bit 5.3 bit[4:3] function select =00 nromcs =01 gpi/o =10 reserved =11 reserved c gp54 default= 0x01 on vtr por 0xcc general purpose i/o bit 5.4 bit[4:3] function select =00 nromoe =01 gpi/o =10 ir mode =11 irr3 c 0xcd-0xcf reserved c gp60 default= 0x01 on vtr por 0xd0 general purpose i/o bit 6.0 bit[4:3] function select =00 rd0 =01 gpi/o =10 power led output =11 reserved c
225 table 105 (cont?d) - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp61 default= 0x01 on vtr por 0xd1 general purpose i/o bit 6.1 bit[4:3] function select =00 rd1 =01 gpi/o =10 wdt =11 reserved c gp62 default= 0x01 on vtr por 0xd2 general purpose i/o bit 6.2 bit[4:3] function select =00 rd2 =01 gpi/o =10 8042 - p12 =11 reserved c gp63 default= 0x01 on vtr por 0xd3 general purpose i/o bit 6.3 bit[4:3] function select =00 rd3 =01 gpi/o =10 8042 - p13 =11 reserved c gp64 default= 0x01 on vtr por 0xd4 general purpose i/o bit 6.4 bit[4:3] function select =00 rd4 =01 gpi/o =10 8042 - p14 =11 reserved c gp65 default= 0x01 on vtr por 0xd5 general purpose i/o bit 6.5 bit[4:3] function select =00 rd5 =01 gpi/o =10 8042 - p15 =11 reserved c gp66 default= 0x01 on vtr por 0xd6 general purpose i/o bit 6.6 bit[4:3] function select =00 rd6 =01 gpi/o =10 8042 - p16 =11 reserved c gp67 default= 0x01 on vtr por 0xd7 general purpose i/o bit 6.7 bit[4:3] function select =00 rd7 =01 gpi/o =10 8042 - p17 =11 reserved c
226 table 105 (cont?d) - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp70 default= 0x01 on vtr por 0xd8 general purpose i/o bit 7.0 bit[4:3] function select =00 nri2 =01 gpi/o =10 reserved =11 reserved c gp71 default= 0x01 on vtr por 0xd9 general purpose i/o bit 7.1 bit[4:3] function select =00 ndcd2 =01 gpi/o =10 reserved =11 reserved c gp72 default= 0x01 on vtr por 0xda general purpose i/o bit 7.2 bit[4:3] function select =00 rxd2 =01 gpi/o =10 reserved =11 reserved c gp73 default= 0x01 on vtr por 0xdb general purpose i/o bit 7.3 bit[4:3] function select =00 txd2 =01 gpi/o =10 reserved =11 reserved c gp74 default= 0x01 on vtr por 0xdc general purpose i/o bit 7.4 bit[4:3] function select =00 ndsr2 =01 gpi/o =10 reserved =11 reserved c gp75 default= 0x01 on vtr por 0xdd general purpose i/o bit 7.5 bit[4:3] function select =00 nrts2 =01 gpi/o =10 reserved =11 reserved c gp76 default= 0x01 on vtr por 0xde general purpose i/o bit 7.6 bit[4:3] function select =00 ncts2 =01 gpi/o =10 reserved =11 reserved c
227 table 105 (cont?d) - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp77 default= 0x01 on vtr por 0xdf general purpose i/o bit 7.7 bit[4:3] function select =00 ndtr2 =01 gpi/o =10 reserved =11 reserved c
228 definition for gp registers bit[0] in/out: =1 input, =0 output bit[1] polarity: =1 invert, =0 no invert bit[2] int en 1: =1 enable combined irq 1 =0 disable combined irq 1 bit[4:3] function select =00 original function =01 alternate function 1 =10 alternate function 2 (or reserved) =11 alternate function 3 (or reserved) bit[5] reserved bit[6] int en 2 =1 enable combined irq 2 =0 disable combined irq 2 bit[7] open collector: =1 open collector, =0 push pull therefore, unless otherwise required, only bit[4:3] are defined in the following table. table 106 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp10 default = 0x01 on vtr por 0xe0 general purpose i/0 bit 1.0 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[3] alt func (if configured as input, the input signal is steered to the selected irq) =1 select alternate function =0 select basic i/o function bit[7:4] alt fuct irq mapping 1111 = irq15 ......... 0011 = irq3 0010 = invalid 0001 = irq1 0000 = disable c
229 table 106 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp11 default = 0x01 on vtr por 0xe1 general purpose i/0 bit 1.1 bit[0] in/out: =1 input, =0 output bit[1] polarity: =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[3-7] these bits are used for selection of the pin function as follows: bit 7 6 5 4 3 function output type irq mapping 0 x x 0 0 gpio push pull n/a 1 x x 0 0 gpio open collector n/a 0 x x 1 0 irq13 push pull n/a 1 x x 1 0 irq13 open collector n/a 1 1 1 1 1 irqin push pull irq15 1 1 1 0 1 irqin push pull irq14 1 1 0 1 1 irqin push pull reserved ..... 0 0 1 1 1 irqin push pull irq3 0 0 1 0 1 irqin push pull reserved 0 0 0 1 1 irqin push pull irq1 0 0 0 0 1 irqin push pull disable c gp12 default = 0x01 on vtr por 0xe2 general purpose i/0 bit 1.2 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[3] alt func wdt output or irrx input. =1 sel ect alternate function =0 select basic i/o function (irrx - if bit-6 of the ir options register is set) bit[7:4] reserved = 0000 c
230 table 106 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp13 default = 0x01 on vtr por 0xe3 general purpose i/0 bit 1.3 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[3] alt func power led or irtx output =1 select alternate function =0 select basic i/o function (irtx - if bit-6 of the ir options register is set) bit[7:4] reserved = 0000 c gp14 default = 0x01 on vtr por 0xe4 general purpose i/0 bit 1.4 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[3] alt func: general purpose address decode (active low) decodes two address bytes =1 select alternate function =0 select basic i/o function bit[7:4] reserved = 0000 c gp15 default = 0x01 on vtr por 0xe5 general purpose i/0 bit 1.5 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[3] alt func: gen. purpose write strobe (active low) =1 select alternate function =0 select basic i/o function bit[7:4] reserved = 0000 c
231 table 106 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp16 default = 0x01 on vtr por 0xe6 general purpose i/0 bit 1.6 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[4:3] alt func: joystick (active low) =01 joystick rd strobe func tion =10 joystick cs function =00 select basic i/o function bit[7:5] reserved = 000 c gp17 default = 0x01 on vtr por 0xe7 general purpose i/0 bit 1.7 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enabl e combined irq =0 disable combined irq bit[3] alt function: joystick write strobe (active low) =1 select alternate function =0 select basic i/o function bit[7:4] reserved = 0000 c gp20 default = 0x01 on vtr por 0xe8 general purpose i/0 bit 2.0 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[3] alt func: ide2 buffer enable (active low) =1 select alternate function =0 select basic i/o function bit[4] alt function: 8042 p20, typically used to generate a "keyboard reset" used by systems in order to switch from "protected mode" back to "real mode" =1 select alternate function =0 select basic i/o function bit[7:5] reserved = 000 note: bit[3] and bit[4] should not bo th be set at the same time c
232 table 106 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp21 default = 0x01 on vtr por 0xe9 general purpose i/0 bit 2.1 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[4:3] alt func: =00 select basic i/o function =01 serial eeprom data in =10 ab_data bit[6:5] reserved = 0000 bit[7] open collector: =1 open collector, =0 push pull c gp22 default = 0x01 on vtr por 0xea general purpose i/0 bit 2.2 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[4:3] alt func: =01 serial eeprom data out =00 select basic i/o function =10 ab_clk bit[6:5] reserved = 0000 bit[7] open collector: =1 open collector, =0 push pull c gp23 default = 0x01 on vtr por 0xeb general purpose i/0 bit 2.3 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[4:3] function select =00 gpio =01 serial eeprom clock =10 either edge triggered interrupt input 2 enable =11 reserved bit[7:5] reserved = 0000 c
233 table 106 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp24 default = 0x01 on vtr por 0xec general purpose i/0 bit 2.4 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[4:3] function select =00 gpio =01 serial eeprom enable =10 either edge triggered interrupt input 3 enable =11 reserved bit[7:5] reserved = 000 c gp25 default = 0x01 on vtr por 0xed general purpose i/0 bit 2.5 bit[0] in/out =1 input, =0 output bit[1] polarity =1 invert, =0 no invert bit[2] int en =1 enable combined irq =0 disable combined irq bit[3] alt func: gatea20 =1 select alternate function =0 select basic i/o function bit[7:4] : reserved = 0000 c 0xee reserved c gp_int2 default = 0x00 on vtr por 0xef general purpose i/o combined interrupt 2 bit[2:0] reserved, = 000 bit[3] gp irq filter select 0 = debounce filter bypassed 1 = debounce filter enabled bit[7:4] combined irq mapping 1111 = irq15 ......... 0011 = irq3 0010 = invalid 0001 = irq1 0000 = disable
234 table 106 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp_int1 default = 0x00 on vtr por 0xf0 general purpose i/o combined interrupt 1 bit[2:0] reserved, = 000 bit[3] gp irq filter select 0 = deboun ce filter bypassed 1 = debounce filter enabled bit[7:4] combined irq mapping 1111 = irq15 ......... 0011 = irq3 0010 = invalid 0001 = irq1 0000 = disable c gpa_gpw_en default = 0x00 on v cc por or reset_drv 0xf1 general purpose read/write enable bit[0] =1 enable gp address decoder =0 disable gpa address decoder. bit[1] =1 enable gpw, =0 disable gpw bit[6:2] reserved, = 00000 bit[7] wdt time-out value units select = 0 minutes (default) = 1 seconds note: if the logical device's activate bit is not set then bits 0 and 1 have no effect. c wdt_val default = 0x00 on v cc por or reset_drv 0xf2 watch-dog timer timeout value binary coded, units = minutes (default) or seconds, selectable via bit[7] of reg 0xf1, logical device 8. 0x00 timeout disabled 0x01 timeout = 1 minute (second) ......... 0xff timeout = 255 minutes (seconds) c
235 table 106 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state wdt_cfg default = 0x00 on vcc por or reset_drv 0xf3 watchdog timer configuration bit[0] joy-stick enable =1 wdt is reset upon an i/o read or write of the game port =0 wdt is not affected by i/o reads or writes to the game port. bit[1] keyboard enable =1 wdt is reset upon a keyboard interrupt. =0 wdt is not affected by keyboard interrupts. bit[2] mouse enable =1 wdt is reset upon a mouse interrupt =0 wdt is not affected by mou se interrupts. bit[3] pwrled timeout enable =1 enables the power led to toggle at a 1 hz rate with 50 percent duty cycle while the watch- dog status bit is set. =0 disables the power led toggle during watch-dog timeout status. bit[7:4] wdt interrupt mapping 1111 = irq15 ......... 0011 = irq3 0010 = invalid 0001 = irq1 0000 = disable c wdt_ctrl default = 0x00 cleared by vtr por 0xf4 watchdog timer control bit[0] watch-dog status bit, r/w =1 wd timeout occured =0 wd timer counting bit[1] power led toggle enable, r/w =1 toggle power led at 1 hz rate with 50 percent duty cycle. (1/2 sec. on, 1/2 sec. off) =0 disable power led toggle bit[2] force timeout, w =1 forces wd timeout event; this bit is self-clearing bit[3] p20 force timeout enable, r/w = 1 allows rising edge of p20, from the keyboard controller, to force the wd timeout event. a wd timeout event may still be forced by setting the force timeout bit, bit 2. = 0 p20 activity does not generate the wd timeout event. c
236 table 106 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state the p20 signal will remain high for a minimum of 1us and can remain high indefinitely. therefore, when p20 forced timeouts are enabled, a self- clearing edge-detect circuit is used to generate a signal which is ored with the signal generated by the force timeout bit. bit[4] reserved. set to 0 bit[5] stop_cnt: this is used to terminate delay 2 (note 1) without generating a power own. this is used if the software determines that the power down should be aborted. when read, this bit indicates the following: stop_cnt = 0; counter running stop_cnt = 1; counter stopped. note: the write is self clearing. bit[6] restart_cnt: this is used to restart delay 2 (note 1) from the button input to the generation of the power down. when restarted, the count will start over and delay the power down for the time that delay 2 is set for (default=500msec). the software can continue to do this indefinately with out allowing a powerdown. this bit is self clearing. 1=restart; automatically cleared. bit[7] spoff: this is used to force a software power down. this bit is self clearing. note 1: this delay is programmable via the delay 2 time set register at logical device 8, 0xb8. gp1 default = 0x00 on v cc por or reset_drv 0xf6 refer to table 49 for bit definitions. gp2 default = 0x00 on v cc por or reset_drv 0xf7 refer to table 49 for bit definitions. gp4 default = 0x00 on v cc por or reset_drv 0xf8 refer to table 49 for bit definitions.
237 table 106 - auxilliary i/o, logical device 8 [logical device number = 0x08] name reg index definition state gp5 default = 0x00 on v cc por or reset_drv 0xf9 refer to table 49 for bit definitions. gp6 default = 0x00 on v cc por or reset_drv 0xfa refer to table 49 for bit definitions. gp7 default = 0x00 on v cc por or reset_drv 0xfb refer to table 49 for bit definitions. note: registers gp1-2, wdt_ctrl, gp4-7, soft power and smi enable and status registers are also available a t index 01-0f when not in configuration mode. see table 49. table 107 - access bus, logical device 9 [logical device number = 0x09] name reg index definition state 0xf0 - 0xff reserved - read as ?0? table 108 - acpi, logical device a [logical device number=0x0a] name reg index definition state 0xf0 - 0xff reserved - read as ?0?
238 operational description maximum guaranteed ratings * operating temperature range ................................ ................................ ......................... 0 o c to +70 o c storage temperature range ................................ ................................ .......................... -55 o to +150 o c lead temperature range (soldering, 10 seconds) ................................ ................................ .... +325 o c positive voltage on any pin, with respect to ground ................................ ................................ v cc +0.3v negative voltage on any pin, with respect to ground ................................ ................................ .... -0.3v maximum v cc ................................ ................................ ................................ ................................ . +7v *stresses above those listed above could cause permanent damage to the device. this is a stress rating only and functional operation of the device at any other condition above those indicated in the operation sections of this specification is not implied. note: when powering this device from laboratory or system power supplies, it is important that the absolute maximum ratings not be exceeded or device failure can result. some power supplies exhibit voltage spikes on their outputs when the ac power is switched on or off. in addition, voltage transients on the ac power line may appear on the dc output. if this possibility exists, it is suggested that a clamp circuit be used. dc electrical characteristics (t a = 0 c - 70 c, v cc = +5 v 10%) parameter symbol min typ max units comments i type input buffer low input level high input level v ili v ihi 2.0 0.8 v v ttl levels is type input buffer low input level high input level schmitt trigger hysteresis v ilis v ihis v hys 2.2 250 0.8 v v mv schmitt trigger schmitt trigger iclk input buffer low input level high input level v ilck v ihck 2.2 0.4 v v iclk2 input buffer input level 500 mv v p - p
239 parameter symbol min typ max units comments input leakage (all i and is buffers) low input leakage high input leakage i il i ih -10 -10 +10 +10 m a m a v in = 0 v in = v cc v bat 2.4 3.0 4.0 v i bat standby current input leakage 1.0 100 2.0 m a na v cc =v ss =0 v cc =5v, v bat =3v o4 type buffer low output level high output level output leakage v ol v oh i ol 2.4 -10 0.4 +10 v v m a i ol = 4 ma i oh = -2 ma v in = 0 to v cc (note 1) o8sr type buffer low output level high output level output leakage rise time fall time v ol v oh i ol t rt t fl 2.4 -10 5 5 0.4 +10 v v m a ns ns i ol = 8 ma i oh = -8 ma v in = 0 to v cc (note 1) o24 type buffer low output level high output level output leakage v ol v oh i ol 2.4 -10 0.4 +10 v v m a i ol = 24 ma i oh = -12 ma v in = 0 to v cc (note 1)
240 parameter symbol min typ max units comments o16sr type buffer low output level high output level output leakage rise time fall time v ol v oh i ol t rt t fl 2.4 -10 5 5 0.4 +10 v v m a ns ns i ol = 16 ma i oh = -16 ma v in = 0 to v cc (note 1) od16p type buffer low output level output leakage v ol i ol -10 0.4 +10 v m a i ol = 16 ma i oh = 90 m a (note 2) v in = 0 to v cc (note 1) od24 type buffer low output level output leakage v ol i ol 0.4 +10 v m a i ol = 24 ma v in = 0 to v cc (note 1) od48 type buffer low output level output leakage v ol i ol 0.4 +10 v m a i ol = 48 ma v in = 0 to v cc (note 1) oclk2 type buffer low output level high output level output leakage v ol v oh i ol 3.5 -10 0.4 +10 v v m a i ol = 2 ma i oh = -2 ma v in = 0 to v cc (note 1) chiprotect (slct, pe, busy, nack, nerror) i il 10 m a v cc = 0v v in = 6v max
241 parameter symbol min typ max units comments backdrive (nstrobe, nautofd, ninit, nslctin) i il 10 m a v cc = 0v v in = 6v max backdrive (pd0-pd7) i il 10 m a v cc = 0v v in = 6v max suppy current active i cci 4.5 70 90 ma all outputs open. note 1: all output leakages are measured with the current pins in high impedance. output leakage is measured with the low driving output off, either for a high level output or a high impedance state. note 2: kbclk, kbdata, mclk, mdata contain 90 m a min pull-ups. capacitance t a = 25 c; fc = 1 mhz; v cc = 5v limits parameter symbol min typ max unit test condition clock input capacitance c in 20 pf input capacitance c in 10 pf output capacitance c out 20 pf all pins except pin under test tied to ac ground
242 power supply operational modes standard operational modes table 109 - standard operational modes for the power supplies. mode vbat vtr vcc rtc only (1) 3.3v 0 0 standby (2) (3) 3.3v 5v @ 2ma max 0 full power (2) 3.3v 5v @ 2ma max 5v note 1: rtc power supplied by vbat note 2: rtc power supplied by vtr note 3: in standby mode, the following are operational: rtc, rtc alarm 2, power control (wakeup) logic (button input and power on) and soft power management logic. when v cc goes away, certain registers will be powered by vtr. similarly, when vtr goes away, certain registers will be powered by vbat. these registers are discussed in the soft power management and rtc section. power supply non-standard modes table 110 - non-standard operational modes for the power supplies. non-standard mode vbat vtr vcc ns1 0 5v @ 2ma max 0 ns2 0 5v @ 2ma max 5v ns3 0 0 5v ns4 3.3v 0 5v
243 timing diagrams for the timing diagrams shown, the following capacitive loads are used. name capacitance total (pf) sd[0:7] 240 iochrdy 240 irq[1,3:12,14,15] 120 drq[0:3] 120 hclk 50 16clk 50 clk01 50 clk02 50 clk03 50 nwgate 240 nwdata 240 nhdsel 240 ndir 240 nstep 240 nds[1:0] 240 nmtr[1:0] 240 drvden[1:0] 240 txd1 100 nrts1 100 ndtr1 100 txd2 100 nrts2 100 ndtr2 100 nide1_oe 100 nhdcs0 240 nhdcs1 240 niorop 240 niowop 240 nhdcs2 240 nhdcs3 240 pd[0:7] 240 nslctin 240 ninit 240 nalf 240 nstb 240 kdat 240 kclk 240
244 name capacitance total (pf) mdat 240 mclk 240 npoweron 100 button_in 100 gp1[0:7], gp2[0:5] 100 rd[0:7] 100
245 button_in t f t r figure 15a - button input timing name description min typ max units t r , t f button_in rise/fall time 0.5 m s vcc npoweron button_in t2 t1 t3 blanking period release figure 15b - button override timing name description min typ max units t1 button_in hold time for override event 4 s t2 button _in low to npoweron tristate and vcc low and start of blanking period 4 s t3 blanking period after release of button_in 4 s
246 t2 t1 t4 t5 sax sd<7:0> niow t3 figure 16 - iow timing for port 92 iow timing name description min typ max units t1 sax valid to niow asserted 40 ns t2 sdata valid to niow asserted 0 ns t3 niow asserted to sax invalid 10 ns t4 niow deasserted to data invalid 0 ns t5 niow deasserted to niow or nior asserted 100 ns
247 t3 vcc all host accesses t2 t1 figure 17 - power-up timing name description min typ max units t1 vcc slew from 4.5v to 0v 300 m s t2 vcc slew from 0v to 4.5v 100 m s t3 all host accesses after powerup (note 1) 125 500 m s note 1: internal write-protection period after vcc passes 4.5 volts on power-up
248 name descrip tion min typ max units t1 sa[x], ncs and aen valid to niow assert ed 10 ns t2 niow assert ed to niow d easserted 80 ns t3 niow assert ed to sa[x], ncs in valid 10 ns t4 sd[x] valid to niow deasserted 45 ns t5 sd[x] hold from niow deasserted 0 ns t6 niow deasserted to niow assert ed 25 ns t7 niow deasserted to fintr deasserted (note 2) 55 ns t8 niow deasserted to pinter deasserted (note 3) 260 ns t9 ibf (internal sig nal) assert ed from niow deasserted 40 ns t10 niow deasserted to aen invalid 10 ns t11 niow deasserted to gpi/o out valid 100 ns note 1: if access.bus is used at 12 mhz, use 100 ns. note 2: fintr refers to the irq used by the floppy disk. note 3: pintr refers to the irq used by the parallel port t10 t3 t1 t2 t4 t6 t5 t8 t9 data valid aen sa[x], ncs niow sd[x] fintr pintr ibf gp i/o t11 t7 figure 18 - isa write
249 t13 t3 t1 t7 t2 t6 t4 t5 t10 t9 t11 t12 t8 data valid aen sa[x], ncs nior sd[x] pd[x], nerror, pe, slct, ack, busy finter pinter pcobf auxobf1 nior/niow figure 19 - isa read see timing parameters on next page
250 isa read timing name description min typ max units t1 sa[x], ncs and aen valid to nior asserted 10 ns t2 nior asserted to nior deasserted 50 ns t3 niorasserted to sa[x], ncs invalid 10 ns t4 nior asserted to data valid 50 ns t5 data hold/float from nior deasserted 10 25 ns t6 nior deasserted 25 ns t8 nior aserted after niow deasserted 80 ns t8 nior/nior, niow/niow transfers from/to ecp fifo 150 ns t7 parallel port setup to nior asserted 20 ns t9 nior asserted to pinter deasserted 55 ns t10 nior deasserted to finter deasserted 260 ns t11 nior deasserted to pcobf deasserted (notes 4,6) 80 ns t12 nior deasserted to auxobf1 deasserted (notes 5,6) 80 ns t13 niow deasserted to aen invalid 10 ns note 1: if access.bus is used at a clock rate below 24 mhz, use 100 ns. note 2: fintr refers to the irq used by the floppy disk. note 3: pintr refers to the irq used by the parallel port. note 4: pcobf is used for the keyboard irq. note 5: auxobf1 is used for the mouse irq. note 6: applies only i f deassertion is performed in hardware.
251 name description min typ max units t1 nwrt deasserted to auxobf1 asserted (notes 1,2) 40 ns t2 nwrt deasserted to pcobf asserted (notes 1,3) 40 ns t3 nrd dasserted to ibf deasserted (note 1) 40 ns note 1: ibf, nwrt and nrd are internal signals. note 2: pcobf is used for the keyboard irq. note 3: auxobf1 is used for the mouse irq. t2 t1 t3 pcobf auxobf1 nwrt ibf nrd figure 20 - internal 8042 cpu timing
252 name description min typ max units t1 clock cycle time for 14.318 mhz 70 ns t2 clock high time/low time for 14.318 mhz 35 ns t1 clock cycle time for 32 khz 31.25 m s t2 clock high time/low time for 32 khz 16.53 m s clock rise time/fall time (not shown) 5 ns name description min typ max units t4 reset width (note 1) 1.5 m s note 1: the reset width is dependent upon the processor clock. the reset must be active while the clock is running and stable. t1 t2 t2 x1k figure 21a - input clock timing t4 reset figure 21b - reset timing
253 name description min typ max units t1 ide_irq low-high edge to irq low-high edge propagation delay. edge high type interrupt selected. 30 ns t2 ide_irq high-low edge to irq high-low edge propagation delay. edge high type interrupt selected. 30 ns note: ide irq input and pass-through irq timing definition: ide_ irq is the interrupt request input from an ide hard drive which is defined as a low to high edge type interrupt held high until the interrupt is serviced. idex_irq irqx t1 t2 figure 22 - irq timing
254 name description min typ max units t2 nior in to niorop output 25 ns t3 niow in to niowop output 25 ns t2 t2 t3 t3 nior niorop niow niowop figure 23 - niorop, niowop timing
255 note 1: rd[x] driven by fdc37c93x, sd[x] driven by system note 2: rd[x] driven by rom, sd[ x] driven by FDC37C93XAPM name description min typ max units t1 sd[x] valid to rd[x] valid 25 ns t2 nromcs active to rd[x] driven 25 ns t3 nromcs inactive to rd[x] float 25 ns t4 rd[x] valid to sd[x] valid 25 ns t5 nromcs active to sd[x] driven 25 ns t6 nromcs inactive to sd[x] float 25 ns t7 nromoe active to rd[x] float 25 ns t8 nromoe inactive to rd[x] driven 25 ns note 1: outputs have a 50 pf load. t2 t1 t3 t2 t7 t8 t3 t5 t4 t6 note 1 note 2 nromcs nromoe rd[x] sd[x] figure 24 - rom interface timing
256 figure 25a - dma timing (single transfer mode) name description min typ max units t1 ndack delay time from fdrq high 0 ns t2 drq reset delay from nior or niow 100 ns t3 fdrq reset delay from ndack low 100 ns t4 ndack width 150 ns t5 nior delay from fdrq high 0 ns t6 niow delay from fdrq high 0 ns t7 data access time from nior low 100 ns t8 data set up time to niow high 40 ns t9 data to float delay from nior high 10 60 ns t10 data hold time from niow high 10 ns t11 ndack set up to niow/nior low 5 ns t12 ndack hold after niow/nior high 10 ns t13 tc pulse width 60 ns t14 aen set up to nior/niow 40 ns t15 aen hold from ndack 10 ns t16 tc active to pdrq inactive 100 ns t15 t2 t3 t12 t16 t1 t4 t5 t6 t11 t14 t8 t7 t9 t10 t13 aen fdrq, pdrq ndack nior or niow data (do-d7) tc data valid
257 figure 25b - dma timing (burst transfer mode) name description min typ max units t1 ndack delay time from fdrq high 0 ns t2 drq reset delay from nior or niow 100 ns t3 fdrq reset delay from ndack low 100 ns t4 ndack width 150 ns t5 nior delay from fdrq high 0 ns t6 niow delay from fdrq high 0 ns t7 data access time from nior low 100 ns t8 data set up time to niow high 40 ns t9 data to float delay from nior high 10 60 ns t10 data hold time from niow high 10 ns t11 ndack set up to niow/nior low 5 ns t12 ndack hold after niow/nior high 10 ns t13 tc pulse width 60 ns t14 aen set up to nior/niow 40 ns t15 aen hold from ndack 10 ns t16 tc active to pdrq inactive 100 ns t15 t2 t3 t12 t16 t1 t4 t5 t6 t11 t14 t8 t7 t9 t10 t13 aen fdrq, pdrq ndack nior or niow data (do-d7) tc data valid data valid
258 name description min typ max units t1 ndir set up to step low 4 x* t2 nstep active time low 24 x* t3 ndir hold time after nstep 96 x* t4 nstep cycle time 132 x* t5 nds0-1 hold time from nstep low 20 x* t6 nindex pulse width 2 x* t7 nrdata active time low 40 ns t8 nwdata write data width low .5 y* t9 nds0-1, mtro-1 from end of niow 25 ns *x specifies one mclk period and y specifies one wclk period. mclk = 16 x data rate (at 500 kbps mclk = 8 mhz) wclk = 2 x data rate (at 500 kbps wclk = 1 mhz) t3 t1 t2 t4 t5 t6 t7 t8 t9 t9 ndir nstep nds0-3 nindex nrdata nwdata niow nds0-1, mtr0-1 figure 26 - disk drive timing (at mode only)
259 name description min typ max units t1 nrtsx, ndtrx delay from niow 200 ns t2 irqx active delay from nctsx, ndsrx, ndcdx 100 ns t3 irqx inactive delay from nior (leading edge) 120 ns t4 irqx inactive delay from niow (trailing edge) 125 ns t5 irqx inactive delay from niow 10 100 ns t6 irqx active delay from nrix 100 ns t1 t5 t2 t4 t6 t3 niow nrtsx, ndtrx irqx nctsx, ndsrx, ndcdx irqx niow irqx nior nrix figure 27 - serial port timing
260 name description min typ max units t1 nideenlo, nideenhi, ngamecs, nhdcsx delay from naen 40 ns t2 nideenlo, nideenhi, ngamecs, nhdcsx delay from a0 - a9 40 ns t3 nideenlo delay from nideenhi, aen 40 ns t1 t2 t3 naen a0-a9 nideenlo, nideenhi, nhdcsx, ngamecs figure 28 - ide interface timing
261 figure 29 - parallel port timing name description min typ max units t1 pd0-7, ninit, nstrobe, nautofd delay from niow 100 ns t2 pintr delay from nack, nfault 60 ns t3 pintr active low in ecp and epp modes 200 300 ns t4 pintr delay from nack 105 ns t5 nerror active to pintr active 105 ns t6 pd0 - pd7 delay from iow active 100 ns note: pintr refers to the irq used by the parallel port. t1 t4 t3 t2 t2 t5 t3 niow ninit, nstrobe. nautofd, slctin nack pintr (ecp or epp enabled) nfault (ecp) nerror (ecp) pintr pd0- pd7 t6 npintr (spp)
262 t18 t9 t8 t17 t12 t19 t10 t11 t13 t20 t22 t2 t1 t5 t3 t14 t16 t4 t6 t15 t7 t21 a0-a10 sd<7:0> niow iochrdy nwrite pd<7:0> ndatast naddrstb nwait pdir figure 30a - epp 1.9 data or address write cycle see timing parameters on next page
263 figure 30b - epp 1.9 data or address write cycle timing name description min typ max units t1 niow asserted to pdata valid 0 50 ns t2 nwait asserted to nwrite change (note 1) 60 185 ns t3 nwrite to command asserted 5 35 ns t4 nwait deasserted to command deasserted (note 1) 60 190 ns t5 nwait asserted to pdata invalid (note 1) 0 ns t6 time out 10 12 m s t7 command deasserted to nwait asserted 0 ns t8 sdata valid to niow asserted 10 ns t9 niow deasserted to data invalid 0 ns t10 niow asserted to iochrdy asserted 0 24 ns t11 nwait deasserted to iochrdy deasserted (note 1) 60 160 ns t12 iochrdy deasserted to niow deasserted 10 ns t13 niow asserted to nwrite asserted 0 70 ns t14 nwait asserted to command asserted (note 1) 60 210 ns t15 command asserted to nwait deasserted 0 10 m s t16 pdata valid to command asserted 10 ns t17 ax valid to niow asserted 40 ns t18 niow asserted to ax invalid 10 ns t19 niow deasserted to niow or nior asserted 40 ns t20 nwait asserted to nwrite asserted (note 1) 60 185 ns t21 nwait asserted to pdir low 0 ns t22 pdir low to nwrite asserted 0 ns note 1: nwait must be filtered to compensate for ringing on the parallel bus cable. wait is considered to have settled after it does not transition for a minimum of 50 nsec.
264 t20 t19 t11 t22 t13 t12 t8 t10 t18 t23 t24 t27 t9 t21 t17 t2 t25 t5 t4 t16 t1 t14 t26 t28 t3 t7 t15 t6 pdata bus driven by peripheral a0-a10 ior sd<7:0> iochrdy pdir nwrite pd<7:0> datastb addrstb nwait figure 31a - epp 1.9 data or address read cycle see timing parameters on next page
265 figure 31b - epp 1.9 data or address read cycle timing parameters name description min typ max units t1 pdata hi-z to command asserted 0 30 ns t2 nior asserted to pdata hi-z 0 50 ns t3 nwait deasserted to command deasserted (note 1) 60 180 ns t4 command deasserted to pdata hi-z 0 ns t5 command asserted to pdata valid 0 ns t6 pdata hi-z to nwait deasserted 0 m s t7 pdata valid to nwait deasserted 0 ns t8 nior asserted to iochrdy asserted 0 24 ns t9 nwrite deasserted to nior asserted (note 2) 0 ns t10 nwait deasserted to iochrdy deasserted (note 1) 60 160 ns t11 iochrdy deasserted to nior deasserted 0 ns t12 nior deasserted to sdata hi-z (hold time) 0 40 ns t13 pdata valid to sdata valid 0 75 ns t14 nwait asserted to command asserted 0 195 ns t15 time out 10 12 m s t16 nwait deasserted to pdata driven (note 1) 60 190 ns t17 nwait deasserted to nwrite modified (notes 1,2) 60 190 ns t18 sdata valid to iochrdy deasserted (note 3) 0 85 ns t19 ax valid to nior asserted 40 ns t20 nior deasserted to ax invalid 10 10 ns t21 nwait asserted to nwrite deasserted 0 185 ns t22 nior deasserted to niow or nior asserted 40 ns t23 nwait asserted to pdir set (note 1) 60 185 ns t24 pdata hi-z to pdir set 0 ns t25 nwait asserted to pdata hi-z (note 1) 60 180 ns t26 pdir set to command 0 20 ns t27 nwait deasserted to pdir low (note 1) 60 180 ns t28 nwrite deasserted to command 1 ns note 1: nwait is considered to have settled after it does not transition for a minimum of 50 ns. note 2: when not executing a write cycle, epp nwrite is inactive high. note 3: 85 is true only if t7 = 0.
266 t18 t9 t8 t17 t6 t12 t19 t10 t20 t11 t13 t2 t1 t5 t3 t16 t4 t21 a0-a10 sd<7:0> niow iochrdy nwrite pd<7:0> ndatast naddrstb nwait pdir figure 32a - epp 1.7 data or address write cycle see timing parameters on next page
267 figure 32b - epp 1.7 data or address write cycle parameters name description min typ max units t1 niow asserted to pdata valid 0 50 ns t2 command deasserted to nwrite change 0 40 ns t3 nwrite to command 5 35 ns t4 niow deasserted to command deasserted (note 2) 50 ns t5 command deasserted to pdata invalid 50 ns t6 time out 10 12 m s t8 sdata valid to niow asserted 10 ns t9 niow deasserted to data invalid 0 ns t10 niow asserted to iochrdy asserted 0 24 ns t11 nwait deasserted to iochrdy deasserted 40 ns t12 iochrdy deasserted to niow deasserted 10 ns t13 niow asserted to nwrite asserted 0 50 ns t16 pdata valid to command asserted 10 35 ns t17 ax valid to niow asserted 40 ns t18 niow deasserted to ax invalid 10 m s t19 niow deasserted to niow or nior asserted 100 ns t20 nwait asserted to iochrdy deasserted 45 ns t21 command deasserted to nwait deasserted 0 ns note 1: nwrite is controlled by clearing the pdir bit to "0" in the control register before per forming an epp write. note 2: the number is only valid if nwait is active when iow goes active.
268 t20 t19 t11 t15 t22 t13 t12 t3 t8 t10 t5 t4 t23 t2 t21 a0-a10 nior sd<7:0> iochrdy nwrite pd<7:0> ndatastb naddrstb nwait pdir figure 33a - epp 1.7 data or address read cycle see timing parameters on next page
269 figure 33b - epp 1.7 data or address read cycle parameters name description min typ max units t2 nior deasserted to command deasserted 50 ns t3 nwait asserted to iochrdy deasserted 0 40 ns t4 command deasserted to pdata hi-z 0 ns t5 command asserted to pdata valid 0 ns t8 nior asserted to iochrdy asserted 24 ns t10 nwait deasserted to iochrdy deasserted 50 ns t11 iochrdy deasserted to nior deasserted 0 ns t12 nior deasserted to sdata high-z (hold time) 0 40 ns t13 pdata valid to sdata valid 40 ns t15 time out 10 12 m s t19 ax valid to nior asserted 40 ns t20 nior deasserted to ax invalid 10 ns t21 command deasserted to nwait deasserted 0 ns t22 nior deasserted to niow or nior asserted 40 ns t23 nior asserted to command asserted 55 ns note: write is co ntrolled by setting the pdir bit to "1" in the control register before performing an epp read.
270 ecp parallel port timing parallel port fifo (mode 101) the standard parallel port is run at or near the peak 500 kbps allowed in the forward direc tion using dma. the state machine does not examine nack and begins the next transfer based on busy. refer to figure 34. ecp parallel port timing the timing is designed to allow operation at approximately 2.0 mbps over a 15ft cable. if a shorter cable is used then the bandwidth will increase. forward-idle when the host has no data to send it keeps hostclk (nstrobe) high and the peripheral will leave periphclk (busy) low. forward data transfer phase the interface transfers data and commands from the host to the peripheral using an inter- locked periphack and hostclk. the peripheral may indicate its desire to send data to the host by asserting nperiphrequest. the forward data transfer phase may be entered from the forward-idle phase. while in the forward phase the peripheral may asynchronously assert the nperiphrequest (nfault) to request that the channel be reversed. when the peripheral is not busy it sets periphack (busy) low. the host then sets hostclk (nstrobe) low when it is pre pared to send data. the data must be stable for the specified setup time prior to the falling edge of hostclk. the peripheral then sets periphack (busy) high to acknowledge the handshake. the host then sets hostclk (nstrobe) high. the peripheral then accepts the data and sets periphack (busy) low, complet ing the transfer. this sequence is shown in figure 35. the timing is designed to provide three cable round -trip times for data setup if data is driven simul taneously with hostclk (nstrobe). reverse -idle phase the peripheral has no data to send and keeps periphclk high. the host is idle and keeps hostack low. reverse data transfer phase the interface transfers data and commands from the peripheral to the host using an inter- locked hostack and periphclk. the reverse data transfer phase may be entered from the reverse-idle phase. after the previous byte has beed accepted the host sets hostack (nalf) low. the peripheral then sets periphclk (nack) low when it has data to send. the data must be stable for the specified setup time prior to the falling edge of periphclk. when the host is ready to accept a byte it sets hostack (nalf) high to acknowledge the handshake. the peripheral then sets periphclk (nack) high. after the host has accepted the data it sets hostack (nalf) low, completing the trans fer. this sequence is shown in figure 36. output drivers to facilitate higher performance data transfer, the use of balanced cmos active drivers for critical signals (data, hostack, hostclk, periphack, periphclk) are used ecp mode. because the use of active drivers can present compatibility problems in compatible mode (the control signals, by tradition, are speci fied as
271 open -collector), the drivers are dynam ically changed from open -collector to totem -pole. the timing for the dynamic driver change is specified in then ieee 1284 extended capabilities port protocol and isa interface standard , rev. 1.14, july 14, 1993, available from microsoft. the dynamic driver change must be implement ed properly to prevent glitching the outputs. figure 34 - parallel port fifo timing name description min typ max units t1 data valid to nstrobe active 600 ns t2 nstrobe active pulse width 600 ns t3 data hold from nstrobe inactive (note 1) 450 ns t4 nstrobe active to busy active 500 ns t5 busy inactive to nstrobe active 680 ns t6 busy inactive to pdata invalid (note 1) 80 ns note 1: the data is held until busy goes inactive or for time t3, whichever is longer. this only applies if another data transfer is pending. if no other data transfer is pending, the data is held indefinitely. t3 t6 t1 t2 t5 t4 pdata nstrobe busy
272 t3 t4 t1 t2 t7 t8 t6 t5 t6 nautofd pdata<7:0> busy nstrobe figure 35 - ecp parallel port forward timing name description min typ max units t1 nautofd valid to nstrobe asserted 0 60 ns t2 pdata valid to nstrobe asserted 0 60 ns t3 busy deasserted to nautofd changed (notes 1,2) 80 180 ns t4 busy deasserted to pdata changed (notes 1,2) 80 180 ns t5 nstrobe deasserted to busy asserted 0 ns t6 nstrobe deasserted to busy deasserted 0 ns t7 busy deasserted to nstrobe asserted (notes 1,2) 80 200 ns t8 busy asserted to nstrobe deasserted (note 2) 80 180 ns note 1: maximum value only applies if there is data in the fifo waiting to be written out. note 2: busy is not considered asserted or deasser ted until it is stable for a minimum of 75 to 130 ns.
273 t2 t1 t5 t6 t4 t3 t4 pdata<7:0> nack nautofd figure 36 - ecp parallel port reverse timing name description min typ max units t1 pdata valid to nack asserted 0 ns t2 nautofd deasserted to pdata changed 0 ns t3 nack asserted to nautofd deasserted (notes 1,2) 80 200 ns t4 nack deasserted to nautofd asserted (note 2) 80 200 ns t5 nautofd asserted to nack asserted 0 ns t6 nautofd deasserted to nack deasserted 0 ns note 1: maximum value only applies if there is room i n the fifo and terminal count has not been received. ecp can stall by keeping nautofd low. note 2: nack is not considered asserted or deasserted until it is stable for a minimum of 75 to 130 ns.
274 t hd;sta t su;sto t su;sta t su;dat t high t f t r t low t hd;dat t hd;sta t buf ab_data ab_clk figure 37 - access.bus timing symbol parameter min. typ. max. unit f scl scl clock frequency 100 khz t buf bus free time 4.7 s t su;sta start condition setup time 4.7 s t hd;sta start condition hold time 4.0 s t low scl low time 4.7 s t high scl high time 4.0 s t r scl and sda rise time 1.0 s t f scl and sda fall time 0.3 s t su;dat data set-up time 250 s t hd;dat data hold time 0 s t su;sto stop condition setup time 4.0 s
275 figure 38 - irda receive timing t1 t2 t2 t1 0 1 0 1 0 0 1 1 0 1 1 data irrx nirrx t1 t1 t1 t1 t1 t1 t1 t2 t2 t2 t2 t2 t2 t2 parameter min typ max units 1.4 1.4 1.4 1.4 1.4 1.4 1.4 2.71 3.69 5.53 11.07 22.13 44.27 88.55 s s s s s s s s s s s s s s pulse width at 115kbaud pulse width at 57.6kbaud pulse width at 38.4kbaud pulse width at 19.2kbaud pulse width at 9.6kbaud pulse width at 4.8kbaud pulse width at 2.4kbaud bit time at 115kbaud bit time at 57.6kbaud bit time at 38.4kbaud bit time at 19.2kbaud bit time at 9.6kbaud bit time at 4.8kbaud bit time at 2.4kbaud 1.6 3.22 4.8 9.7 19.5 39 78 8.68 17.4 26 52 104 208 416 note1: receive pulse detection criteria: a received pulse is considered detected if the received pulse is a minimum of 1.41s. note 2: irrx: l5, crf1 bit 0: 1 = rcv active low nirrx: l5, crf1 bit 0: 0 = rcv active high (default) note 3: this polarity assumes that the gpio has not been programmed for inverted.
276 figure 39 - irda transmit timing t1 t1 t1 t1 t1 t1 t1 t2 t2 t2 t2 t2 t2 t2 parameter min typ max units 1.41 1.41 1.41 1.41 1.41 1.41 1.41 2.71 3.69 5.53 11.07 22.13 44.27 88.55 s s s s s s s s s s s s s s pulse width at 115kbaud pulse width at 57.6kbaud pulse width at 38.4kbaud pulse width at 19.2kbaud pulse width at 9.6kbaud pulse width at 4.8kbaud pulse width at 2.4kbaud bit time at 115kbaud bit time at 57.6kbaud bit time at 38.4kbaud bit time at 19.2kbaud bit time at 9.6kbaud bit time at 4.8kbaud bit time at 2.4kbaud 1.6 3.22 4.8 9.7 19.5 39 78 8.68 17.4 26 52 104 208 416 t1 t2 t2 t1 0 1 0 1 0 0 1 1 0 1 1 data irtx n irtx notes: 1. irda @ 115k is hpsir compatible. irda @ 2400 will allow compatibility with hp95lx and 48sx. 2. irtx: l5, crf1 bit 1: 1 = xmit active low (default) nirtx: l5, crf1 bit 1: 0 = xmit active high 3. this polarity assumes that the gpio has not been programmed for inverted.
277 t1 t2 t3 t4 t5 t6 parameter min typ max units 0.8 0.8 0.8 0.8 1.2 1.2 1.2 1.2 s s s s s s modulated output bit time off bit time modulated output "on" modulated output "off" modulated output "on" modulated output "off" 1 1 1 1 note 1: irrx: l5, crf1 bit 0: 1 = rcv active low nirrx: l5, crf1 bit 0: 0 = rcv active high (default) mirrx, nmirrx are the modulated outputs t1 t2 t3 t4 t5 t6 0 1 0 1 0 0 1 1 0 1 1 data irrx n irrx mirrx nmirrx note 2: this polarity assumes that the gpio has not been programmed for inverted. figure 40 - amplitude shift keyed ir receive timing
278 t1 t2 t3 t4 t5 t6 parameter min typ max units 0.8 0.8 0.8 0.8 1.2 1.2 1.2 1.2 s s s s s s modulated output bit time off bit time modulated output "on" modulated output "off" modulated output "on" modulated output "off" 1 1 1 1 note 1: irtx: l5, crf1 bit 1: 1 = xmit active low (default) nirtx: l5, crf1 bit 1: 0 = xmit active high mirtx, nmirtx are the modulated outputs t1 t2 t3 t4 t5 t6 0 1 0 1 0 0 1 1 0 1 1 data irtx nirtx mirtx nmirtx note 2: this polarity assumes that the gpio has not been programmed for inverted. figure 41 - amplitude shift keyed ir transmit timing
279 figure 42 - 160 pin qfp package outlines 0.10 -c- h a a1 a2 1 4 see detail "a" a a1 a2 d d1 e3 e1 h l l1 e 0 w r1 r2 t d t e min 0.05 3.10 30.95 27.90 30.95 27.90 0.10 0.65 0 0.20 nom 31.20 28.00 31.20 28.00 0.80 1.60 0.20 0.30 30.45 30.45 max 4.07 0.5 3.67 31.45 28.10 31.45 28.10 0.200 0.95 7 0.40 0.65bsc notes: 1) coplanarity is 0.100 mm maximum 2) tolerance on the position of the leads is 0.120 mm maximum 3) package body dimensions d1 and e1 do not include the mold protrusion. maximum mold protrusion is 0.25 mm 4) dimensions t d and t e are important for testing by robotic handler 5) dimensions for foot length l when measured at the centerline of the leads are given at the table dimension for foot length l when measured at the gauge plane 0.25 mm above the seating plane is 0.78 - 1.03 mm 6) controlling dimension: millimeter 7) details of pin 1 identifier are optional but must be located within the zone indicated l1 l detail "a" r1 r2 5 d1/4 e1/4 7 e 2 41 40 80 81 3 120 121 160 1 t d / t e 0 0 w d d1 e e1
199 9 ? standard microsystems corp. circuit diagrams utilizing smsc products are included as a means of illustrating typical applications; consequently complete information sufficient for construction purposes is not necessarily given. the information has been carefully checked and is believed to be entirely reliable. however, no responsibility is assumed for inaccuracies. furthermore, such information does not convey to the purchaser of the semiconduc tor devices described any licenses und er the patent rights of smsc or others. smsc reserves the right to make changes at any time in order to improve design and supply the best product possible. smsc products are not designed, intended, authorized or warranted for use in any life support or other application where product failure could cause or contribute to personal injury or severe property damage. any and all such uses without prior written approval of an officer of smsc and further testing and/or modification will be fully at the risk of the customer. FDC37C93XAPM rev. 11 / 02 /9 9


▲Up To Search▲   

 
Price & Availability of FDC37C93XAPM

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X