timer or freecounter

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

timer or freecounter

2,166 次查看
HKS
Contributor I
I am trying to set a 5 sec delay for my hc12 MCU. This is to stop a DC motor for 5 sec. Now I am trying to use a freecounter to run the TTicks and use that value that is close to 5 sec. But I have no idea how to get the value for TTicks in my code. I tried setting a variable equal to TTicks but it gave me an error. Also i tried using FreeCntr321_GetValMS( ): which i am having trouble setting the proper format.
Any help will be appreciated.

标签 (1)
0 项奖励
回复
1 回复

919 次查看
CrasyCat
Specialist III
Hello
 
Here I would create a project for the appropriate CPU with ProcessorExpert support.
Add a FreeCntr or a TimerInt Bean to your project, adjust the property of the bean to whatever configuration you are looking for and build the project.
 
You can then check the generated code to detect how you need to configure your timer.
 
CrasyCat
0 项奖励
回复