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

MC81F4316S 参数 Datasheet PDF下载

MC81F4316S图片预览
型号: MC81F4316S
PDF下载: 下载PDF文件 查看货源
内容描述: ABOV半导体的8位单芯片微控制器产品 [ABOV SEMICONDUCTOR 8-BIT SINGLE-CHIP MICROCONTROLLERS]
分类和应用: 半导体微控制器
文件页数/大小: 200 页 / 4220 K
品牌: FINECHIPS [ FINECHIPS ]
 浏览型号MC81F4316S的Datasheet PDF文件第119页浏览型号MC81F4316S的Datasheet PDF文件第120页浏览型号MC81F4316S的Datasheet PDF文件第121页浏览型号MC81F4316S的Datasheet PDF文件第122页浏览型号MC81F4316S的Datasheet PDF文件第124页浏览型号MC81F4316S的Datasheet PDF文件第125页浏览型号MC81F4316S的Datasheet PDF文件第126页浏览型号MC81F4316S的Datasheet PDF文件第127页  
MC81F4x16  
Function Description  
Interval Timer Mode  
A match signal is generated and T1O pins are toggled when the T1CR register value equals the  
T1DR register value. The match signal generates a timer match interrupt and clears the T1CR  
register.  
Pulse Width Modulation Mode  
Pulse width modulation (PWM) mode lets you program the width (duration) of the pulse that is output  
at the PWM1O pin. As in interval timer mode, a match signal is generated when the counter value is  
identical to the value written to the T1DR register. In PWM mode, however, the match signal does not  
clear the counter. Instead, it runs continuously, overflowing at FFH, and then continues incrementing  
from 00H.  
Although you can use the match signal to generate a timer 1 overflow interrupt, interrupts are not  
typically used in PWM-type applications. Instead, the pulse at the PWM1O pin is held to Low level as  
long as the reference data value is less than or equal to ( ) the counter value and then the pulse is  
held to High level for as long as the data value is greater than ( > ) the counter value. One pulse width  
is equal to tCLK * 256.  
So, the period and duty times are,  
Duty = t  
Period = t  
* (T1DR + 1)  
* 256  
CLK  
CLK  
In order to generate the PWM1O signal, 3 steps are required,  
Steps  
Example C code  
T1CONM = 0xC0;  
T1DR = 25;  
T1SCR = 0x38;  
Make sure the PWM1O port is set by PWM output mode  
Set the T1DR value properly  
Set the T1SCR register properly  
Capture Mode  
In capture mode, you have to set EXT3 interrupt. When the EXT3 interrupt is occurred, the T1CR  
register value is loaded into the T1DR register and the T1CR register is cleared.  
And the timer 1 overflow interrupt is generated whenever the T1CR value is overflowed.  
So, If you count how many overflow is occurred and read the T1DR value in EXT3 interrupt routine, it  
is possible to measure the time between two EXT3 interrupts. Or it is possible to measure the time  
from the T1 initial time to the EXT3 interrupt occurred time.  
The time = ( 256 * tCLK ) * overflow_count + (tCLK * T1DR)  
Note  
t is the period time of the timer-counters clock source  
CLK  
You must set the T1DR value before set the T1SCR register. Because T1DR value is  
fetched when the count is started(the T1CC bit is set) or match/overflow event is occurred.  
October 19, 2009 Ver.1.35  
123  
 复制成功!