I would look at DT's Instants
http://www.picbasic.co.uk/forum/showthread.php?t=3251
The elapsed timer might be what you need, with a little modification...
http://darreltaylor.com/DT_INTS-18/elapsed.html
I would look at DT's Instants
http://www.picbasic.co.uk/forum/showthread.php?t=3251
The elapsed timer might be what you need, with a little modification...
http://darreltaylor.com/DT_INTS-18/elapsed.html
Dave
Always wear safety glasses while programming.
Thanks, looks interesting!
I'm doing it backwards. Mainloop turns on leds, start a timer, while timer runs gosub main code, turn off leds when timer over. Start a 2nd timer for off period, gosub main code until over. Rinse and repeat.
I adjust 2 timers until no more flicker.
Robert
The problem is, when looking at that sample code, I see only the part of code, which runs on interrupt. I have no idea where to insert the "main" code?
In here:
You check the status of the timer flags to determine if things have changed, then reset them.Code:Main: IF SecondsChanged = 1 THEN SecondsChanged = 0 LCDOUT $FE,2, DEC Days,"d-",DEC2 Hours,":",DEC2 Minutes,":",DEC2 Seconds ENDIF GOTO Main
Robert
Bookmarks