Which would you use for pulse detection/counting?
- posted
14 years ago
Which would you use for pulse detection/counting?
It depends on a lot. In at least one case, I used both edges.
Assume noise is already filtered and you're just counting pulses with a MCU where just changing a bit or two determines detection on rising or falling.
>
both for detecting, neg for counting.In a micro, you would use (preferably) interrupts.
So if noise is out of the picture and you have control over and set the inactive steady-state of the pulse source to Lo, then it's only a falling edge ISR that one needs to concentrate on?
>
Always count rising edges. That way, if the universe comes to an end in the middle of a pulse, you won't miss it.
John
Ding ding ding ding ding ... We have a winner! :-)
-- Rich Webb Norfolk, VA
Ha ha, if everything goes belly up, who cares if a pulse is missed, unless you're counting gold bars :) Happy Xmas you lot .
Hmm, sounds good for ECL, but how about CCL ?
Depends on the device that is doing the pulsing?
It's logical to use the level the device generates when its TRUE/ON
For some, the raising edge how ever, this leads to problems where the devices must insure it does not over drive the unit that is receiving the pulse.
If you use an open collector type device for example, you can then have the monitoring device use it's own pull up or what ever voltage it requires and the pulsing device won't care until you breach it's limits of course.
So, with that, I would say a falling edge using an open collector pulser would be the ticket. And even if a totem pole/Line driver output device was connected for some reason, it could thus use the receiver device supply voltage to insure it does not get over driven. And with that, you still can use falling edge..
In the case of a pulsing device that has NOT outputs with open-collector, you then are faced with PNP outputs on the NOT's in many cases and NPN on the non-NOT's NOT's are high side, others are low side open-collector. In the case of the NOT's, you would have to supply a pull down R. unless you design your receiver device to work with NOT/PNP sensors. etc..
I like the rising edge. I like things that are moving up. Moving up is often better than moving down. Such as.. Moving up to a better car. Or.. Moving up to a better home..
D from BC myrealaddress(at)comic(dot)com British Columbia Canada
In an MCU you would use a hardware counter and interrupts only to handle counter overflows
it depends if you're more interested in the beginning of the event or the completion of the event.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.