This will drive a 0-12V digital signal from a 0-3.3V processor pin, by pulling a resistor low. It may not achieve 1ms rise times, depending on the capacitance you need to drive, and if you need to supply current, it'll have problems there, too. But it's simple.
Circuit on the left:
- 0V in -- 12V out (assuming no load pulling low).
- 3.3V in -- 0.0V2V out (assuming load less than 2mA or so)
Circuit on the right:
- 0V in -- 0V out (assuming no load pulling high)
- 3.3V in -- 12V - 0.2V out (assuming sink current less than 5mA or so)