ç¨åºè¯´æï¼51åçæºå®æ¶å¨0å·¥ä½äºæ¹å¼ä¸ï¼å®æ¶50msä¸æä¸æ¬¡
æ¶æ¯ä¸º12M
#include<reg52.h>
void main
{
TOMD = 0X01ï¼ //é
ç½®å®æ¶å¨0å·¥ä½äºæ¹å¼ä¸
TH1 = ï¼65536-50000ï¼/256; //é«å
«ä½è£
å
¥åå¼
TL1 = ï¼65536-50000ï¼%256; //ä½å
«ä½è£
å
¥åå¼
ET0 = 1; //å¼å®æ¶å¨0ä¸æ
EA = 1; //å¼æ»ä¸æ
TR0 = 1; //å¯å¨å®æ¶å¨0
whileï¼1ï¼
温馨提示:内容为网友见解,仅供参考