Author | Joep Suijs, Copyright (C) 2008 Joep Suijs |
Adapted-by | Rob Hamerling, William Welch |
Compiler | >=2.4m |
Fixed interval support for non-blocking delays, but without using an interrupt.
No dependency found
var word timer0_interval_counter
No documentation found
var word timer0_countdown[DELAY_SLOTS]
No documentation found
var word timer0_load
preload value for timer0
timer0_poll_init()
initialize the timer and related variables. automatically detects and makes use of 16-bit timer0 if present.
set_delay(byte in slot, word in ticks)
setup the delay for the specified slot.
_timer0_poll()
for internal use only. roughly equivalent to timer0 ISR
_timer0_poll_init_rate(dword in overflow_rate)
for internal use only
check_delay(byte in slot) return bit
returns "true" when the delay has been achieved. be sure to call this routine fairly often if you care about fairly accurate delays.
interval_counter'get() return word
returns the current value of the interval timer
18f14k50 | 18f14k50_tmr0_poll_interval.jal |
18f2450 | 18f2450_tmr0_poll_interval.jal |
18f4550 | 18f4550_tmr0_poll_interval.jal |
18f4585 | 18f4585_canopen_blink.jal |
18f4585 | 18f4585_tmr0_poll_interval.jal |