I'm late to the game on this, but I have one observation. You state that you have 100 Hz signal with a 98% duty cycle. That means it is in the low state for 0.2 msec and high for 9.8 msec. You are sampling at 1 kHz or once every 1 msec. Its no wonder why you may be missing the low states and only reading the highs.