请问怎样拉高?作者: cat888 时间: 2010-4-30 08:12
我的初始化代码,参考参考。
volatile int g_pulseCount;
void PAInit(void)
{
DisableInterrupts; //禁止中断
TSCR1_TFFCA=1; //快速清除flag:PAOVF PAIF
/* DATASHEET P472
* To operate the 16-bit pulse accumulator independently of input capture or output compare 7 and 0
* respectively the user must set the corresponding bits IOSx = 1, OMx = 0 and OLx = 0. OC7M7 in the
* OC7M register must also be cleared.
*/
TIOS_IOS7=1; //单独使用16位脉冲累加器
OC7M_OC7M7=0;; //注意此时必须令IOS7=1,OC7M7=0,OM7=0,OL7=0
TCTL1_OM7=0;
TCTL1_OL7=0;