飛思卡爾那些事之定時(shí)中斷(PIT)
目的:
功能描述:
資源:
PIT說明:
CODE:
#include
#include
#pragma LINK_INFO DERIVATIVE "mc9s12xs128"
//==================================================
//定時(shí)中斷函數(shù)
//定時(shí)中斷0實(shí)現(xiàn)500MS定時(shí)
//author:yangtze
//time:2009/5/2
//==================================================
#define PITTIME
unsigned int vTmpPIT=0;
void pllclk(void)//24MHz,外部時(shí)鐘為16MHz
{
}
void initIOBoutput(void)//IO口初始化,B口為輸出
{
}
void initPIT(void)//定時(shí)中斷初始化函數(shù) 50MS定時(shí)中斷設(shè)置
{
10us.
}
void main(void)
{
}
#pragma CODE_SEG __NEAR_SEG NON_BANKED
void interrupt 66 PIT0(void)
{
}
評(píng)論