Bonjour à vous tous,
Je me demande si c'est possible de me fournir le code en C, qui permet de manipuler les "Timers" pour le microcontrôleur HCS12P, ce dernier à pour but de créer une fonction "tâche" qui s’exécute régulièrement durant un temps bien déterminé et indépendamment du temps d’exécution du programme principal. .
Je vous remercie d'avance.
Bien cordialement.
Hi,
i've bben able to understand the subject using a web translator (hopefully it's correct):
"I wonder if it is possible to provide me the code in C, to manipulate the "Timers" for HCS12P microcontroller, it aims to create a "task" function that runs regularly during a time well determined and independent of the runtime of the main program."
Here you can download MC9S12P Family Demo Lab Software with PDF guide:
AN3937 -- MC9S12P-Family Demonstration Lab Training
AN3937SW.zip
The SW pack contains a CodeWarrior project demonstrating Timer functionality.
Some more SW example that are written for other S12(X) families which you can re-use take as a reference (or re-use):
S12G Examples Pack
S12X Examples Pack
Hope it helps.
Have a great day,
iggi
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
hi Iggi,
Thank you very much for your reply.
I view the source code of timers that you have provided me in the demo Lab Software, and yet I could not locate where I can integrate the function that will be called periodically: a function that can for example light a LED periodically after every two seconds " an interruption", independently of the normal execution of the main code.
Thank you in advance.