/*
 * TIME1.c
 *
 *  Created on: 2019-8-16
 *      Author: charles_cai
 */
#include"main.h"

void Init_T1(unsigned char mode)
{
	T1CLKSE =0;//时钟源选择，16M/4
	T1CS =0;//定时模式
	T1CKS1 =1;
	T1CKS0 =1;
	if(!mode)
	{
		T1RLD =1;
		PP2 =0xC3;
		PP1 =0x50;
	}

	else
		T1RLD =0;

	T1ON=1;
}

