I have set up an rc timer using 2 pins with the charging pin through a diode to charge a capacitor. I have pin 4 set in the DDIR to 0 (input) and it works fine.
I want to charge the cap with pin4 as an output pin then change the DDIR to input and wate for the cap do discharge . It seems the discharge is immediate as the pin must sink the current during the changeover from input to output.
Is there a way to do this? I only have 6 pins on the Attiny12V