02-07-2006 04:17 AM
02-07-2006 08:44 AM
1. A voltage level between 0.8 and 2.0 volts is really a no-man's land for TTL signals. I'm not sure what the formal spec says, but in practice I'd expect undefined, unreliable, unpredictable behavior. Such signal levels are not TTL-compatible. Advice: condition the signal to make it TTL-compatible before presenting it to the counter gate.
2. Buffered semi-period measurement is really more of an edge-driven than level-driven behavior. It doesn't behave the way you described. The count always increments with each Source edge, regardless of whether the gate signal is high or low. On every edge, both rising and falling, of the gate signal, the count value is buffered and then reset to 0. If you specify a "rising edge" polarity in semi-period measurement, it simply guarantees that the 1st value is buffered on a rising edge. Thereafter, a value is buffered on every subsequent falling or rising edge.
So the first value buffered is the time from starting the task until the 1st rising edge -- which is probably meaningless (as is typical in period and semiperiod measurements). The next value buffered is the time between that rising edge and the next falling edge, i.e., the "high time" of the incoming gate signal. The next value is the time between the falling edge and the next rising edge, i.e., the "low time" of the incoming gate. Etc.
3. If a source edge is occurring at the same time as a gate edge, I think the result is a race condition in the board circuitry. Based on experience I'd say that you won't fail to count the source edge, but I don't know if it will be the last increment for the prior buffered semiperiod or the first increment for the next one.
-Kevin P.