cancel
Showing results for 
Search instead for 
Did you mean: 

how to call log function stm8L152

David.Cheng
Associate II

STVD AND cosmic

I WANT TO calculate Thermistor temperature, but did not find a log funnction

2 REPLIES 2

Hi David

First in STVD you need to configure the linker to enable the standard library for floats as shown in my attachment.

   volatile float r=100.0;

   volatile float ln=log(r); // calculate Napierian logarithm

volatile float l10 = log10(r); // calculate logarithm to the base 10

include of course math.h

Hopefully it will help you.

Best regards

JC Toussaint

thanks!