timer or freecounter

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

timer or freecounter

1,477 Views
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.

Labels (1)
0 Kudos
1 Reply

230 Views
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 Kudos