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

MPC82G516AF 参数 Datasheet PDF下载

MPC82G516AF图片预览
型号: MPC82G516AF
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-bit microcontroller]
分类和应用: 微控制器
文件页数/大小: 144 页 / 1527 K
品牌: MEGAWIN [ MEGAWIN TECHNOLOGY CO., LTD ]
 浏览型号MPC82G516AF的Datasheet PDF文件第46页浏览型号MPC82G516AF的Datasheet PDF文件第47页浏览型号MPC82G516AF的Datasheet PDF文件第48页浏览型号MPC82G516AF的Datasheet PDF文件第49页浏览型号MPC82G516AF的Datasheet PDF文件第51页浏览型号MPC82G516AF的Datasheet PDF文件第52页浏览型号MPC82G516AF的Datasheet PDF文件第53页浏览型号MPC82G516AF的Datasheet PDF文件第54页  
11.2.4 Programmable Clock-Out from Timer 2  
Using Timer 2, a 50% duty cycle clock can be programmed to come out from pin T2CKO (P1.0).  
The clock-out frequency depends on the system clock frequency (Fosc) and the reload value filled in the  
RCAP2H and RCAP2L registers, as shown in the following formula:  
Fosc  
Clock-Out Frequency =  
4 x (65536-[RCAP2H,RCAP2L])  
Where [RCAP2H,RCAP2L]= the content of RCAP2H and RCAP2L taken as a 16-bit unsigned integer.  
Timer 2 is programmed for the clock-out mode as follows:  
• Set T2OE bit in T2MOD register.  
• Clear C/-T2 bit in T2CON register.  
• Determine the 16-bit reload value from the formula and enter it in RCAP2H and RCAP2L registers.  
• Enter a 16-bit initial value in TH2 and TL2 registers. It should be the same as the reload value.  
• Start the timer by setting the run control bit TR2 in T2CON register.  
In the clock-out mode, Timer 2 roll-overs will not generate an interrupt. This is similar to when it is used as a  
baud-rate generator. It is possible to use Timer 2 as a baud-rate generator and a clock generator simultaneously.  
Note, however, that the baud-rate and the clock-out frequency depend on the same overflow rate of Timer 2.  
Figure 11-10. Programmable Clock-Out from Timer 2  
Note:  
Divided by 2, not by 12.  
Fosc  
D
Clock-Out  
(P1.0)  
Q
Q
2
Overflow  
TL2  
(8 Bits)  
TH2  
(8 Bits)  
CK  
TR2  
C/-T2=0  
Reload  
RCAP2L RCAP2H  
Transition  
Detector  
T2EX Pin  
(P1.1)  
Timer 2  
Interrupt  
EXF2  
EXEN2  
* Fosc is the system clock.  
MEGAWIN  
MPC82G516A Data Sheet  
50