0-10V, 4-20mA to microcontroller
In contrast to Asmyldof's answer I would be inclined to make a dual-mode input as is common on industrial PLCs, etc. Typically these add a 500 Ω shunt resistor across the 0 - 10 V input to convert 20 mA to 10 V.







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. A 0 - 10 V / 4 - 20 mA input for 3.3 V ADC.


R2, 3 and 4 provide an easy to make 3:1 divider. Their impedance is very high relative to the shunt resistor so the loading should not introduce a significant error.
There is no reverse protection diode on the input as this will cause a voltage drop in the signal to the ADC.
D1 and D2 provide over-voltage and reverse-voltage protection to the ADC without voltage drop and without the worry of Zener leakage as the voltage approaches 3.3 V. The current shunted to the PSU through these diodes will be limited by R2 and R3 to a low value.
The op-amp can be eliminated.


With this arrangement you have a standard dual-purpose input.