欢迎访问ic37.com |
会员登录 免费注册
发布采购

GMS87C5108Q 参数 Datasheet PDF下载

GMS87C5108Q图片预览
型号: GMS87C5108Q
PDF下载: 下载PDF文件 查看货源
内容描述: [Microcontroller, 8-Bit, OTPROM, 4.19MHz, CMOS, PQFP80, QFP-80]
分类和应用: 微控制器和处理器可编程只读存储器
文件页数/大小: 102 页 / 1525 K
品牌: HYNIX [ HYNIX SEMICONDUCTOR ]
 浏览型号GMS87C5108Q的Datasheet PDF文件第44页浏览型号GMS87C5108Q的Datasheet PDF文件第45页浏览型号GMS87C5108Q的Datasheet PDF文件第46页浏览型号GMS87C5108Q的Datasheet PDF文件第47页浏览型号GMS87C5108Q的Datasheet PDF文件第49页浏览型号GMS87C5108Q的Datasheet PDF文件第50页浏览型号GMS87C5108Q的Datasheet PDF文件第51页浏览型号GMS87C5108Q的Datasheet PDF文件第52页  
GMS81C5108  
12. Timer / Counter  
Timer/Event Counter consists of prescaler, multiplexer, 8-  
bit timer data register, 8-bit counter register, mode register,  
input capture register and Comparator as shown in Figure  
12-3. And the PWM high register for PWM is consisted  
separately.  
ternal clock input. Since a least clock consists of 2 and  
most clock consists of 1024 oscillator periods, the count  
rate is 1/2 to 1/1024 of the oscillator frequency in Timer0.  
And Timer1 can use the same clock source too. In addition,  
Timer1 has more fast clock source (1/1 to 1/8).  
The timer/counter has seven operating modes.  
- 8 Bit Timer/Counter Mode  
- 8 Bit Capture Mode  
In the “counter” function, the register is increased in re-  
sponse to a 0-to-1 (rising edge) transition at its correspond-  
ing external input pin EC0 (Timer 0).  
- 8 Bit Compare Output Mode  
- 16 Bit Timer/Counter Mode  
- 16 Bit Capture Mode  
- 16 Bit Compare Output Mode  
- PWM Mode  
In addition the “capture” function, the register is increased  
in response external interrupt same with timer function.  
When external interrupt edge input, the count register is  
captured into capture data register CDRx.  
Timer1 is shared with “PWM” function and “Compare  
output” function.  
In the “timer” function, the register is increased every in-  
ternal clock input. Thus, one can think of it as counting in-  
Example 1:  
Example 3:  
Timer 0 = 8-bit timer mode, 8ms interval at 4MHz  
Timer 1 = 8-bit timer mode, 4ms interval at 4MHz  
Timer0 = 8-bit event counter, 2ms interval at 4MHz  
Timer1 = 8-bit capture mode, 2us sampling count.  
LDM  
LDM  
LDM  
LDM  
LDM  
SCMR,#0  
;Main clock mode  
LDM  
LDM  
LDM  
TDR0,#99  
;99+1, 100 count  
;event counter  
TDR0,#249  
TM0,#01FH  
TM0,#0001_0011B  
TDR1,#124  
TM1,#0000_1111B  
R0DR,#XXXX_1XXXB ;R03input  
LDM  
LDM  
LDM  
LDM  
IESR,#XXXX_01XXB ;FALLING  
PMR,#XXXX_1X1XB  
TDR1,#0FFH  
;EC0,INT1  
;2us  
SET1 T0E  
SET1 T1E  
EI  
:
:
:
TM1,#0001_1011B  
SET1 T0E;ENABLE TIMER 0  
SET1 T1E;ENABLE TIMER 1  
SET1 INT1E;ENABLE EXT. INT1  
EI  
:
X: don’t care.  
Example 2:  
Example 4:  
Timer0 = 16-bit timer mode, 0.5s at 4MHz  
Timer0 = 16-bit capture mode, 8us sampling count. at 4MHz  
LDM  
LDM  
LDM  
LDM  
LDM  
SCMR,#0  
;Main clock mode  
LDM  
LDM  
LDM  
LDM  
TDR0,#0FFH  
TDR1,#0FFH  
TM0,#02FH  
TM1,#04FH  
TDR0,#23H  
TDR1,#0F4H  
TM0,#0FH  
TM1,#4CH  
;FMAIN/32, 8us  
LDM  
LDM  
IESR,#XXXX_XX01B  
PMR,#XXXX_XXX1B  
;AS INT0  
SET1 T0E  
EI  
:
:
:
SET1 T0E;ENABLE TIMER 0  
SET1 INT0E;ENABLE EXT. INT0  
EI  
:
X: don’t care.  
JUNE 2001 Ver 1.0  
45  
 复制成功!