当前位置:网站首页>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



边栏推荐
- MySQL Basics (create, manage, add, delete, and modify tables)
- WordPress simple mkblog blog theme template v2.1
- Monotonous stack -- 42. Receiving rain -- a difficult problem that big factories must know
- [错题]Concatenation
- [openvx] VX for basic use of objects_ matrix
- leetcode刷题:动态规划08(分割等和子集)
- 静态博客搭建工具汇总
- Dynamic planning - 63. Different paths II
- Leetcode brush question: dynamic planning 09 (weight of the last stone II)
- 测试用例管理工具
猜你喜欢

高等数学(第七版)同济大学 习题3-5 个人解答

Protocols in swift

leetcode刷题:动态规划09(最后一块石头的重量 II)

超好用的 PC 端长截图工具

构建“产业大脑”,以“数字化”提升园区运营管理及服务能力!

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

Super easy to use PC end long screenshot tool

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

【图像分类】2021-MLP-Mixer NIPS
![[leetcode] 34. Find the first and last positions of elements in the sorted array](/img/f0/3eaa33fa7b13abe5f27b136239507d.png)
[leetcode] 34. Find the first and last positions of elements in the sorted array
随机推荐
Greedy - 53. Maximum subarray sum
动态规划——62. 不同路径
[P4] check the differences between the two historical versions of the library file
Responsive high-end website template source code Gallery material resource download platform source code
【P4】解决本地文件修改与库文件间的冲突问题
Screenshot of deepstream detection results
[openvx] VX for basic use of objects_ image
Ch340 RTS DTR pin programming drives OLED
[openvx] VX for basic use of objects_ lut
递归和非递归分别实现求第n个斐波那契数
ES6 from getting started to mastering 08: extended object functions
Dynamic programming - 509. Fibonacci number
贪心——53. 最大子数组和
一个仿win10蓝屏的404页面源码
Build an "industrial brain" and improve the park's operation, management and service capabilities with "digitalization"!
超好用的 PC 端长截图工具
我的创作纪念日
Selenium--WEB自动化测试工具
贪心——122. 买卖股票的最佳时机 II
deepstream 检测结果截图