当前位置:网站首页>51 MCU tmod and timer configuration
51 MCU tmod and timer configuration
2022-07-03 09:56:00 【Yiao】
One ,TMOD Configuration of

1. Timing mode GATE=0 TMOD=0X01(T0 Operation mode 1) TMOD=0X02(T0 Operation mode 2) TMOD=0X10 (T1 Operation mode 1) TMOD=0X20 (T1 Operation mode 2)
2. Count mode GATE=0 TMOD=0X05(T0 Operation mode 1) TMOD=0X06(T0 Operation mode 2) TMOD=0X50(T1 Operation mode 1) TMOD=0X60(T1 Operation mode 2)
Two . Assign initial value to
notes :51 SCM timer commonly used 1 Or the way 2 Method 1 can load the total number 65536 Method 22 can load the total number 256
Example of assignment
Use 51 Timer calculation software can save time 1.
1. Adopted by 1 Use timer 0 The way 1, timing 1ms.1ms=1000us, therefore 65536-1000=64536. Convert to 16 The forbidden number is 0XFC18;

TH0=(65536-1000)/256;
TL0=(65536-100)%256;or
TH0=OXFC;
TL0=0X18;2. Adopted by 2 Use timer 0 The way 2, timing 0.1ms,0.1ms=100us, therefore 256-100=246, Convert to 16 Into the system for 9C; 
TH0=0X9C;
TL0=0X9C;
边栏推荐
- 一个可执行的二进制文件包含的不仅仅是机器指令
- 顺利毕业[3]-博客系统 更新中。。。
- Design and development of biological instruments
- Install local sources using yum
- [untitled] proteus simulation of traffic lights based on 89C51 Single Chip Microcomputer
- NR PUCCH format0 sequence generation and detection mechanism
- Uniapp realizes global sharing of wechat applet and custom sharing button style
- Learn the contents of 5g toolbox supporting NR through the NR resources provided by MATLAB
- Successful graduation [3]- blog system update...
- Fundamentals of Electronic Technology (III)__ Fundamentals of circuit analysis__ Basic amplifier operating principle
猜你喜欢

嵌入式系统没有特别明确的定义
![[22 graduation season] I'm a graduate yo~](/img/e2/5393b051e2d1cb4c307efdfb3f9148.png)
[22 graduation season] I'm a graduate yo~

Blue Bridge Cup for migrant workers majoring in electronic information engineering

内存数据库究竟是如何发挥内存优势的?
![[male nanny style] teach you to open the first wechat applet](/img/a1/a571609ee846adf75506a88a629906.png)
[male nanny style] teach you to open the first wechat applet

CEF download, compile project

el-table X轴方向(横向)滚动条默认滑到右边

Fundamentals of Electronic Technology (III)__ Fundamentals of circuit analysis__ Basic amplifier operating principle

There is no shortcut to learning and development, and there is almost no situation that you can learn faster by leading the way

手机都算是单片机的一种,只不过它用的硬件不是51的芯片
随机推荐
[CSDN]C1訓練題解析_第三部分_JS基礎
我想各位朋友都应该知道学习的基本规律就是:从易到难
嵌入式系统没有特别明确的定义
UCI and data multiplexing are transmitted on Pusch - placement of data and UCI positions (Part III)
Vector processor 9_ Basic multilevel interconnection network
[successful graduation] [1] - visit [student management information system]
uniapp 实现微信小程序全局分享及自定义分享按钮样式
Successful graduation [2] - student health management system function development...
JS基础-原型原型链和宏任务/微任务/事件机制
嵌入式本来就很坑,相对于互联网来说那个坑多得简直是难走
Characteristics of PUCCH formats
Of course, the most widely used 8-bit single chip microcomputer is also the single chip microcomputer that beginners are most easy to learn
[Li Kou brush question notes (II)] special skills, module breakthroughs, classification and summary of 45 classic questions, and refinement in continuous consolidation
Epoll read / write mode in LT and et modes
NR technology -- MIMO
The new series of MCU also continues the two advantages of STM32 product family: low voltage and energy saving
手机都算是单片机的一种,只不过它用的硬件不是51的芯片
Development of electrical fire system
自動裝箱與拆箱了解嗎?原理是什麼?
Project cost management__ Cost management technology__ Article 8 performance review