I was trying to make an ADC with an RC circuit. I was using an ATMEGA328P to measure the time the capacitor needed to discharge to 0V. I created the circuit with a sample and hold opamp, a precision 1uF Cap, and a 10K precision Resistor.
I was trying to find out the formula to calculate the capacitor original charged voltage with the time constant I get from my microcontroller and my known resistor and capacitor value. Is there any way/formula to calculate it?