?? init_timer3.c
字號:
#include "p33FJ256GP710.h"
void Init_timer3(void)
{
T3CON = 0x0000;
PR3 = 0xDFFF;
IFS0bits.T3IF = 0;
IPC2bits.T3IP = 6;
IEC0bits.T3IE = 1;
T3CON = 0x8010;
// 1000 0000 0001 0000
/*
Bit15 T2O "1" start timer
Bit14 undefine
Bit13 0 = Continue module operation in Idle mode
Bit12 undefine
Bit11 undefine
Bit10 undefine
Bit09 undefine
Bit08 undefine
Bit07 undefine
Bit06 TGATE 0
Bit05 0
Bit04 1 1:8
Bit03 T32 1 = Timerx and Timery form a single 32-bit timer; 0 = Timerx and Timery act as two 16-bit timers
Bit02 undefine
Bit01 TCS: Timerx Clock Source Select bit
Bit00 undefine
*/
}
void __attribute__((__interrupt__)) _T3Interrupt( void )
{
__builtin_btg( (unsigned int *)&LATA, 3 );
/* reset Timer 3 interrupt flag */
IFS0bits.T3IF = 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -