#include "timer3.h"


void T3_Init(void)
{
	CLKCFG &= 0xBF;		//SSEL选择ILRC
	
	T3CON |= 0x02;		//T3时钟源选择内部32K 
//	T3CON |= 0x30;		//预分频选择256分频
	
	TL3 = 0x33;					//100MS左右
	TH3 = 0xF3;
	T3CON |= 0x04;		//TR3 = 1开始定时器3
}
//STOP下定时器3工作唤醒
void Timer3_Test(void)
{
	P4CR |= 0x01;
	P4 |= 0x01;
	

	T3_Init();
	IEN1 |= 0x02;
	EA = 1;
	
	while(1)
	{
		PCON |= 0x02;		//进入停机模式
		P4 = 0x00;
	}
	
}
