当前位置:网站首页>STC timer is abnormal (how to modify the initial value, the timing time is 100ms)
STC timer is abnormal (how to modify the initial value, the timing time is 100ms)
2022-07-28 03:53:00 【King's Lamb】
Solution : Calculate the initial value manually , Or data type followed by UL
reason : Wrong data type , Cause spillage ( May be )
Learning notes :51 Single chip microcomputer (STC89C52) How to schedule 10ms
TIM_InitStructure.TIM_ClkSource = TIM_CLOCK_12T; // Specify the clock source , TIM_CLOCK_1T,TIM_CLOCK_12T,TIM_CLOCK_Ext
TIM_InitStructure.TIM_ClkOut = ENABLE; // Whether to output high-speed pulse , ENABLE or DISABLE
TIM_InitStructure.TIM_Value = 65536UL - (MAIN_Fosc / (10000UL*12)); // initial value
TIM_InitStructure.TIM_Run = ENABLE; // Whether to start the timer after initialization , ENABLE or DISABLE
Timer_Inilize(Timer2,&TIM_InitStructure); // initialization Timer4 Timer0,Timer1,Timer2,Timer3,Timer4
NVIC_Timer2_Init(ENABLE,NULL); // Interrupt enable , ENABLE/DISABLE; No priority



边栏推荐
- 【OPENVX】对象基本使用之vx_convolution
- ES6 from getting started to mastering 09: symbol type
- MySQL是怎么保证高可用的
- Selenium--WEB自动化测试工具
- Dynamic programming - 474. One and zero
- Screenshot of deepstream detection results
- Tungsten Fabric SDN — BGP as a Service
- Notes on writing questions in sword finger offer
- 【OPENVX】对象基本使用之vx_distribution
- Vertical align align the elements in the row are vertically centered
猜你喜欢

Msgan is used for pattern search of multiple image synthesis to generate confrontation Network -- to solve the problem of pattern collapse

动态规划——62. 不同路径

4-day excel practical training camp, 0.01 yuan special offer for only three days, 200 sets of learning kits

TypeError: ufunc ‘bitwise_ and‘ not supported for the input types, and the inputs could not be safely

C language: realize the exchange of two numbers without creating temporary variables

Qt:qmessagebox message box, custom signal and slot

leetcode刷题:动态规划08(分割等和子集)

Data mining-02

《剑指offer》| 刷题小记

Read Plato farm's eplato and the reason for its high premium
随机推荐
Appnium--APP自动化测试工具
接口自动化测试,完整入门篇
CH340 RTS DTR引脚编程驱动OLED
C语言力扣第45题之跳跃游戏 II。遍历跳跃
pip-script. py‘ is not present Verifying transaction: failed
贪心——45. 跳跃游戏 II
Redis cluster
我的创作纪念日
【LeetCode】34、在排序数组中查找元素的第一个和最后一个位置
C language: realize the exchange of two numbers without creating temporary variables
Server memory failure prediction can actually do this!
Data mining-01
高等数学(第七版)同济大学 习题3-4 个人解答(前8题)
Xctf attack and defense world web master advanced area unserialize3
Dynamic programming - 416. Segmentation and subsets
Recursion and non recursion are used to calculate the nth Fibonacci number respectively
[错题]Mocha and Railgun
Super easy to use PC end long screenshot tool
C语言:不创建临时变量实现两数交换
静态博客搭建工具汇总