ST72F264G ST Microelectronics, ST72F264G Datasheet - Page 66

no-image

ST72F264G

Manufacturer Part Number
ST72F264G
Description
(ST72F260G - ST72F264G) 8-BIT MCU
Manufacturer
ST Microelectronics
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ST72F264G1B5
Manufacturer:
ST
0
Part Number:
ST72F264G1M6
Manufacturer:
ST
0
Part Number:
ST72F264G2B5
Manufacturer:
ST
0
Part Number:
ST72F264G2B5
Manufacturer:
ST
Quantity:
20 000
Part Number:
ST72F264G2B6
Manufacturer:
ST
Quantity:
10
Part Number:
ST72F264G2B6
Manufacturer:
NEC
Quantity:
6 097
Part Number:
ST72F264G2B6
Manufacturer:
ST
Quantity:
20 000
Part Number:
ST72F264G2H
Manufacturer:
ST
0
Part Number:
ST72F264G2H1
Manufacturer:
CMD
Quantity:
1 020
Part Number:
ST72F264G2H1
Manufacturer:
ST
0
Part Number:
ST72F264G2H1
Manufacturer:
ST
Quantity:
20 000
Part Number:
ST72F264G2H1E
Manufacturer:
ST
Quantity:
50 000
Part Number:
ST72F264G2H1E
Manufacturer:
ST
Quantity:
20 000
Part Number:
ST72F264G2M6
Manufacturer:
SCS
Quantity:
1 225
Part Number:
ST72F264G2M6
Manufacturer:
ST
Quantity:
20 000
www.DataSheet4U.com
DataSheet
ST72260G, ST72262G, ST72264G
16-BIT TIMER (Cont’d)
11.3.3.6 Pulse Width Modulation Mode
Pulse Width Modulation (PWM) mode enables the
generation of a signal with a frequency and pulse
length determined by the value of the OC1R and
OC2R registers.
Pulse Width Modulation mode uses the complete
Output Compare 1 function plus the OC2R regis-
ter, and so this functionality can not be used when
PWM mode is activated.
In PWM mode, double buffering is implemented on
the output compare registers. Any new values writ-
ten in the OC1R and OC2R registers are taken
into account only at the end of the PWM period
(OC2) to avoid spikes on the PWM output pin
(OCMP1).
Procedure
To use pulse width modulation mode:
1. Load the OC2R register with the value corre-
2. Load the OC1R register with the value corre-
3. Select the following in the CR1 register:
4. Select the following in the CR2 register:
66/171
sponding to the period of the signal using the
formula in the opposite column.
sponding to the period of the pulse if (OLVL1=0
and OLVL2=1) using the formula in the oppo-
site column.
– Using the OLVL1 bit, select the level to be ap-
– Using the OLVL2 bit, select the level to be ap-
– Set OC1E bit: the OCMP1 pin is then dedicat-
– Set the PWM bit.
– Select the timer clock (CC[1:0]) (see
4
plied to the OCMP1 pin after a successful
comparison with the OC1R register.
plied to the OCMP1 pin after a successful
comparison with the OC2R register.
ed to the output compare 1 function.
Clock Control
U
.com
Counter
= OC1R
Counter
= OC2R
When
When
Bits).
Pulse Width Modulation cycle
OCMP1 = OLVL2
OCMP1 = OLVL1
Counter is reset
ICF1 bit is set
to FFFCh
www.DataSheet4U.com
Table 14
If OLVL1=1 and OLVL2=0 the length of the posi-
tive pulse is the difference between the OC2R and
OC1R registers.
If OLVL1=OLVL2 a continuous signal will be seen
on the OCMP1 pin.
The OC
ing application can be calculated using the follow-
ing formula:
Where:
t
f
PRESC
If the timer clock is an external clock the formula is:
Where:
t
f
The Output Compare 2 event causes the counter
to be initialized to FFFCh (See
Notes:
1. After a write instruction to the OC i HR register,
2. The OCF1 and OCF2 bits cannot be set by
3. The ICF1 bit is set by hardware when the coun-
4. In PWM mode the ICAP1 pin can not be used
5. When the Pulse Width Modulation (PWM) and
CPU
EXT
the output compare function is inhibited until the
OC i LR register is also written.
hardware in PWM mode therefore the Output
Compare interrupt is inhibited.
ter reaches the OC2R value and can produce a
timer interrupt if the ICIE bit is set and the I bit is
cleared.
to perform input capture because it is discon-
nected to the timer. The ICAP2 pin can be used
to perform input capture (ICF2 can be set and
IC2R can be loaded) but the user must take
care that the counter is reset each period and
ICF1 can also generates interrupt if ICIE is set.
One Pulse Mode (OPM) bits are both set, the
PWM mode is the only active one.
= Signal or pulse period (in seconds)
= CPU clock frequency (in hertz)
= Timer prescaler factor (2, 4 or 8 depend-
i
R register value required for a specific tim-
= Signal or pulse period (in seconds)
= External timer clock frequency (in hertz)
OC i R Value =
ing on CC[1:0] bits, see
Control
OC i R =
Bits)
t
*
f
EXT
PRESC
t
*
f
CPU
-5
www.DataSheet
www.DataSheet
www.DataSheet
www.DataSheet4U
Figure
Table 14 Clock
- 5
46)
4U
4U.com
4U
.com
.com
.com

Related parts for ST72F264G