当前位置:网站首页>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;
边栏推荐
- Eight working modes of stm32gpio and chip naming rules
- Characteristics of PUCCH formats
- How does the memory database give full play to the advantages of memory?
- Idea remote breakpoint debugging jar package project
- Matlab reads hexadecimal numbers and converts them into signed short
- [CSDN]C1训练题解析_第二部分_Web基础
- Hal library sets STM32 clock
- Windows下MySQL的安装和删除
- [graduation successful] [1] - tour [Student Management Information System]
- [CSDN]C1訓練題解析_第三部分_JS基礎
猜你喜欢

Project cost management__ Topic of comprehensive calculation

Schematic diagram and connection method of six pin self-locking switch

在三线城市、在县城,很难毕业就拿到10K

UCI and data multiplexing are transmitted on Pusch - Part I

JS foundation - prototype prototype chain and macro task / micro task / event mechanism

STM32 serial port usart1 routine

In third tier cities and counties, it is difficult to get 10K after graduation

Uniapp realizes global sharing of wechat applet and custom sharing button style

内存数据库究竟是如何发挥内存优势的?

STM32 port multiplexing and remapping
随机推荐
01仿B站项目业务架构
2020-08-23
The new series of MCU also continues the two advantages of STM32 product family: low voltage and energy saving
【顺利毕业】[1]-游览 [学生管理信息系统]
Successful graduation [3]- blog system update...
Project cost management__ Topic of comprehensive calculation
[untitled] proteus simulation of traffic lights based on 89C51 Single Chip Microcomputer
el-table X轴方向(横向)滚动条默认滑到右边
Idea remote breakpoint debugging jar package project
Epoll read / write mode in LT and et modes
[CSDN]C1訓練題解析_第三部分_JS基礎
Project scope management__ Scope management plan and scope specification
MySQL的简单使用(增删改查)
All processes of top ten management in project management
STM32 port multiplexing and remapping
STM32 serial port usart1 routine
Comment la base de données mémoire joue - t - elle l'avantage de la mémoire?
顺利毕业[2]-学生健康管理系统 功能开发中。。。
Raspberry pie installation SciPy
2021-01-03