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.

Period to frequency convertion in pic microcontrollers

Status
Not open for further replies.

chuzkin

Junior Member level 2
Joined
Jul 12, 2012
Messages
21
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,419
Hi everyone.

Does anybody have a assembler routine to convert a period in binary (TMR1) to a binay or bcd value? This is the formula f=1/p.
Thanks to all.
 

The fast way is to...

take the logarithm of your number. (Any base)

Subtract from zero (the log of 1). Or change the sign.

Take the antilog.

This gives you the reciprocal of your original number.

It's easier if your pic has a logarithm table.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top