当前位置:网站首页>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;
边栏推荐
- The new series of MCU also continues the two advantages of STM32 product family: low voltage and energy saving
- Definition and use of enum in C language
- An executable binary file contains more than machine instructions
- Of course, the most widely used 8-bit single chip microcomputer is also the single chip microcomputer that beginners are most easy to learn
- 一个可执行的二进制文件包含的不仅仅是机器指令
- All processes of top ten management in project management
- Development of electrical fire system
- Runtime.getRuntime().gc() 和 Runtime.getRuntime().runFinalization() 的区别
- 万字手撕七大排序(代码+动图演示)
- 01仿B站项目业务架构
猜你喜欢

Nr-prach:prach format and time-frequency domain

How does the nr-prach receiver detect the relationship between prembleid and Ta

Quelle langue choisir pour programmer un micro - ordinateur à puce unique

Of course, the most widely used 8-bit single chip microcomputer is also the single chip microcomputer that beginners are most easy to learn

PRACH --- originator
![[CSDN] C1 training problem analysis_ Part II_ Web Foundation](/img/91/72cdea3eb3f61315595330d2c9016d.png)
[CSDN] C1 training problem analysis_ Part II_ Web Foundation

STM32 serial port usart1 routine

內存數據庫究竟是如何發揮內存優勢的?
![【顺利毕业】[1]-游览 [学生管理信息系统]](/img/91/72cdea3eb3f61315595330d2c9016d.png)
【顺利毕业】[1]-游览 [学生管理信息系统]

Development of electrical fire system
随机推荐
Matlab reads hexadecimal numbers and converts them into signed short
C language enumeration type
[csdn] C1 analyse des questions de formation Partie III Bar _ JS Foundation
Convert IP address to int
Seven sorting of ten thousand words by hand (code + dynamic diagram demonstration)
Development of fire evacuation system
Assignment to '*' form incompatible pointer type 'linkstack' {aka '*'} problem solving
Epoll read / write mode in LT and et modes
没有多少人能够最终把自己的兴趣带到大学毕业上
STM32 general timer 1s delay to realize LED flashing
STM32 port multiplexing and remapping
All processes of top ten management in project management
Fundamentals of Electronic Technology (III)__ Chapter 6 combinational logic circuit
Quelle langue choisir pour programmer un micro - ordinateur à puce unique
Project cost management__ Cost management technology__ Article 8 performance review
STM32 external interrupt experiment
[CSDN]C1训练题解析_第二部分_Web基础
Exception handling of arm
CEF download, compile project
嵌入式系统没有特别明确的定义