01.04.2014 Views

Preliminary C8051F120/1/2/3 C8051F124/5/6/7 - KEMT FEI TUKE

Preliminary C8051F120/1/2/3 C8051F124/5/6/7 - KEMT FEI TUKE

Preliminary C8051F120/1/2/3 C8051F124/5/6/7 - KEMT FEI TUKE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Preliminary</strong><br />

<strong>C8051F120</strong>/1/2/3<br />

<strong>C8051F124</strong>/5/6/7<br />

24.2.4. Frequency Output Mode<br />

Frequency Output Mode produces a programmable-frequency square wave on the module’s associated CEXn pin.<br />

The capture/compare module high byte holds the number of PCA clocks to count before the output is toggled. The<br />

frequency of the square wave is then defined by Equation 24.1.<br />

Equation 24.1. Square Wave Frequency Output<br />

F sqr<br />

=<br />

F PCA<br />

----------------------------------------<br />

2 × PCA0CPHn<br />

Where F PCA is the frequency of the clock selected by the CPS2-0 bits in the PCA mode register, PCA0MD. The<br />

lower byte of the capture/compare module is compared to the PCA0 counter low byte; on a match, CEXn is toggled<br />

and the offset held in the high byte is added to the matched value in PCA0CPLn. Frequency Output Mode is enabled<br />

by setting the ECOMn, TOGn, and PWMn bits in the PCA0CPMn register.<br />

Figure 24.7. PCA Frequency Output Mode<br />

PCA0CPMn<br />

P E C C M T P E<br />

W C A A A O W C<br />

M O P P T G M C<br />

1 M P N n n n F<br />

6 n n n n<br />

n<br />

0 0 0 0 1 0<br />

Enable<br />

PCA0CPLn<br />

8-bit<br />

Comparator<br />

match<br />

8-bit Adder<br />

Adder<br />

Enable<br />

Toggle<br />

TOGn<br />

0<br />

1<br />

PCA0CPHn<br />

CEXn<br />

Crossbar<br />

Port I/O<br />

PCA Timebase<br />

PCA0L<br />

© 2002 Cygnal Integrated Products, Inc. DS008-0.8-AUG02 Page 297

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!