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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/02/03 23:36
Read: times


 
#59830 - RE: Interrupt trigger type again
Responding to: ???'s previous message
hi,
Usage of the level-triggered interrupt is very nice way for implementing Single-Step Operation which may help you alot due step-by-step debugging. Here is the short info about how:

Single-Step Operation
The AT89C51 interrupt structure allows single-step execution with very little software overhead. As previously noted, an interrupt request will not be serviced while an interrupt of equal priority level is still in progress, nor will it be serviced after RETI until at least one other instruction has been executed.
Thus, once an interrupt routine has been entered, it cannot be re-entered until at least one instruction of the interrupted program is executed. One way to use this feature for single-stop operation is to program one of the external interrupts (for example, INT0) to be level-activated. The service routine for the interrupt will terminate with the following code.
JNB P3.2,$	; Wait Here Till INT0 Goes High
JB P3.2,$	; Now Wait Here Till it Goes Low
RETI		; Go Back and Execute One Instruction
If the INT0 pin, which is also the P3.2 pin, is held normally low, the CPU will go right into the External Interrupt 0 routine and stay there until INT0 is pulsed (from low to high to low). Then it will execute RETI, go back to the task program, execute one instruction, and immediately reenter the External Interrupt 0 routine to await the next pulsing of P3.2. One step of the task program is executed each time P3.2 is pulsed.

cu

List of 22 messages in thread
TopicAuthorDate
RE: Interrupt trigger type again            01/01/70 00:00      
   RE: Interrupt trigger type again            01/01/70 00:00      
      RE: Interrupt trigger type again            01/01/70 00:00      
      RE: Interrupt trigger type again            01/01/70 00:00      
         RE: Interrupt trigger type again            01/01/70 00:00      
            It does re-occur Oleg...            01/01/70 00:00      
               RE: It does re-occur Oleg...            01/01/70 00:00      
                  RE: It does re-occur Oleg...            01/01/70 00:00      
                     Im Slightly Confused.            01/01/70 00:00      
                     RE: It does re-occur Oleg...            01/01/70 00:00      
                        RE: It does re-occur Oleg...            01/01/70 00:00      
                           RE: It does re-occur Oleg...            01/01/70 00:00      
                              RE: It does re-occur Oleg...            01/01/70 00:00      
               RE: It does re-occur Oleg...            01/01/70 00:00      
                  RE: It does re-occur Oleg...            01/01/70 00:00      
                     RE: It does re-occur Oleg...            01/01/70 00:00      
                     RE: It does re-occur Oleg...            01/01/70 00:00      
   RE: Interrupt trigger type again            01/01/70 00:00      
      RE: Interrupt trigger type again            01/01/70 00:00      
   RE: Interrupt trigger type again            01/01/70 00:00      
      RE: Interrupt trigger type again            01/01/70 00:00      
         RE: Interrupt trigger type again            01/01/70 00:00      

Back to Subject List