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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/07/06 11:51
Read: times


 
#115767 - Serial interrupt problem
Hello there!
i am writing a program in which i must monitor port P2.0 to be low and execute some sort of code but i also want that when some data is received in SBUF the control should be transfered to the serial interrupt and after serving ISR return to monitor P2.0 to be low . so the problem is that i contineously monitor P2.0 to be low that code works efficiently but it does not call the serial interrupt when data is trasfered to serial port of 8051 the code slice is given below:

org 00h
jmp main
org 23h
call serial

main:
mov tmod,#20h
mov th1,#-3
mov scon,#50h
setb tr1

jb p2.0,$
-----------
-----------
----------- Some Code
-----------
-----------
;Serial ISR
serial:
serial:
MOV A,SBUF
oneon:
cjne A,#'A',last
setb P1.0
clr RI
reti
last:
clr RI
reti
end



List of 8 messages in thread
TopicAuthorDate
Serial interrupt problem            01/01/70 00:00      
   Starting Serial            01/01/70 00:00      
   jump - not call            01/01/70 00:00      
   its still not working            01/01/70 00:00      
      Have you enabled the receiver?            01/01/70 00:00      
      Interrupt enable            01/01/70 00:00      
   Thank you            01/01/70 00:00      
      Cross-Post            01/01/70 00:00      

Back to Subject List