Hi All,

I'm working on some code to read a AC or DC motors position
using a potmeter as indicator having max 5V at the whiper

I'm using the 16F819 with 10bit AD

I was wondering how I can convert the AD word value to 360 deg, as PBP has
limited math possibilitys

In the final code I want to implement a setup routine so that I can determine
which Digtal value (word) corresponds to 360deg or max azimuth to do the final divide

Can someone help me with the mathematics part as I dont see how to do that

Lets say that we have the following variables:

AZdeg position 0 to 360 deg
AZdig position from AD convertion
AZdigmax value which corresponds to 360deg (during setup) so here we have to determine the divide ratio

Thanks all for your time reading my request