Here's a simple way to do it.
When the input goes high, pin 2 goes low, and D1 conducts, charging CT so its negative side sits at around +0.7V. The output will be high.
When the input goes low, pin 2 goes high but CT does not discharge throgh D1; it discharges through RT. Pin 3 will reach...