![Sino Wealth SH79F3283 Manual Download Page 87](http://html1.mh-extra.com/html/sino-wealth/sh79f3283/sh79f3283_manual_1283063087.webp)
SH79F3283
87
8.4 12-bit PWM1 (Pulse Width Modulation)
8.4.1 Feature
8 bit resolution ratio, provide prescaler function
Provided overflow and duty interrupt function on every PWM period
Selectable output polarity, can be use as normal timer when the enable bit is set to 0
The SH79F3283 has one 8-bit PWM module, which can provide the pulse width modulation waveform with the period and the
duty being controlled individually by corresponding register. The PWM module clock source or pin output selection is
controlled by PWM1C register. The PWM module Period selection is controlled by PWM1P register. The PWM module Duty
selection is controlled by PWM1D register.
8.4.2 Register
Table 8.21
PWM1 Control Register
D9H, Bank0
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
PWM1C
PWM1EN
PWM1S
TnCK11
TnCK10
-
PWM1IE
PWM1IF
PWM1OE
R/W
R/W
R/W
R/W
R/W
-
R/W
R/W
R/W
Reset Value
(POR/WDT/LVR/PIN)
0
0
0
0
-
0
0
0
Bit Number
Bit Mnemonic
Description
7
PWM1EN
PWM1 module enable control bit
0: disable PWM1 module
1: enable PWM1 module
6
PWM1S
PWM1 output normal mode of duty cycle
0: high active, PWM1 output high during duty time, output low during remain
period time
1: low active, PWM1 output low during duty time, output high during remain
period time
5-4
TnCK1[1:0]
PWM1 clock select bit
00: system clock/1
01: system clock/8
10: system clock/64
11: system clock/256
2
PWM1IE
PWM1 interrupt enable bit (When EPWM bit in IEN1 is set)
0: Disable PWM1interrupt
1: Enable PWM1 interrupt
1
PWM1IF
PWM1 interrupt flag bit
0: Clear by software
1: Set by hardware to indicate that the PWM1 period counter overflow
0
PWM1OE
PWM1 output control bit
0: PWM1 is disable, shared as I/O
Note: This bit is set to 0, but PWM1EN = 1, so that PWM1 module is still
working, just no waveform output. PWM1
can be use as normal timer
1: PWM1 is enable
Note: If this bit is set to 1 and PWM1EN = 0, so that PWM1 output inactive
level (Select high level output low level, select low level output high
level)