CHAPTER 8

FREQUENCY GENERATOR

The 8XC196MD has a peripheral not found on other 8XC196Mx devices — the frequency gen- erator. This peripheral produces a waveform with a fixed duty cycle (50%) and a programmable frequency (ranging from 4 kHz to 1 MHz with a 16-MHz input clock). One application for the frequency generator is to drive an infrared LED to transmit remote control data and control sig- nals.

This chapter describes the frequency generator and explains how to configure it. For detailed de- scriptions of the signals discussed in this chapter, refer to Appendix B, “Signal Descriptions.” For additional information and application examples, consult AP-483, Application Examples Using the 8XC196MC/MD Microcontroller (order number 272282).

8.1FUNCTIONAL OVERVIEW

The frequency generator (Figure 8-1) has a frequency register, a count register, and an output sig- nal. The output signal shares pin P7.7, so you must configure the pin for its frequency generator output function.

8

 

 

 

 

 

FREQ_GEN

 

 

 

8

 

 

 

 

 

 

 

Port 7

 

 

 

 

Control

8

Down-

Load

D

Q#

 

Counter

 

P7_MODE

 

 

 

 

FREQ_CNT

 

 

P7.7/FREQOUT

 

 

C

P7_DIR

 

 

 

Q

 

 

 

 

P7_REG

 

 

Count = 0

 

 

 

 

 

 

A2702-01

Figure 8-1. Frequency Generator Block Diagram

8-1

Page 188
Image 188
Intel 8XC196MC, 8XC196MD, 8XC196MH manual Chapter Frequency Generator