Introduction - If you have any usage issues, please Google them yourself
#include reg51.h
typedef unsigned char BYTE
typedef unsigned int WORD
#define SYSclk 6000000L
#define MODE1T //Timer clock mode, commendt this line is 12T mode, uncomment is 1T mode
#ifdef MODE1T
#define T1MS (65536-SYSclk/1000) //1ms timer calculation method in 1T mode, 1000=1000Hz
#else
#define T1MS (65526-SYSclk/12/1000) //1ms timer calculation method in 12T mode
#endif