Intel 8XC196MD Benutzerhandbuch

Seite von 579
8XC196MC, MD, MH USER’S MANUAL
8-4
8.2.3
Determining the Current Value of the Down-counter
You can read the FREQ_CNT register (Figure 8-3) to determine the current value of the down-
counter. 
8.3
APPLICATION EXAMPLE
One application for the frequency generator is to drive an infrared LED to transmit remote control
data and control signals (Figure 8-4). In this example, the frequency generator is configured with
a 40-kHz frequency and is switched on and off by writing to bit 7 of the P7_MODE register. In-
formation is transmitted serially. Zero is represented by a one-millisecond carrier burst followed
by a one-millisecond pause; one is represented by a two-millisecond carrier burst followed by a
two-millisecond pause (Figure 8-5). A photodiode receives the light pulses, and a high-pass filter
rejects low-frequency ambient light and allows the 40-kHz carrier to pass through. This carrier is
amplified and detected to reproduce the original pulse sequence.
FREQ_CNT
(8XC196MD)
Address:
Reset State:
1FBAH
00H
Read the frequency generator count (FREQ_CNT) register to determine the current value of the 
down-counter.
7
0
8XC196MD
Count
Bit 
Number
Function
7:0
Count
This register contains the current down-counter value.
Figure 8-3.  Frequency Generator Count (FREQ_CNT) Register