
3-4
Timer/Counters
An 8254 programmable interval timer provides three 16-bit, 8 MHz timer/counters to support a wide
range of timing and counting functions. These timer/counters can be cascaded or used individually for many
applications.
Each timer/counter has two inputs, CLK in and GATE in, and one output, timer/counter OUT. The clock
sources for the timer/counters can be selected using jumpers on header connector JP1 (see Chapter 1). The
timer/counters can be programmed as binary or BCD down counters by writing the appropriate data to the
command word, as described in Chapter 4. The command word also lets you set up the mode of operation. The
six programmable modes are:
Mode 0
Mode 1
Mode 2
Mode 3
Mode 4
Mode 5
Event Counter (Interrupt on Terminal Count)
Hardware-Retriggerable One-Shot
Rate Generator
Square Wave Mode
Software-Triggered Strobe
Hardware Triggered Strobe (Retriggerable)
These modes are detailed in the 8254 Data Sheet, reprinted from Intel in Appendix C.
Digital I/O
The DM6210 has 16 TTL/CMOS-compatible digital I/O lines which can be directly interfaced with
external devices or signals to sense switch closures, trigger digital events, or activate solid-state relays. The
lines can be programmed as inputs or outputs in groups of 4 bits. There is also a special latched input mode
which allows the digital inputs to be latched on an external clock edge for time critical applications. Solder
pads for activating pull-up or pull-down resistors are included on the module.
Interrupts
The DM6210 has 7 software-selectable interrupt sources: end-of-convert, 8254 timer/counter output 0,
8254 timer/counter output 1, 8254 timer/counter output 2, external clock for timer/counter 2 brought onto the
module through CN3, Port 0 latch status and Port 1 latch status. The end-of-convert signal can be used to
interrupt the computer when an A/D conversion is completed. The 8254 timer/counter outputs can be used to
generate an end-of-count interrupt. The external clock 2 interrupt can be used to generate interrupts at any
desired interval from an external source. The Port 0 and Port 1 latch status bits can be used to generate an
interrupt when digital data has been strobed into the digital input latch.