Driving an input with a 12V 4k7 pullup from 3V3 logic
If you want to amplify a 3.3V  logic signal to 12V, this will do that as long as the low-voltage logic can sink a couple of milliamps







simulate this circuit &ndash; Schematic created using CircuitLab