当前位置:网站首页>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;
边栏推荐
- UCI and data multiplexing are transmitted on Pusch - placement of data and UCI positions (Part III)
- Characteristics of PUCCH formats
- A lottery like scissors, stone and cloth (C language)
- Runtime.getRuntime().gc() 和 Runtime.getRuntime().runFinalization() 的区别
- 嵌入式本来就很坑,相对于互联网来说那个坑多得简直是难走
- Fundamentals of Electronic Technology (III)_ Chapter 2 principle of amplification circuit__ Crystal triode and field effect triode
- el-table X轴方向(横向)滚动条默认滑到右边
- 手机都算是单片机的一种,只不过它用的硬件不是51的芯片
- 2.Elment Ui 日期选择器 格式化问题
- Nr-prach: access scenario and access process
猜你喜欢

Vector processor 9_ Basic multilevel interconnection network

03 FastJson 解决循环引用

CEF download, compile project

Intelligent home design and development
![[combinatorics] Introduction to Combinatorics (combinatorial thought 2: mathematical induction | mathematical induction promotion | multiple induction thought)](/img/0e/dff6d3c6b7bf388bf71b0965533c25.jpg)
[combinatorics] Introduction to Combinatorics (combinatorial thought 2: mathematical induction | mathematical induction promotion | multiple induction thought)

Exception handling of arm

单片机学到什么程度能找到工作,这个标准不好量化

Oracle数据库 SQL语句执行计划、语句跟踪与优化实例
![[22 graduation season] I'm a graduate yo~](/img/e2/5393b051e2d1cb4c307efdfb3f9148.png)
[22 graduation season] I'm a graduate yo~

Happy Dragon Boat Festival—— Zongzi written by canvas~~~~~
随机推荐
Emballage automatique et déballage compris? Quel est le principe?
Hal library sets STM32 clock
NR technology -- MIMO
[combinatorics] Introduction to Combinatorics (combinatorial thought 2: mathematical induction | mathematical induction promotion | multiple induction thought)
【力扣刷题笔记(二)】特别技巧,模块突破,45道经典题目分类总结,在不断巩固中精进
端午节快乐!—— canvas写的粽子~~~~~
Development of fire evacuation system
UCI and data multiplexing are transmitted on Pusch - determine the bit number of harqack, csi1 and csi2 (Part II)
JS基础-原型原型链和宏任务/微任务/事件机制
干单片机这一行的时候根本没想过这么多,只想着先挣钱养活自己
UCI and data multiplexing are transmitted on Pusch (Part VI) -- LDPC coding
应用最广泛的8位单片机当然也是初学者们最容易上手学习的单片机
內存數據庫究竟是如何發揮內存優勢的?
Oracle database SQL statement execution plan, statement tracking and optimization instance
自動裝箱與拆箱了解嗎?原理是什麼?
MySQL 数据库基础知识(系统化一篇入门)
PIP references domestic sources
Not many people can finally bring their interests to college graduation
C language enumeration type
要選擇那種語言為單片機編寫程序呢