R6522 Versatile Interface Adapter (VIA) AEG 11—AUXILIARY CONTROL REGISTER a ee Tl TIMER CONTROL ~ a OPERATION 87 G10: TIMED INTEBRUPT EACH TIME THES LOADED DISABLED OFT CONTINUOUS INFERRUPTS LO} TIMED INTERRUPT ! ONE SHOT EACH TIME 13 1S OUTPUT LOADED 1; 1 CONTINUOUS SQUARE INTERRUPTS WAVE oureut T2 TIMER CONTROL OPERATION TIMED INTERRUPT COUNT DOWN WITH PULSES ON PRE wow LATCH ENABLE DIS ABLE PB O 9 DISABLE t+ ENABLE LATCHING $41F T REGISTER CONTROL OPERATION DISABLED SHIFT IN UNDER CONTROL OF 12 SHIFT in UNDER CONTROL OF 62 SHIFT IN UNDER CONTROL OF EXT CLK SHIFT OUT FREE RUNNING AT 12 RATE SHIFT OUT UNOER CONTROL OF TZ SHIFT GUT UNDER CONTAOL OF 2 i SHIFT OUT UNDER CONTROL OF EXT CLK. —— wii MOC Cola al Ol W/O] =| Ol —folne = sorol~|solalu Figure 14. Auxiliary Control Register (ACR) Timer 1 One-Shot Mode The Timer 1 one-shol mode generates a single interrupt for each timer load operation. As with any interval timer, the delay between the “write T1C-H” operation and generation of the proc- essor interrupt is a direct function of the data loaded into the timing counter. fn addition to generating a single interrupt. Timer 1 can be programmed to produce a single negative pulse on the PB7 peripheral pin. With the output enabled (ACR7 = 1) a “write T1C-H" operation will cause PB7 to go low. PB7 will return high when Timer 1 times out. The result is a single pro- grammabie width pulse. Timing for the R6522 interval timer one-shot modes is shown in Figure 15. In the one-shot mode, writing into the T1L-H has no effect on the operation of Timer 1. However, it will be necessary to assure that the low order latch contains the proper data before initiat- ing the count-down with a “write TIC-H”' operation. When the processor writes into the high order counter (T1C-H), the T1 inter- rupt flag will be cleared, the contents of the low order latch will be transferred into the low order counter, and the timer will begin to decrement at system clock rate. If the PB7 output is enabled, this signal will go low on the falling edge of $2 following the write operation. When the counter reaches zero, the T1 inter- rupt flag will be set, the iROQ pin will go low (interrupt enabled), and the signal on P87 will go high. At this time the counter will continue to decrement at system clock rate. This allows the system processor to read the contents of the coun- ter to determine the time since interrupt. However, the T1 inter- rupt flag cannot be set again unless it has been cleared as described in this specification. @ LOL ee | WRITE TtcC-H ay iG OUTPUT 1p PB7 OUTPUT” ————~«&S _ 1 COUNTER Noi ur | ne [us| | o [Free] N | My | ne | N + 1.5 CYCLES Figure 15. Timer 1 One-Shot Mode Timing