Selection of Interrupt or Trigger

The interrupt function and trigger monitoring function are similar functions (edge detection), but each has the following features.

     The acquisition precision of the change of signal is high.

     It won't use that much CPU processing power.

     Compared with the trigger monitoring function, the response speed is fast.

 

 

     It is can monitor both the rising edge and falling edge at the same time.

     There is a possibility that it can be used with an input terminal that can't use the interrupt function.

 

 

In the case of the device which both functions of the interrupt function and trigger monitoring function can use, using of the interrupt function is recommended basically. However, if you want to detect both the rising edge and falling edge, or if you can't use the interrupt function on the input terminal you are using, consider using the trigger monitoring function.

 

In addition, for the edge detection,there is also a method (polling) of detecting a signal change by executing an input function loop (adding a minimum sleep) in the application. The CPU is increased, but please examine this method when you want to give top priority to the responsiveness for the signal change or want to detect an edge with the device which an interrupt and a trigger function can't use.

 

 

 

See Also

Interrupt  Trigger Function  The speed of a notifying interrupt