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

Back to Subject List

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


 
#157733 - mistake
Responding to: ???'s previous message

"i think the interrupt when pin3.2 goes from low to high is not giving reliable results all the time."

THERE IS NO!!!!! INTERRUPT when pin3.2 goes from low to high .
Your program works somehow, because micro enters ISR all the time , while P3.2 or P3.3 is low. Read again chapter INTERRUPTS.

If You want ISR at both edges - You need inverter or some 8xxx51 with such options.
You can detect rising edge using GATE option of timers, too -
- make EXx_ISR active by falling edge, inside prepare TIMERx:
-- disable timer, preload with FFFF, setup timer in GATED mode. Then TIMERx_ISR will be invoked whit some delay after rising edge of signal. Note in this case - HIGH state cannot be very short.


But 1-st question is - how fast are signals in Your device,
what is maximum freqwency on P3.2/P3.3 .
Maybe You can monitor these signals trough regular system timer ISR, say -every 1 msec.
regards

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