摘要:
#include<reg52.h>#include<intrins.h>#defineucharunsignedchar#defineuintunsignedintuintSysTime;voidTimer0()interrupt1{TH0=(65536-1000)/256;TL0=(65536-1000)%256;SysTime++;}voidInitTimer(){TMOD=0x01;//16位计数器TH0=(65536-1000)/256;TL0=(65536-1000)%256;TF0=0;//计数到时TF0为1,即当TH0=0xff;TL0=0xff;再运行一 阅读全文