当前位置:网站首页>51 MCU timer 0 is used as time reference and delay function reference

51 MCU timer 0 is used as time reference and delay function reference

2022-06-09 14:03:00 perseverance52

51 MCU timer 0 It is used as time benchmark and delay function reference


  • Proteus Simulation demonstration is used as delay
     Insert picture description here

This is similar to Arduino Inside delay() The time delay function .

  • Because of the variable unsigned long The scope is limited , Overflow time is not considered for the time being .
     Insert picture description here
  • Overflow time :
    4294967295/86400/1000 = 49.71026961805556( God )

As a reference code for millisecond delay

#include<reg52.h>
//#include<intrins.h>
sbit LED 
原网站

版权声明
本文为[perseverance52]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206091245299193.html