Instruction manual

Table Of Contents
PC215E Page 40
As the control register and each counter have separate addresses (offsets 0, 1, 2 and 3) and
each control word specifies the counter it applies to (bits 6 and 7) no special instruction
sequence is required.
When a control word is written to a counter, all control logic is reset and OUT goes to a known
initial state depending on the mode selected. The six counter modes are:
Mode 0 Interrupt on Terminal Count
Mode 1 Hardware Re-triggerable One-shot
Mode 2 Rate Generator
Mode 3 Square Wave
Mode 4 Software Triggered Mode
Mode 5 Hardware Triggered Strobe (Re-triggerable)
BIT ASSIGNMENTS
Bit layout of the Z1 counter control word register is shown below. Two other commands that
can be written to the Control Register are the Counter Latch Command and the Read-Back
Command. The formats for these two commands are also shown below.
Further information on programming the 82C54 Programmable Counter/Timer is given in
chapters 4 and 6. A full description of the six operating modes and all other features of the
82C54 are available in the 82C54 device manufacturer's data sheet in the appendices.
01234567
Binary or BCD
Binary Count (16 Bits)
BCD Count (4 Digits)
BCD
0
1
Count Mode
Mode 0
Mode 1
Mode 2
Mode 3
Mode 4
Mode 5
CM0
0
1
0
1
0
1
CM1
0
0
1
1
0
0
CM2
0
0
X
X
1
1
Read/Write Mode
Count Latch Command
Low Byte Only
High Byte Only
Low Byte then High Byte
RWM0
0
1
0
1
RWM1
0
0
1
1
Select Counter or MLC
Counter 0
Counter 1
Counter 2
Multiple Latch Command
SC0
0
1
0
1
SC1
0
0
1
1