Intel386™ EX EMBEDDED PROCESSOR USER’S MANUAL
10-12
Figure 10-10 shows writing a new count. The counter loads the new count after the counter reach-
es one. When the counter receives a gate-trigger after a new count was written to it, the counter
loads the new count on the next CLKINn pulse. This allows GATEn to synchronize the counters.
Figure 10-10. Mode 2 – Writing a New Count
10.2.4 Mode 3 – Square Wave
In this periodic mode, a counter’s OUTn signal remains high for half a specified count, then goes
low for the remainder of the count. A count of N results in a square wave with a period of N
CLKINn pulses. A high level on a counter’s GATEn signal enables counting; a low level on a
counter’s GATEn signal disables counting. The output produced by a counter’s OUTn signal de-
pends on whether a count is odd or even. Mode 3’s basic operation for even and odd counts is
outlined below and shown in Figure 10-11 and Figure 10-12.
Even count basic operation:
1. After a control word write, OUTn is driven high.
2. The count is loaded on the CLKINn pulse following one of these events:
• A write to a control word followed by a write to count
• A gate trigger
• The counter reaches terminal count
3. On each succeeding CLKINn pulse, the count is decremented by two.
4. After the count reaches terminal count, OUTn is driven low and the count is reloaded.
5. On each succeeding CLKINn pulse, the count is decremented by two.
6. After the count reaches terminal count, OUTn is driven high and the count is reloaded.
7. The process is repeated from step 3.
????0004 0003 0002 0001 0005 0004 0003
Writes to
Counter
n
CLKIN
n
GATE
n
OUT
n
Control
Word = 14H
Ccount
Count = 5
Count = 4
A2399-01