Intel J1850 FH8065301455200 User Manual

Product codes
FH8065301455200
Page of 1272
Datasheet
1219
PCU – iLB – 8254 Timers
value to the counter I/O address. The counter initially asserts IRQ0 and decrements the 
count value by two each counter period. The counter negates IRQ0 when the count 
value reaches 0. It then reloads the initial count value and again decrements the initial 
count value by two each counter period. The counter then asserts IRQ0 when the count 
value reaches 0, reloads the initial count value, and repeats the cycle, alternately 
asserting and negating IRQ0.
26.2.2
Counter 1, Refresh Request Signal
This counter is programmed for Mode 2 operation and impacts the period of the 
NSC.RTS register bit. Programming the counter to anything other than Mode 2 results 
in undefined behavior.
26.2.3
Counter 2, Speaker Tone
This counter provides the speaker tone and is typically programmed for Mode 3 
operation. The counter provides a speaker frequency equal to the counter clock 
frequency (1.193 MHz) divided by the initial count value. The speaker must be enabled 
by a write to the NSC.SDE register bit.
26.3
Use
26.3.1
Timer Programming
The counter/timers are programmed in the following fashion:
1. Write a control word to select a counter.
2. Write an initial count for that counter.
3. Load the least and/or most significant bytes (as required by Control Word Bits 5, 4) 
of the 16-bit counter.
4. Repeat with other counters.
Only two conventions need to be observed when programming the counters. First, for 
each counter, the control word must be written before the initial count is written. 
Second, the initial count must follow the count format specified in the control word 
(least significant byte only, most significant byte only, or least significant byte and then 
most significant byte).
A new initial count may be written to a counter at any time without affecting the 
counter's programmed mode. Counting is affected as described in the mode definitions. 
The new count must follow the programmed count format.
If a counter is programmed to read/write two-byte counts, the following precaution 
applies: A program must not transfer control between writing the first and second byte 
to another routine which also writes into that same counter. Otherwise, the counter will 
be loaded with an incorrect count.