Writing to PR2 (16f690)

Status
Not open for further replies.
Hi everyone,

Can I write to Timer2 register PR2 willy nilly during my program or can this only be done once at the start when configuring the special function registers?

Thanks in advance,

AB.
 
Hi,

PR2 is a register for the timer 2 to be matched. You can write into PR2 anytime you want. Special function registers are not necessary must be configured in the beginning. I don't know what willy nilly.
 
Thanks bananasiong,

"willy nilly" - British slang, means (in this context) 'any time' or 'whenever'
 
Last edited:
You probably knew this, but be careful when setting PR2 in case tmr2 is at a value higher than what your new PR2 value might be. If you don't reset tmr2 here you'll have to wait for tmr2 to go all the way round before it resets at your new PR2 value.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…