8XC196MC, MD, MH USER’S MANUAL

8.2.3Determining 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.

FREQ_CNT

Address:

1FBAH

(8XC196MD)

Reset State:

00H

Read the frequency generator count (FREQ_CNT) register to determine the current value of the

down-counter.

 

 

 

 

7

0

8XC196MD

 

 

 

 

Count

 

 

 

 

 

Bit

 

Function

 

Number

 

 

 

 

 

 

 

 

 

7:0

 

Count

 

 

 

This register contains the current down-counter value.

 

 

 

 

 

Figure 8-3. Frequency Generator Count (FREQ_CNT) Register

8.3APPLICATION 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.

8-4

Page 191
Image 191
Intel 8XC196MC, 8XC196MD, 8XC196MH manual Determining the Current Value of the Down-counter, Application Example, Freqcnt