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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/08/04 08:34
Read: times


 
#68157 - Changing Interrupt Priority
Hello,

Is it possible to change interrupt priority policy or disable interrupt during a low priority interrupt service routine in uM 8052? For example


Interrupt_Timer2: ; lowest interupt priority
push PSW
.
.
; read multiple bytes, need prohibit other higher priority interrupts
SETB PT2 ; ??? or CLR EA ???
MOV R0, #DATA
MOV @R0, P2 ; note 1
INC R0
MOV @R0, P1
.
.
CLR PT2 ; ??? or SETB EA ???
; allow other higher priority interrupts again
.
.
pop PSW
RETI


;if this interrupt jump to 'Note1', it could update the first byte, but still use the second old byte in 'Note 2'

Interrupt_Timer0: ; higher priority interrupt
push PSW
push ACC
.
MOV R0, #DATA
MOV A, @R0 ; Note 2
INC R0
MOV B, @R0
.
.
pop ACC
pop PSW
RETI


If this is not a good way to prevent incomplete data in a lowest priority interupt routine, please help me other solutions.
Thanks.

Hung Lam




List of 6 messages in thread
TopicAuthorDate
Changing Interrupt Priority            01/01/70 00:00      
   RE: Changing Interrupt Priority            01/01/70 00:00      
   RE: Changing Interrupt Priority            01/01/70 00:00      
      RE: Changing Interrupt Priority            01/01/70 00:00      
         RE: Changing Interrupt Priority            01/01/70 00:00      
            RE: Changing Interrupt Priority -Thanks            01/01/70 00:00      

Back to Subject List