tmp88ps42ng TOSHIBA Semiconductor CORPORATION, tmp88ps42ng Datasheet - Page 204

no-image

tmp88ps42ng

Manufacturer Part Number
tmp88ps42ng
Description
8 Bit Microcontroller Tlcs-870/x Series
Manufacturer
TOSHIBA Semiconductor CORPORATION
Datasheet
17. 8-Bit High-speed PWM (HPWM0 and HPWM1)
17.2 Control
17.2 Control
17.3 Functional Description
Control Register
Data Register
17.3.1 Operation modes
HPWMDR0
HPWMDR1
HPWMCR
(000CH)
(000DH)
(000EH)
Before writing to these registers, set the HPWMCR<PWMST> = 1 to make them ready for setup. When the HPW-
MCR<PWMST> is set to 0, each control register is reset, so that the high-speed PWM can be reset in software.
Note 1: The PWM output pulse width varies with the clock duty cycle.
Note 2: For the data registers, set data 10H to F0H.
Note 3: When HPWMCR<PWMST> = 0, the internal counter is cleared and data “1” is output to the port.
Note 4: Before selecting PWM mode, make sure HPWMCR<PWMST> = 0.
Note 5: Before entering STOP mode, set HPWMCR<PWMST, HPE0, and HPE1> all to 0.
Note 6: If HPWMCR<HPE0 or HPE1> is altered in the middle of PWM period, the waveform may be distorted. To avoid
The high-speed PWM is controlled using the Control Register (HPWMCR) and Data Registers (HPWMDR0, 1).
channels, and cannot be set separately for each channel.
The high-speed PWM has the following three modes of operation:
Note:These values apply to the case where the source clock (X1) is 20 MHz.
Use the HPWMCR<PWMMOD> to select operation mode. Note that operation mode is common to both
waveform distortion, make sure HPWMCR<PWMST> = 0 when enabling HPWM output.
PWMMOD
DATA7
DATA7
HPE1
PWMST
• 8-bit mode: (T = 2
• 7-bit mode: (T = 2
• 6-bit mode: (T = 2
HPE0
HPE1
7
7
7
DATA6
DATA6
HPE0
6
6
6
Select PWM mode
Run/stop 8-bit up counter
Control HPWM0 output
Control HPWM1 output
DATA5
DATA5
5
5
5
8
7
6
× clock period, f ≈ 78 kHz)
× clock period, f ≈ 156 kHz)
× clock period, f ≈ 313 kHz)
DATA4
DATA4
4
4
4
PWMST
DATA3
DATA3
00: Mode 0 (8 bits)
01: Mode 1 (7 bits)
10: Mode 2 (6 bits)
11: Reserved
0: STOP
1: RUN
0: Disable
1: Enable
0: Disable
1: Enable
3
3
3
Page 194
DATA2
DATA2
2
2
2
DATA1
DATA1
1
1
1
PWMMOD
DATA0
DATA0
0
0
0
R/W (Initial value: 00** 0*00)
R/W (Initial value: **** ****)
R/W (Initial value: **** ****)
TMP88PS42NG
R/W

Related parts for tmp88ps42ng