Page 1 of 1

Timer0

Posted: Fri Feb 11, 2011 9:29 am
by wayne millard
Hi Team,
How do i write to timer0 on a 18F4520

Thanks
Wayne

Re: Timer0

Posted: Fri Feb 11, 2011 10:07 am
by Benj
Hello Wayne,

In normal 8-bit mode you write to the timer count register by doing the following in a C code block.

Code: Select all

tmr0l = 0x00;
Or if you had a Flowcode variable you wanted to pass then you could do it like this

Code: Select all

tmr0l = FCV_VARNAME;


where varname is the name of your Flowcode variable.