I'm looking for a digital circuit whose behavior I will describe in a moment. It has one digital input (5V logic) and two digital outputs (12V logic). I'll hereby refer to these levels as 0 and 1, but keeping in mind the voltage difference between input and output. This circuit has to be as cheap as possible, with simplicity the second priority.
Upon a rising edge on the input, the first output should immediately go to 0, while the value of the second output is irrelevant (don't care).
Upon a falling edge on the input, both outputs should immediately go to 1. After an interval of time (around 200 ms, up to 50% tolerance on the timing is still acceptable), the second output should go to 0.
I built a circuit for this that would work if the input was 12 V, but other considerations forced the voltage level on the input to 5 V. I already felt my solution was getting complicated for a 12 V input, and just piling on a level shifter from 5 to 12 V would further complicate this circuit, so I'm trying to start from scratch and think of a simpler solution.
I think posting my circuit here would be counterproductive, as the natural reaction would be trying to refine it, and I think a good solution demands some outside the box thinking, but I will edit the post to include the circuit if requested by anyone.
Edit: by request, here is the circuit:
The NOT gates are Schmitt triggers (HCF40106 in my circuit), which is why the circuit doesn't work properly with a 5V input: 5V is not recognized as a high level signal when the Schmitt triggers are supplied with 12V.
To fix the 5V issue, I thought of passing the input through the following circuit, but as stated above, I believe this is getting more complicated than necessary: