www.pudn.com > remotepro.rar > time0.c
/*
*********************************************************************************
*********************************************************************************
*/
#pragma sfr
#pragma ei
#pragma interrupt INTTM000 HD_INTTM000
#ifndef UINT8 unsigned char
#define UINT8 unsigned char
#endif
#include "function.h"
/*
*********************************************************************************
*********************************************************************************
*/
__interrupt void HD_INTTM000( )
{
Remote_count++;
if(Remote_count>800)
Remote_count=800;
}
/*
*********************************************************************************
*********************************************************************************
*/
void TM00_Init(void) /*0.1ms time*/
{
PRM00=0x02;
CR000 =0x02;
}
/*
*********************************************************************************
*********************************************************************************
*/
void TM00_Enable(void)
{
TMC00=0x0c;
}
/*
*********************************************************************************
*********************************************************************************
*/
void TM00_Disable(void)
{
TMC00 = 0x00;
}
/*
*********************************************************************************
*********************************************************************************
*/
void timer000_time()
{
EI();
TM00_Init();
TM00_Enable();
TMMK000=0;
}