Howto count clock ticks on a MC13213 SRB or on a NCB board

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

Howto count clock ticks on a MC13213 SRB or on a NCB board

959 Views
Topoestivo
Contributor I
Hi,
I'm a newbie about MC13213...

I've a question for you:

how can I read the value of HCS08 mcu clock ticks since it started?

I thought it was possible tu use the clock() function in time.h library, but it returns a value of 0...

I'm writing C code on CodeWarrior, is it possible to use this function clock() or some one other?

Bye Bye, Andrea.

P.S. sorry for my crap english.
Labels (1)
0 Kudos
1 Reply

197 Views
peg
Senior Contributor IV
Hi,
 
The S08 does not have any hardware to support this directly.
So you would need an OS that does or do it yourself.
You could extend the timer register yourself by using the overflow (bit or interrupt)
Or you could use the register specified in your Codewarrior thread and extend that yourself.
 
0 Kudos