Hi, Savnik

Jerson is right ... the simplest Pic way is to build a retrieving table.

IN PbP that's called LOOKDOWN2 ... ( catches the closest values, sup and inf ... just think to use a clever index !!! )

Then just have to add a linear approx. between table values ...


Buuuuuut, My old brain tells me it is very easy to do it with 3or4 couples of linearising resistors and diodes ...

or to use a logarithmic AOP !!!

Last and simplest solution: The App Notes of ICL 7106 or 7136 show a logarithmic scale design ...

Which is closest to your requirements ??? ...

Alain