当前位置:网站首页>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_lut
- Differences among BRD, MRD and PRD
- Lightpicture - exquisite drawing bed system
- 超好用的 PC 端长截图工具
- Interview essential skills: SQL query special training!
- [openvx] VX for basic use of objects_ convolution
- Is there a bonus period for robot engineering
- Summary of static blog building tools
- 常用的弱网测试工具
- An article grasps the calculation and processing of date data in PostgreSQL
猜你喜欢

Monotonous stack -- 42. Receiving rain -- a difficult problem that big factories must know

Responsive high-end website template source code Gallery material resource download platform source code

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

Simple and easy-to-use performance testing tools recommended

Weekly recommended short video: how to correctly understand the word "lean"?

Dynamic planning - 63. Different paths II

Qt:QMessageBox消息框、自定义信号和槽

测试用例管理工具

C语言:求一个整数存储在内存中的二进制中1的个数

Dynamic programming - 509. Fibonacci number
随机推荐
【OPENVX】对象基本使用之vx_convolution
Leetcode 0140. word splitting II
Recursion and non recursion are used to calculate the nth Fibonacci number respectively
高等数学(第七版)同济大学 习题3-4 个人解答(后8题)
Read Plato farm's eplato and the reason for its high premium
Several ways of connecting upper computer and MES
Is there a bonus period for robot engineering
接口自动化测试,完整入门篇
Day08 redis的基础知识
C语言力扣第45题之跳跃游戏 II。遍历跳跃
Dynamic programming - 474. One and zero
Leetcode brush question: dynamic planning 09 (weight of the last stone II)
[openvx] VX for basic use of objects_ pyramid
Selenium -- Web automated testing tool
Error no matching function for call to 'std:: exception:: exception (const char [15])' problem solving
Advanced Mathematics (Seventh Edition) Tongji University exercises 3-6 personal solutions
Notes on writing questions in sword finger offer
[错题]Mocha and Railgun
Monotonic stack - 739. Daily temperature
After 95, Alibaba P7 published the payroll: it's really heartbreaking