hello dear colleagues,
i need to have a simple solution for detecting pulses ( f=100Hz width 800µs).
think of a monoflop with retrigger, but do not know how to implement.
must detect the absence of pulses from zerocross detector.
if pulses are detectet, normal operation
if pulses are absent, failure condition ( to be detected with 1-bit status register).
any ideas how to get this done the PSoC way ? (schematic)
best regards Markus
The rates and pulse period sufficiently slow you could do this entirely in code.
You have not stipulated decision latency.
Your tasks are -
1) Detect missing pulse, no input
2) Detect pulse too short/long, period OK
3) Detect pulse OK, but period is not
You could use a counter that is enabled by input, when input returns low
look at counter value to determine if runt pulse, or if pulse too long.
A secondary timer/counter to implement period checking, to make
sure no pulse case is handled, as well as out of spec period for
Cocde or HW can be used, consider a LUT to implement a state machine
along with counters/timers to measure pulse parameters.
This reference has a one shot approach, but keep in mind one
shots notorius for poor timing accuracy.
You could implement a one shot with comparator and reference
to get more accurate timing.