Real Time Devices AD1200 User Manual page 63

Table of Contents

Advertisement

Each timer/counter has two inputs, CLK in and GATE in, and one output, timer/counler OUT. They can be
programmed as binary or BCD down counten by writing the appropriate data to the command word, as described in
the I/O map section at the beginning of this chapter.
One of two clock sources, the on-board 8 MHz crystal or the external clock (P245) can be selected as the clock
input to TCO or TC2. The diagram shows how these clock sources are connected to the timer/count€rs.
Two gate sources are available at the I/O connector (VZ4l andY246). When a gate is disconnected, an on-
board pull-up resistor automatically pulls the gate high, enabling the timer/counter.
The output from timer/counter-l is available'at theT/C OUT1 pin (Y242)'and timer/counter 2's output is
available arTl9 2OI-JiI @.44), where they can be used for intemlpt generation, as an A/D rigger, or for counting
functions.
The timer/counters can be programmed to operate in one of six modes, depending on your application. The
following paragraphs briefly describe each mode.
Mode 0, Event Counter (Interrupt on Terminal Count). This mode is typically used for event counting.
While the timer/counter counts down, the output is low, and when tlre count is complete, it goes high. The output
stays high until a new Mode 0 control word is written to the timer/counter.
Mode 1, Hardware-Retriggerable One-Shot. The output is initially high and goes low on ttre clock pulse
following a trigger o begin the one-shot pulse. The output remains low until the count reaches 0, and tiren goes high
and remains high until the clock pulse after tle next rigger.
Mode 2, Rate Generator. This mode functions like a divide-by-N counter and is typically used to generate a
real-time clock interrupt. The output is initially high, and when the count decrements to 1, the output goes low for
one clock pulse. The output then goes high again, the timer/counter reloads the initial count, and the process is
repeated. This sequence continues indefinitely.
Mode 3' Square Wave Mode. Similar o Mode 2 except for the duty cycle output, this mode is typically used
for baud rate generation. The output is initially high, and when the count decrements to one-half its initial count, the
output goes low for the remainder of the counl The timer/counter reloads and the output goes high again. This
process repeats indefinitely.
Mode 4' Software-Triggered Strobe. The output is initially high. When the initial count expires, the output
goes low for one clock pulse and then goes high again. Counting is "figgered" by writing the initial count
Mode 5, Hardware Triggered Strobe (Retriggerable). The output is initially high. Counting is riggered by
the rising edge of the gate input. When the initial count has expired, the output goes low for one clock pulse and
then goes high again.
Digital VO
The 16 8255 PPl-based digital I/O lines can be used to transfer data betrveen the computer and external devices.
The digital input lines can have pull-up or pull-down resistors installed, as described in Chapter l.
4-26

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ada1200

Table of Contents