Frequency Output Mode; Figure 22.7. Pca Frequency Output Mode - Silicon Laboratories C8051F341 Product Manual

Full speed usb flash mcu family
Table of Contents

Advertisement

22.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 out-
put is toggled. The frequency of the square wave is then defined by Equation 22.1.
Note: A value of 0x00 in the PCA0CPHn register is equal to 256 for this equation.
Equation 22.1. Square Wave Frequency Output
Where F
is the frequency of the clock selected by the CPS2-0 bits in the PCA mode register, PCA0MD.
PCA
The lower byte of the capture/compare module is compared to the PCA 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. Fre-
quency 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
C8051F340/1/2/3/4/5/6/7/8/9/A/B/C/D
---------------------------------------- -
F
=
CEXn
2
PCA0CPMn
P
P
E
C
C
M
T
E
W
W
C
A
A
A
O
C
PCA0CPLn
M
M
O
P
P
T
G
C
1
n
M
P
N
n
n
F
6
n
n
n
n
n
x
0 0 0
x
8-bit
Enable
Comparator
PCA Timebase
PCA0L

Figure 22.7. PCA Frequency Output Mode

Rev. 1.3
F
PCA
PCA0CPHn
8-bit Adder
Adder
Enable
TOGn
Toggle
0
match
1
PCA0CPHn
CEXn
Crossbar
Port I/O
261

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the C8051F341 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents