9-3 PROGRAMMABLE TIMERS AND EVENT COUNTERS

Its uses are to:

  1. Interrupt a time-sharing operating system at evenly spaced intervals so that it can switch programs.
  2. Output precisely timed signals with programmed periods to an I/O device (e.g. an A/D converter).
  3. Serve as a programmable baud rate generator.
  4. Measure time delays between external events.
  5. Count the number of times an event occurs in an external experiment and provide a means of inputting the count to the computer.
  6. Cause the processor to be interrupted after a programmed number of external events have occurred.

The mode determines exactly what happens when the count becomes 0 and/or a signal is applied to the gate input.Some possible actions are:
  1. The GATE input is used for enabling and disabling the CLK input.
  2. The GATE input may cause the counter to be reinitialized.
  3. The GATE input may stop the count and force OUT high.
  4. The count will give an OUT signal and stop when it reaches 0.
  5. The count will give an OUT signal and automatically be reinitialized from the Initial Count Register when the count reaches 0.
The modes could be defined by combinations of these possibilities.
As an example, consider the application of an interval timer to a time-sharing operating system.In this case a clock would be connected to the CLK input and OUT to an interrupt request line, possibly to a nonmaskable line. The GATE input would not be needed.When the system is brought up the initial count register would be filled with
                 Initial count = Clock frequency x T    
where T is the length of each time slice in seconds, and the mode would be set so that each time the count reaches 0 the contents of the initial register would be transferred to the counter and OUT would become active.

PRETHODNA FOLIJA SADRZAJ SLEDECA FOLIJA