1. 首页
  2. 编程语言
  3. Java
  4. 89S52频率计源代码

89S52频率计源代码

上传者: 2018-12-29 05:43:11上传 DOC文件 28KB 热度 36次
#include sbit P1_6 = P1^6; sbit P1_7 = P1^7; sbit P3_2 = P3^2; unsigned int int0_Count = 0; unsigned char int1_Count = 0; unsigned char int1_Goon = 0; unsigned long int1_Result = 0; unsigned int int3_Count = 0; void int3() interrupt 3 { TH1 = 0; TL1 = 0; ++int3_Count; } void int1() interrupt 1 { if(++int1_Count == 20)//1s定时完毕,结束计时 { TR0 = 0; EX0 = 0; int1_Result = int0_Count * 100UL; int1_Goon = 1; return; }
用户评论