If there was a large capacitance I bet it would stop completely. Let's see some schematic along with the "sample" code.

Then we will be stopping guesses...

Ioannis