There are numerous questions on SE about classical automotive signal adaptation to microcontrollers. The circuit below uses a few common techniques for analog signal interfacing when a microcontroller has only 3.3V tolerant analog and digital inputs and the signal to interface is an analog 0-5Vs signal. Since this is for an automotive environment the schottky diodes along with the R1 resistor provide some limited input protection. Depending on the diode selection if there were an input short to +12V you might get a voltage input at the first op-amp of say 5.2vs, which is acceptable for some opamps. The other key attribute is very high input impedance and reasonably low output impedance to the microcontroller. I have used this interface method with reasonable success, and in most cases added some filtering capacitors between the op-amps in Sallen-Key filter configuration. It is also worth noting that this design requires the use of a very good rail-to-rail opamp, as that rail-to-rail limit will clip the input.
I would like to expand this input pattern to also support 0-~12V digital pulse or switched inputs, under the assumption that the microcontroller input can operate as either an analog input, standard digital input, or the common 'CCP Capture Compare' style input. ( which is reasonably common ). As the circuit exists that style of input would work, as a sustained +~12V input would be clipped by the diode to around a ~5.2Vs with some conduction through the diode into the +5V rail. From there the output of the first op-amp would be the maximum op-amp output, and then the divider would take that down to 3.3V. Aside from the potential problem of insufficient load on the +5V rail, I am more concerned about the introduction of noise on the +5V rail. If we assume we are using this design with a typical 'automotive' +12V rail (which really means something in the 8-16v range with lots of noise), there would be a direct connection from that +12v automotive power rail across the diode and into the 5V rail. Considering all of the effort in the actual 5V power supply to reduce this noise, this seems like a potential problem.
Would it be typical to add some filtering on the diode to +5V rail connection?