Hi, I'm trying to create a "chrono" to measure the muzzle velocity of a paintball gun. Basically, I'm just making a two gate system out of some IR leds and photosensors which will hook into my Spartan 3E Starter board. The FPGA will measure the time (clock ticks, really) between gate changes and then do the division to arrive at the velocity, which it will display on the LCD. I'm having some problems getting the inputs into the FPGA to register correctly. The gate circuit uses the QSE156
NET "gateA" LOC = "D7" | IOSTANDARD = LVTTL | SLEW = SLOW | DRIVE = 6 ;
Now, the problem I am having is that I cant get the input to be stable on both high and low signals from the photosensor. It appears to oscillate at a fairly high frequency (MHz range). I tried to debounce the input (with 16 bits) and then incremented a counter on every rising edge of the stabilized input, but using the Spartans 8 LEDs to display the counter still was a blur. So, by that, I surmised that the input is oscillating between high and low. I would appreciate any input on this since I'm at a loss. Do I have my FPGA input settings correct? Must I use a wire less than X inches to connect the output of the photosensor to the board? Etc, etc. What am I missing?
thanks Jay