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.

log equation to simplifed for microcontroller

Status
Not open for further replies.

pany2008

Junior Member level 3
Joined
Aug 24, 2009
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
India
Activity points
1,627
Hi,

I want the programming code for following equation
logb(x) :- b(base) will be 10 fixed and x will vary from 0 to 1000,
i want the log result of x, where the result i want in 3 decimal point example log(500) = 2.698, x is my adc count from 0 to 1000.
If any one can help me out for the code for pic microcontroller(pic16f877a) i am using the hitech complier.
 

yes it returns the float value.
if you want to avoid the trailing numbers after the point you can use round() function...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top