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

Back to Subject List

Thread Closed: Issue successfully resolved

???
03/11/04 17:47
Read: times


 
#66526 - RE: Serial comm interrupt driven Done
Responding to: ???'s previous message
hi,

okay, our congratulations then!

btw,
1) have you planed to save PSW, A and other registers due ISR executes? For LOOP:SJMP LOOP it is now necessary but at the future you should take it at mind.
2) Here is not mistake but possible not good work:
RET_OPEN:CJNE A,#'O',RET_CLOSE
	CLR P1.0		; Switches ON led connected to P1.0

RET_CLOSE:CJNE A,#'C',RET_END
	SETB P1.0	; Switches OFF led connected to P1.0
RET_END:RETI
You see, when ACC contains 'O' then you clear P1.0 but then it does not need to check ACC for 'C' because if is it 'O' then it is not 'C'
3) I suggest you to make common ISR exit. As for now, your program contains many RETI - try optimize it for only one exit point. It helps you in the future when you will store/restore resources used with ISR.

Regards,
Oleg

List of 8 messages in thread
TopicAuthorDate
Serial comm interrupt driven Done            01/01/70 00:00      
   RE: Serial comm interrupt driven Done            01/01/70 00:00      
   RE: Serial comm interrupt driven Done            01/01/70 00:00      
      RE: Serial comm interrupt driven Done            01/01/70 00:00      
   RE: Serial comm interrupt driven Done            01/01/70 00:00      
   RE: Serial comm interrupt driven Done            01/01/70 00:00      
      RE: Serial comm interrupt driven Done            01/01/70 00:00      
      RE: Serial comm interrupt driven Done            01/01/70 00:00      

Back to Subject List