Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top