Since your microcontroller doesn't support floating point, then you need to scale the numbers up and then divide back down. To do so, you will need to use long (32-bit) arithmetic.
For the ADC, 4 ma = 0 and 20 ma = 16384. Therefore the difference 16 ma is also represented by 16384.
If we take the full scale reading of the bar graph, 25, and divide by 16384, we get: 0.001526. But we can't use that value directly since it is floating point. So instead we take one million, and do the same thing. 1000000 / 16384 = 61.03 Now we have a number close enough to an integer which we can work with.
If we know take the reading from the ADC, multiply by 61, and divide by 40000 (which is 1000000 / 25), then we will have a number in the range 0-25. To try this out, if we take a value equal to half the range (16384/2), then for 8192 * 61 / 40000 we get 12.49 or half of 25 (but since its integer division, it will be rounded down to 12)
If, for some other application, you wanted an integer value in scaled hundreds (i.e. multiplied by 100), you could divide by 400 instead of 40000 and get 1249 (representing 12.49).
So the code is something like this (I've used casting to make sure all the necessary calculation are done as longs)
#define CONSTANT1 = (1000000L / 16384L) // 61
#define CONSTANT2 = (1000000L / 25L) // 40000
unsigned short ADC_value;
unsigned short bar_value;
ADC_value = get_ADC();
bar_value = (unsigned char)(((unsigned long)ADC_Value * CONSTANT1) / CONSTANT2);
In the case of a successive approximation converter, it will perform one conversion step per clock cycle, which actually performs one bit of the conversion. Thus an 8-bit conversion takes at least 8 clock cycles ( 4 us) and a 10-bit conversion takes at least 10 cycles (5 us) with a 2 MHz conversion clock (0.5 us period)
In the first step it performs the MSB conversion, asking "is the value more than half the reference voltage?", setting the MSB to '1' if yes, and subtracting either half the reference or zero (accordingly) from the input value.
In the next step it converts the next bit, asking "is the remaining value more than 1/4 the reference voltage?" and so on for each bit.
There is also some overhead, for tasks like storing the final result from the conversion into the output register, resetting the internal circuitry, and "freezing" the analog value for the next conversion (in a "sample and hold" circuit) to keep it stable during the actual conversion.
The designers of you example converter apparently decided to use 4 additional clock cycles for these tasks, thus giving 6us and 7us total time for a conversion.
There are ADCs which can perform an entire conversion in a single clock cycle, these are known as "flash" converters.
Best Answer
Probably something like a low pass filter with a high-voltage rated resistor to the input. The HF start is in the ~1MHz range so filtering that out is not difficult.
Looking at the block diagram of my AC/DC TIG welder with HF start, they monitor the voltage from the other side of the HF coupling transformer. Image from here.