Aug 30, 2012 #1 C 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.
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.
Aug 31, 2012 #2 B BradtheRad Super Moderator Staff member Joined Apr 1, 2011 Messages 15,221 Helped 2,901 Reputation 5,814 Reaction score 2,990 Trophy points 1,393 Location Minneapolis, Minnesota, USA Activity points 114,064 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.
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.