Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Timer2 and PWM PIC16F876A

Status
Not open for further replies.

lake_of_fire

Newbie level 5
Joined
Feb 8, 2012
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,342
Hi

Is it possible to use PWM function and timer2 as a timer at the same time. I dont want to do anything with timer 2 other than get a value of elapsed time

Timer 2 will be used as the time elapsed in a PID function, both PWM modules are in use so capture/compare is not available.

(my timer0 and timer1 are both in use already or I would use one of them)

Thanks

---------- Post added at 01:29 ---------- Previous post was at 01:06 ----------

I think I have found my own answer apologies,

an interrupt is triggered when PR2 meets TMR2, so I can just use the interrupt to increment a value as and when TMR2 is reset (the problem I could see with timer2 and PWM is that TMR2 is reset when PR2 meets TMR2)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top