1.3.1 ReadTimer0
For TMR_V1, TMR_V2, TMR_V3, TMR_V4, TMR_V5 and TMR_V6
Function:
[B]Reads the value of the timer0.[/B]
Include:
timers.h
Prototype:
unsigned int ReadTimer0( void );
Remarks:
This function reads the value of the timer0 register.
Timer0: TMR0L,TMR0H
Note: When using a timer in 8-bit mode that may be configured in 16-bit mode (e.g., timer0), the upper byte is not ensured to be zero. The user may wish to cast the result to a char for correct results. For example:
// Example of reading a 16-bit result
// from a 16-bit timer operating in
// 8-bit mode:
unsigned int result;
[B] result = (unsigned char) ReadTimer0();[/B]
Return Value:
[B]The current value of the timer.
[/B]
File Name:
t0read.c