![Hynix Semiconductor GMS81C5108 Скачать руководство пользователя страница 56](http://html1.mh-extra.com/html/hynix-semiconductor/gms81c5108/gms81c5108_user-manual_2192989056.webp)
GMS81C5108
JUNE 2001 Ver 1.0
53
12.4 16-bit Capture Mode
16-bit capture mode is the same as 8-bit capture, except
that the Timer register is running with 16 bits.
The clock source of the Timer 0 is selected either internal
or external clock by bit T0CK2, T0CK1 and T0CK0.
In 16-bit mode, the bits T1CK1,T1CK0 and 16BIT of TM1
should be set to “1” respectively.
Figure 12-10 16-bit Capture Mode
12.5 8-Bit (16-Bit) Compare OutPut Mode
The GMS81C5108 has a function of Timer Compare Out-
put. To pulse out, the timer match can goes to port pin
(R31) as shown in Figure 12-3 and Figure 12-6. Thus,
pulse out is generated by the timer match. These operation
is implemented to pin, R31/PWM.
In this mode, the bit PWMO of Port Mode Register (PMR)
should be set to “1”, and the bit PWME of Timer1 Mode
Register (TM1) should be cleared to “0”.
In addition, 16-bit Compare output mode is available, also.
This pin output the signal having a 50 : 50 duty square
wave, and output frequency is same as below equation.
12.6 PWM Mode
The GMS81C5108 has one high speed PWM (Pulse Width
Modulation) function which shared with Timer1.
In PWM mode, the R31/PWM pin operates as a 10-bit res-
olution PWM output port. For this mode, the bit PWM of
Port Mode Register (PMR) and the bit PWME of timer1
mode register (TM1) should be set to “1” respectively.
The period of the PWM output is determined by the
T1PPR (PWM Period Register) and PWMHR[3:2] (bit3,2
of PWM High Register) and the duty of the PWM output
is determined by the T1PDR (PWM Duty Register) and
PWMHR[1:0] (bit1,0 of PWM High Register).
The user can use PWM data by writing the lower 8-bit pe-
riod value to the T1PPR and the higher 2-bit period value
to the PWMHR[3:2]. And the duty value can be used with
the T1PDR and the PWMHR[1:0] in the same way.
The T1PDR is configured as a double buffering for glitch-
TM0
ADDRESS : 0E0H
RESET VALUE : --000000
B
-
-
CAP0
T0CK2
T0CK1
T0CK0
T0CN
T0ST
TM1
ADDRESS : 0E2H
RESET VALUE : 00000000
B
POL
16BIT
PWME
CAP1
T1CK1
T1CK0
T1CN
T1ST
1
X
X
X
X
X
X
1
0
X
1
1
X
X
÷
2
÷
4
÷
128
÷
512
÷
8
÷
32
EC0
Edge Detector
MUX
1
T0 + T1 (16-bit)
TDR1
T0IF
CLEAR
COMPARATOR
TIMER 0
INTERRUPT
T0ST
0 : Stop
1 : Clear and Start
T0CN
T0CK[2:0]
TDR0
INT0IF
INT 0
INTERRUPT
INT0
IESR[1:0]
CAPTURE
CDR1
CDR0
(8-bit)
(8-bit)
(8-bit)
(8-bit)
÷
1024
X : The value “0” or “1” corresponding your operation.
SX
IN
0X
1X
X
IN
SCMR[1:0]
2
f
COMP
Oscillation Frequency
2
Prescaler Value
TDR
1
)
+
(
×
×
--------------------------------------------------------------------------------------
=
Downloaded from
Elcodis.com
electronic components distributor