In order to study the behavior of an RC circuit, I connected a resistor and a capacitor to an Arduino's I/O as shown:

[![enter image description here][1]][1]

The Arduino digital Output feeds the circuit with a square pulse of 2 sec duration. *(one second HIGH, one second LOW)*

for a charge time of 1 sec:
$$V_c = E(1-e^{-\dfrac{t}{\tau}}) = E(1-e^{-\dfrac{1}{0.83}})=0.7E$$

where E is the power supply voltage

Converting *E value* to a 10bit range, $$V_c = 0.7 \times 1024 = 717$$

[![enter image description here][2]][2]

whose minimum value is 237 *(0.23E)*, and maximum value = 784 *(0.76E)*.

Assuming that the capacitor's value may differ a little, I may accept that 0.70E = 0.76E. But in that case, **shouldn't Vc start from zero?**

Assuming that the capacitor is semi charged, shouldn't in any case max-min=0.7E? *(Before initiating, I discharged the capacitor connecting it with a resistor for several seconds.)*

Any thoughts would be appreciated.

**EDIT:**
Using several values of charge time, every time the graph seems to be positioned in the middle, meaning Vc(min)+Vc(max) = E/2.
[1]: http://i.stack.imgur.com/xfZOc.png
[2]: http://i.stack.imgur.com/kVWcY.png