![Hynix Semiconductor GMS81C5108 User Manual Download Page 57](http://html1.mh-extra.com/html/hynix-semiconductor/gms81c5108/gms81c5108_user-manual_2192989057.webp)
GMS81C5108
54
JUNE 2001 Ver 1.0
less PWM output. In Figure 12-11, the duty data is trans-
ferred from the master to the slave when the period data
matched to the counted value. (i.e. at the beginning of next
duty cycle).
The bit POL0 of TM1 decides the polarity of duty cycle.
The duty value can be changed when the PWM outputs.
However the changed duty value is output after the current
period is over. And it can be maintained the duty value at
present output when changed only period value shown as
Figure 12-13. As it were, the absolute duty time is not
changed in varying frequency.
Note: If the user need to change mode from the Timer1
mode to the PWM mode, the Timer1 should be
stopped firstly, and then set period and duty register
value. If user writes register values and changes
mode to PWM mode while Timer1 is in operation,
the PWM data would be different from expected
data in the beginning.
The relation of frequency and resolution is in inverse pro-
portion. Table 12-2 shows the relation of PWM frequency
vs. resolution.
PWM Period = [PWMHR[3:2]T1PPR+1] X Source Clock
PWM Duty = [PWMHR[1:0]T1PDR+1] X Source Clock
If it needed more higher frequency of PWM, it should be
reduced resolution.
Note: If the duty value and the period value are same, the
PWM output is determined by the bit POL0 (1: High,
0: Low). And if the duty value is set to “00
H
”
, the
PWM output is determined by the bit POL0(1: Low,
0: High). The period value must be same or more
than the duty value, and 00
H
cannot be used as the
period value.
Table 12-2 PWM Frequency vs. Resolution at 4MHz
Figure 12-11 PWM Mode
Resolution
Frequency
T1CK[1:0]
=00 (250nS)
T1CK[1:0]
=01 (500nS)
T1CK[1:0]
=10 (2uS)
10-bit
3.9KHz
1.95KHz
0.49KHZ
9-bit
7.8KHz
3.9KHz
0.98KHZ
8-bit
15.6KHz
7.8KHz
1.95KHz
7-bit
31.25KHz
15.6KHz
3.90KHz
÷
1
÷
2
÷
8
PWMHR
ADDRESS : 0E5
H
RESET VALUE : ----0000
B
-
-
-
-
PWM03
PWM02
PWM01
PWM00
X
X
X
X
MUX
1
T1CN
T1CK[1:0]
T1 (8-bit)
T1ST
0 : Stop
1 : Clear and Start
CLEAR
COMPARATOR
COMPARATOR
T1PDR (8-bit)
PWMHR[1:0]
T1PPR (8-bit)
PWMHR[3:2]
T1PDR (8-bit)
S
Q
R
POL
PWMO
R31/PWM
T0 clock source
TM1
ADDRESS : 0E2
H
RESET VALUE : 00
H
POL
16BIT
PWME
CAP1
T1CK1
T1CK0
T1CN
T1ST
X
0
1
0
X
X
X
X
[PMR.6]
Period High
Duty High
Slave
Master
Bit Manipulation Not Available
X : The value “0” or “1” corresponding your operation.
SX
IN
0X
1X
X
IN
SCMR[1:0]
2
Downloaded from
Elcodis.com
electronic components distributor