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.

how to use 16f877 pic timer1 as counter in c

Status
Not open for further replies.

aamiralikhoja

Member level 5
Joined
Aug 11, 2004
Messages
90
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
708
timer 1 flag 16f877

Please tell me how to use timer1 of pic 16f877 as counter which works


as autoreload mode as in 89c51 16 bit timer.Countes 8 clock pulses .


and agian autoreloded with same valuses.I would want to use poll method not


interrupt method.
 

c pic tmr1

Hi,

I dont know where you read that TMR1 has autoreload? the only way to use a pull method is to check when the TMR1 register is highr then the XXXX number that you are looking for, then reset TMR1 register.
The easy way, valculate the diffrence, set it in the register and wait for an interupt. then reload the value to the register and wait again.
BTY, you dont have to turn on the interupt of TMR1, you can just check the flag TMR1IF, if =1 then reset flag and reload value.

Good lcuk.
 

16f877 counter

Hi!
Read the data sheet there are different ways of doing it.
you can even utilise the(CCP) capture compare module for this purpose.
Regards.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top