English
Language : 

C8051F02X Datasheet, PDF (256/272 Pages) Silicon Laboratories – 8K ISP FLASH MCU Family
C8051F020/1/2/3
23.2.4. Frequency Output Mode
Frequency Output Mode produces a programmable-frequency square wave on the module’s associated CEXn pin.
The capture/compare module high byte holds the number of PCA clocks to count before the output is toggled. The
frequency of the square wave is then defined by Equation 23.1.
Equation 23.1. Square Wave Frequency Output
FCEXn
=
---------------F----P---C---A---------------
2 × PCA0CPHn
Note: A value of 0x00 in the PCA0CPHn register is equal to 256 for this equation.
Where FPCA is the frequency of the clock selected by the CPS2-0 bits in the PCA mode register, PCA0MD. The
lower byte of the capture/compare module is compared to the PCA0 counter low byte; on a match, CEXn is toggled
and the offset held in the high byte is added to the matched value in PCA0CPLn. Frequency Output Mode is enabled
by setting the ECOMn, TOGn, and PWMn bits in the PCA0CPMn register.
Write to
PCA0CPLn
0
ENB
Reset
Write to
PCA0CPHn ENB
1
Figure 23.7. PCA Frequency Output Mode
PCA0CPMn
P ECCMT P E
WCAA AOWC
MOP P TGMC
1 MPN n n n F
6nnn
n
n
x 000 x
PCA0CPLn
Enable
8-bit
Comparator
8-bit Adder
PCA0CPHn
Adder
Enable
Toggle
match
TOGn
0 CEXn Crossbar
1
Port I/O
PCA Timebase
PCA0L
256
Rev. 1.4