#include "OB6710.h"

	unsigned char gT3CON,gTL3,gTH3,gDiv;
	unsigned int CNT;


void TIMER3_Interrupt(void) interrupt 6
{
	P0_1 = ~P0_1;
	T3CON = T3CON | 0x20;
	if((T3CON & 0x20) != 0x00)
		while(1);	
	T3CON = T3CON | 0x10;
}

void Test_Timer(void)
{
	T3CNTL = 0x12;
	T3CNTH = 0x64;
	T3NDIV = 0x0A;
	T3CON = T3CON | 0x11;
	
	while(1)
	{
	  gT3CON =  T3CON;
		gTH3 = TH3;
		gTL3 = TL3;
		
		if( (T3CON& 0x20) == 0x20)
		 {
			T3CON = T3CON | 0x20;
			 if((T3CON & 0x20) != 0x00)
			  while(1);		  
			
				T3CON = T3CON | 0x10;
			 P0_0 = ~P0_0;
		 }	
	}
}

void main(void)
{
	Test_Timer();
}
