Newbie Help with 28X2 and a clock....

Mikler

Member
Hi!

Some newbie help/guidance appreciated....

I have created a circuit that controls 15 leds using available outputs and also uses ADC0 as a hibernate control (using the circuit on P65)

My question is, is it possible to run a timer (resolution in seconds would be fine) that runs 'simultaneously' while my main program runs (not required in 'hibernate' mode) that I can interrogate from my main 'loop' and make decisions based on elapsed time.

If this is really easy, any chance of some sample code?

Thanks in anticipation!

Mik
 

SilentScreamer

Senior Member
I think you want the settimer command. Look in the manual for an exact description (page 185 if I remember right) however it runs a timer in the background and increments the "timer" variable. The increment of the timer is set in the code (one second increment, 0.5 second, 2 second etc.).
 
Top