Output Compare - Philips P89LPC938 User Manual

Single-chip microcontroller
Table of Contents

Advertisement

Philips Semiconductors
Table 45:
CCU prescaler control register, low byte (TPCR2L - address CAh) bit allocation
Bit
7
Symbol
TPCR2L.7
Reset
0
Table 46:
Bit
0
1
2
3
4
5
6
7
Table 47:
CCU control register 0 (TCR20 - address C8h) bit allocation
Bit
7
Symbol
PLLEN
Reset
0
Table 48:
CCU control register 0 (TCR20 - address C8h) bit description
Bit Symbol
Description
1:2 TMOD20/21
CCU Timer mode (TMOD21, TMOD20):
00 — Timer is stopped
01 — Basic timer function
10 — Asymmetrical PWM (uses PLL as clock source)
11 — Symmetrical PWM (uses PLL as clock source)
2
TDIR2
Count direction of the CCU Timer. When logic 0, count up, When logic 1, count down.
3
ALTAB
PWM channel A/B alternately output enable. When this bit is set, the output of PWM channel A and B
are alternately gated on every counter cycle.
4
ALTCD
PWM channel C/D alternately output enable. When this bit is set, the output of PWM channel C and D
are alternately gated on every counter cycle.
5
HLTEN
PWM Halt Enable. When logic 1, a capture event as enabled for Input Capture A pin will immediately
stop all activity on the PWM pins and set them to a predetermined state.
6
HLTRN
PWM Halt. When set indicates a halt took place. In order to re-activate the PWM, the user must clear
the HLTRN bit.
7
PLLEN
Phase Locked Loop Enable. When set to logic 1, starts PLL operation. After the PLL is in lock this bit it
will read back a one.

10.4 Output compare

The four output compare channels A, B, C and D are controlled through four 16-bit SFRs,
OCRAH:OCRAL, OCRBH:OCRBL, OCRCH:OCRCL, OCRDH: OCRDL. Each output
compare channel needs to be enabled in order to operate. The channel is enabled by
selecting a Compare Output Action by setting the OCMx1:0 bits in the Capture Compare x
Control Register – CCCRx (x = A, B, C, D). When a compare channel is enabled, the user
User manual
6
5
TPCR2L.6
TPCR2L.5
0
0
CCU prescaler control register, low byte (TPCR2L - address CAh) bit description
Symbol
TPCR2L.0
TPCR2L.1
TPCR2L.2
TPCR2L.3
TPCR2L.4
TPCR2L.5
TPCR2L.6
TPCR2L.7
6
5
HLTRN
HLTEN
0
0
Rev. 03 — 7 June 2005
4
3
TPCR2L.4
TPCR2L.3
0
0
4
3
ALTCD
ALTAB
0
0
UM10119
P89LPC938 User manual
2
1
TPCR2L.2
TPCR2L.1
0
0
Description
Prescaler bit 0
Prescaler bit 1
Prescaler bit 2
Prescaler bit 3
Prescaler bit 4
Prescaler bit 5
Prescaler bit 6
Prescaler bit 7
2
1
TDIR2
TMOD21
0
0
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
0
TPCR2L.0
0
0
TMOD20
0
56 of 139

Advertisement

Table of Contents
loading

Table of Contents