Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/26/08 19:54
Read: times


 
#157779 - Detecting Both Edges - A very old trick
Responding to: ???'s previous message
One way to detect both edges of an input signal is to put an XOR gate between the interrupt source signal and the INTR_N input of the MCU. The gate output goes to the MCU. The other input of the XOR comes from another port I/O pin set as an output high or low. If this port pin is low then the MCU's negative sensitive interrupt input will trigger from a H-->L of the interrupt source signal. If the port pin is high then the MCU's negative sensitive interrupt input willl trigger from a L-->H of the interrupt source signal.

The scheme is now to toggle the port pin output bit each time an MCU interrupt comes. Now an interrupt will be generated for each transition of the source signal.......as long as the source signal is not faster than the MCUs interrupt response time and the time your code spends in the interrupt service routine.

Michael Karas


List of 24 messages in thread
TopicAuthorDate
pls help....8051 external interrupts            01/01/70 00:00      
   show definition of "a" variable            01/01/70 00:00      
      definiton : sbit a=P3^2;            01/01/70 00:00      
   Need more information            01/01/70 00:00      
      the entire code            01/01/70 00:00      
         keyscan            01/01/70 00:00      
         How the LED are connected?            01/01/70 00:00      
         One tip            01/01/70 00:00      
   P3.2= iNT0            01/01/70 00:00      
      P3.2= INT0            01/01/70 00:00      
         pin 3.2            01/01/70 00:00      
            P3.2= INT0..1            01/01/70 00:00      
   Obvious Reason            01/01/70 00:00      
      time duration            01/01/70 00:00      
         mistake            01/01/70 00:00      
            ok thanks alot            01/01/70 00:00      
               ?            01/01/70 00:00      
   GATE0/1 ?            01/01/70 00:00      
      no            01/01/70 00:00      
      try            01/01/70 00:00      
         Debounce maybe?            01/01/70 00:00      
      Solution            01/01/70 00:00      
   interrupt flag bit clear            01/01/70 00:00      
      Detecting Both Edges - A very old trick            01/01/70 00:00      

Back to Subject List