My wave generator has a 50 ohm output impedance. I'm using a 10kohm series resistor and a 100nF capacitor. I calculated the RC time constant to be (10050)(100E-9)=1.005ms. A safe value for charging and discharging should be 5*(time constant), so 5.025ms. My function generator has a square wave with a duty cycle of 50%, so I want the full period to be 2*5.025ms=10.05ms. This corresponds to requiring a frequency < 1/10.05ms, or f < 99.5Hz.
So I set my wave generator to: Square, 50% Duty, 99Hz, 2.5V Amp, 2.5V Offset:
Now when I look at the voltage across my capacitor on my oscilloscope, instead of it starting at 0v and charging up to 5v, it shows that it starts at -2.5v and charges up to 2.5v. The circuit simulator I compared it against, however, shows that it goes from 0v to 5v like I expected, with the same source of 2.5v amplitude and 2.5v offset.
So why is my o-scope showing -2.5v to 2.5v across my cap instead of 0v to 5v?