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.

Frequency counter P16F877A issue

Status
Not open for further replies.

Bizzare

Newbie level 4
Joined
Mar 15, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,335
Hi guys, was thinking of using a P16F877A and a frequency generator to simulate a RPM sensor circuit for a car engine.
Am I correct in assuming that say 5,000RPM can be represented by 83.3Hz from a function generator or am I doing something wrong here?
Secondly, for the coding part, I am writing the code in CCS and need to create a subroutine that counts 0.5s and records how many pulses occur in that time frame to calculate the frequency
Am I better off just using Timer0 and whilst the tick reaches overflow just read the highs and use a count++ function. My only concern is im very confused when it comes to interrupts.
OR
Using the capture function in Timer1?

Any feedback is appreciated or some advice, thanks in advance.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top