FORCE Computers SYS68K/ISCSI-1 — SYS68K/ISCSI-1 User's Manual

The MC68230 timer can provide several facilities needed by MC68000 operating systems. It can generate periodic in- terrupts, a square wave, or a single interrupt after a pro- grammed time period. Also, it can be used for elapsed time measurement or as a device watchdog. This section describes the programmable options available, capabilities, and restrictions that apply to the timer. The PI! T timer contains a 24-blt synchronous down counter that 15 loaded from three 8-bit Counter Preload Registers The 24-bit counter may be clocked by the output of a 5- bit 1 diVide· by-32) prescaler or by an external timer in- put TIN.

If the prescaler IS used, It may be clocked by the system clock ICLK plnl or by the TIN external input The counter signals the occurrence of an event primarily through zero detection. IA zero IS when the counter of the 24-bit tHner IS equal to zero I ThiS sets the zero detect status IZDS) bit In the Timer Status Register. It may be checked by the rlocessor or may be used to generate a timer Interrupt The ZOS bit IS reset by wrltHlg a 1 to the Timer Status Register in tl1at bit position TIMER 5. The Counter Preload Registers are readable and writable at any time and this occurs Independently of any timer operation. No protection mechanisms are provided against ill-timed writes. 6.

The input frequency to the 24·bit counter from the TIN pin or prescaler output, must be between ° and the in- put frequency at ClK pin divided by ;32 regardless of the configuration chosen. 7. For configurations in which the prescaler is used (With the CLK pin or TIN pin as an input I , the contents of the Counter Preload Register (CPRI 15 transferred to the counter the first time that the prescaler passes from SOO to Sl F (rolls over) after entering the run state Thereafter, the counter decrements or is loaded from the Counter Preload Register when the prescaler rolls over. a.

For configurations in which the prescaler IS not used, the contents of the Counter Preload Registers are transferred to the counter on the first asserted edge of the TIN Input after entering the run state On subse- Quent asserted edges the counter decrements or IS loaded from the Counter Preload Registers. 9.

The lowest value allowed In the Counter Prel03d The general operation of the timer is flexible and easily progr,lmmable The timer IS fully configured and controlled hy programming the8-blt Timer Control Register It controls' 111 the chOice between the Port C operation and the timer llperatlon of three timer pins, 121 whether the counter IS load- l'd frpm·the Counter Preload Register or rolls over when zero detect IS reach, 131 the clock Input, (41 whether the prescaler Register for use With the counter IS SOOOOOI ,S dsed, and 151 whether the timer IS enabled Several conditions may be present when the timer Inter- rupt acknowledge pin ITIACKI is asserted.

These conditions affect the Pill's response and the termination of the bus cy- cle. (See Table 9.1 TIMER INTERRUPT ACKNOWLEDGE CYCLES RUN I HALT DEFINITION r he overall operation of the timer IS described In terms of til(' rurl 01 halt states The control of the current state is dptelmlned by programming the Timer Control Register Wh('1l HI til(' halt stdte, all of the follOWing occur TABLE 9 - RESPONSE TO TIMER INTERRUPT ACKNOWLEDGE PC31T0UT Function Response to Assened TIACK 1 The pnor contents of .the counter IS not altered and IS reliably readable via the Count Registers 2 The prescaler IS forced to F whether or not It IS used.

PC3 Port C Pill Nu rtlS~)()ll~f' Nl) OT ACK TOuT SqlJ(Hf:~ WdVP Nl) feSp()n~t· Nl' OT AC" 3 The ZD S status bit IS forced to 0, regardless "f the pOSSible zero contents of the 24-bll counter. Irll~rrupt RP.qlWSI N" 01 ACK TOU1 Np~rtll'rl TlIllt'1 Nl) resppr1'-'t' Tile lun state IS characterized by: 1 T 11(' countel IS clocked by the source programmed In tl1(' T Hlier Control Register 2 The couIlter IS not reliably readable TOuT AS:")t->rted T Inll~r l'IIlt'1 Ifltprru~'l Vt( ',,( c!'~,:, " !, Interrupt Requ"st 01 AC" As,,,- I"ll PROGRAMMER'S MODEL 3 The prescalel IS allowed to decrement If programmed for use The Internal acceSSible register organization IS represented In Table 10.

Address space Within the address map IS re- served for future expansion. Throughout the PliT data sheet the following conventions are maintained. 4 The ZDS status bit IS set when the 24·blt counter tran· Sltlons from SOOOOOI to SOOOOOO TIMER RULES ThiS section prOVides a set of rules that allow easy applica- tion of the timer 1. A read from a reserved location In the map results In a read from the "null register." The null register returns all zeros for data and results In a normal bus cycle. A write to one of these locations results In a normal bus cycle but no write occurs. 2 When the R'fS'fi' Pin IS asserted, all bits of the Timer 1 Refer to the Run/Halt Definition above 2.

Unused bits of a defined register are denoted by"'" Control Register go to 0, configuring the dual function pins as Port C Inputs. 3. Bits that are u'hused in the chosen mode/submode but are used in others, are denoted by "X", and are readable and writeable. Their content, however, is Ig- nored in the chosen mode/submode and are read as zeroes 3 The contents of the Counter Preload Registers and counter are not affected by the RESET pin. 4 The Count Registers prOVide a direct read data path from each portion of the 24-blt counter, but data Writ- ten to their addresses IS Ignored. (ThiS results In a nor· mal bus cycle.

I These registers are readable at any time, but their contents are neller latched. Unreliable data may be read when the timer IS In the run state. 4. All registers are addressable as 8-bit Quantities To facilitate operation with the MOVEP inStruction and the DMAC, addresses are ordered such that certain sets of registers may also be accessed as words 12 bytes I or long words (4 bytes) MOTOROLA Semiconductor Products Inc. 21