MC68230L8·MC6823(JL 10 FIGURE 15 - PERIODIC INTERRUPT GENERATOR ,.. Hull---------- 1 I 6 I 5 4 3 2 I 1 0 Interrupt After Timeout TOUTITIACK Z 0 Ctock Trm~r ContlOl Ctll .. Conllol Ell x o 00 01' 1 X chilngf'd srf f f I f .'48It C"l,lllt'l* In thiS configuration the trmer generates 'an Interrupt after a programmed time period has expired. The TOUT prn IS connected to ticr system's rnterrupt request Circuitry and the TIACK pin may be an Interrupt acknowledge Inpu!
to the timer The TIN pin may be used as a clock Input ,(XlOO(l(l Thrs configuratron IS slmrlar to the perrodlc -Interrupt generator except that the Zero Detect Control bit IS set ThiS forces the counter rollover after Zero Detect IS rt'ilched, rather than reloading from the CPRs .
When the processor takes the rnterrupt It can halt the timer and read the ,'Ollnter Thrs allows the processor to measure the delay trme from Zero Detect (Interrupt request) to enterrng the service routine Accurate knowledge of the Interrupt latencv may be useful In some applications (see Figure 171 * Square Wave Generator I ti I " -l I I , Timer tnable 1\ ",JI'llt,\j FIGURE 17 SINGLE INTERRUPT AFTER TIMEOUT ~ \ ) l, 1 11'\l'~ L U ,,'I \:,11\!',11 (\:1 * l," r' x ,1(' T,mer J I Enable L- ""'I ..
t-------H",,------~.I Ifl ttll:-' Lllr)II~FHdtl(Hl Illl' tlflll'r ~H()dlJCt'') Ii SqIJ(lfl~ Wdve ell rl,c' TOU I ~1l1 ~ OU I pilI IS r'(lIlIl,'cleej III lil" usel" ell ,,1111\ ,PIli lilt' IIACT pi" I, IltlluS(1 Til!!
TIN pill mdV b!' us I'd ,IS ,I clod, 1I1pui SFFFFFF Till' P'OCl'SSOI IOdds ttl(' CUUl1tt'1 P'el(ld(j Reqlstels ilnd 24 BIt Counter· 1,111('1 (1I1tl,,1 Rt'qlstel, dl1(j tile" ellabl", till' tlm.'r Whell tilt, } 1)lt ,(lunter pelsses 110m SOOOOOI t(' S()O(XlOU the ZDS ,,,l!IIS till IS set dll(j ttl" TOUT Isquelr!' WiN!' outputl pill IS :11Qqlt'l1 ~\1 ItH' rlP,t (I,H,-~k ill IIH' 24 hit l'-ULJI'll~( It IS r:iqaHl ZDS ================:1 L \'--------11 ----------.U 1(,,; '''', ttl tilt' ,'(lIlt!!I1\S 01 tile CPRs, dlld ttl,"PiJit"1 dI'l r,'nlt~rlh III ttll ..... ,)ppIICcltIO[) Thtll!' I"':' flU rHJt~c1 lur tt)P PH) TOUT /lIt' Itl!
HlP processor It) SYlh' Iht~lf V\'ltt) tIll' SqudiP WdvP lh , th!' IDS SidtuS tlll, tlll'lI p"llll'(j It Tilt, p'lle!'ssl" IlI,J, ,]ISO rprld thp lOUT I('vel ,lt till' POIt C d ,·t''''~lH In lillt'l" clf'dr ttll' ZOS SlnlLJ~ bit. tll)\.'Vt)Vt~r It I .... pOSSI Analoq rp-present~tlon ot counter value r,ote that the PC3, TOUT pin functions as PC3 followlnq tlH' neqatlon of RESET If used In the square wave con' fl(juratIO'l a pullup WSlstOI may he reqLJlred to kpPp a known I.'vd pllor to prOljlilmmlng Pilar to enablrng the trmer, TOUT IS high (see Flqure 161 Elapsed Time Measurement described below Elapsed time measurement takes several forms, two ,lit' 7 I 6 I 5 4 3 2 I 1 0 System Clock ,.
hI!' -------- r"t"J [, ,,,,, FIGURE 16 - SQUARE WAVE GENERATOR Contlol Ctrl .. Control Enable o o X o o o changed TOUT!
TIACK Z 0 Clock Timer Thrs configuration allows time Interval measurement bv software No timer pinS are used The processOi ,.Ioads tile COUllter Preload Rey,stprs tgenerally wrth all Is) and Tlmel ContrOl Rpqlster, alld tl)!'" enables the tllner The counter decrements until the endillq event takes place When It IS desiled to read the tlnl!' 111\('1 val, the processor must halt tne timer, then read the COUll tel r (I, , \'--_--', L For applications In which the Interval could have exceeded that programmable In thiS timer, Interrupts can be counted to prOVide the eqLJlvalent of additional timer bits At the end, the timer can be halted and read (see Frgure 181 r-~ .......
---- Squdrt' WdVP----- *:., d)fPSt:'f1tatrO(' dl l..Ounter value MOTOROLA Semiconductor Products Inc. 29