Sampling frequency and the pulse-widths
You are aliasing, because you are not respecting the Nyquist criterion. 

An 80Hz pulse train has components going up to very high frequencies. You will alias these differently depending on your sampling frequency.

If you low pass filter your pulse train, such that all components above fs/2 are removed, then you will get consistent results. However, note that once you have low pass filtered, you will need to use an ADC to capture the signal.