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

Back to Subject List

Thread Closed: Issue successfully resolved

???
03/07/04 13:46
Read: times


 
#66181 - RE: What I have understood till now
Responding to: ???'s previous message
Deepak Kash wrote:
-------------------------------


As TI is set it causes an interrupt at 0023h

Above is correct

The serial ISR clears the TI flag and RETI

That is possible, it depends on what YOUR ISR is doing...



The PC points to location of next instruction
MOV SBUF,#0DH
Then again
After the last bit is sent ,TI is set

As TI is set it causes an interrupt at 0023h

WHy would your cpu wait until the SBUF is transmitted?
It will immediately fetch the next instruction and continue your program

The serial ISR clears the TI flag and RETI

The PC points to location of next instruction
MOV SBUF,#0AH


You seem to have missed the meaning of an ISR...
an ISR is NOT meant to just make the CPU wait before running it's next instruction.

Your ISR should run each time the TI bit is set, ie each time the char you loaded into SBUF is transmitted. That means that your ISR must
1) clear the TI-bit
2) fetch the next char to be transmitted from a buffer
3) update the buffer pointer
4) move the char to SBUF
5) RETI

Look upon your ISR as a program that is executed each time the interrupt is triggered.

HTH
regards
Patrick



List of 61 messages in thread
TopicAuthorDate
What is wrong in my serial comm prog            01/01/70 00:00      
   RE: What is wrong in my serial comm prog            01/01/70 00:00      
      RE: What is wrong in my serial comm prog            01/01/70 00:00      
         RE: What is wrong in my serial comm prog            01/01/70 00:00      
         RE: What is wrong in my serial comm prog            01/01/70 00:00      
            RE: What is wrong in my serial comm prog            01/01/70 00:00      
            You mean the ISR?            01/01/70 00:00      
   RE: What is wrong in my serial comm prog            01/01/70 00:00      
   RE: What is wrong in my serial comm prog            01/01/70 00:00      
      Deepak disappeared            01/01/70 00:00      
         RE: Deepak (dis)appeared            01/01/70 00:00      
            RE: Deepak (dis)appeared            01/01/70 00:00      
               The problem continues            01/01/70 00:00      
                  What I have understood till now            01/01/70 00:00      
                     RE: What I have understood till now            01/01/70 00:00      
                        RE: What I have understood till now            01/01/70 00:00      
                           Hans van Pelt & patrick de groote            01/01/70 00:00      
                           RE: What I have understood till now            01/01/70 00:00      
                           What is the problem now            01/01/70 00:00      
                           What is the problem now            01/01/70 00:00      
                              RE: What is the problem now            01/01/70 00:00      
                        Is this okay            01/01/70 00:00      
                           RE: Is this okay            01/01/70 00:00      
                              RE: Is this okay            01/01/70 00:00      
                              RE: Is this okay            01/01/70 00:00      
                                 RE: Is this okay            01/01/70 00:00      
                                    re:is this okay            01/01/70 00:00      
                                       RE: re:is this okay            01/01/70 00:00      
                                       RE: re:is this okay            01/01/70 00:00      
                                          I think this should be okay            01/01/70 00:00      
                                             RE: I think this should be okay            01/01/70 00:00      
                                                RE: I think this should be okay            01/01/70 00:00      
                                                   RE: I think this should be okay            01/01/70 00:00      
                                                   RE: I think this should be okay            01/01/70 00:00      
                                                      RE: I think this should be okay            01/01/70 00:00      
                                                      RE: I think this should be okay            01/01/70 00:00      
                                                         RE: I think this should be okay            01/01/70 00:00      
                                                            I will wait for my victory            01/01/70 00:00      
                                                               RE: I will wait for my victory            01/01/70 00:00      
                                                                  RE: I will wait for my victory            01/01/70 00:00      
                                                                     RE: I will wait for my victory            01/01/70 00:00      
                                                                     RE: I will wait for my victory            01/01/70 00:00      
                                                                        RE: I will wait for my victory            01/01/70 00:00      
                                                                           RE: your hardware            01/01/70 00:00      
                                                                        RE: I will wait for my victory            01/01/70 00:00      
                                                                     RE: I will wait for my victory            01/01/70 00:00      
                                                               RE: I will wait for my victory            01/01/70 00:00      
                                                                  RE: I will wait for my victory            01/01/70 00:00      
                                                                     I will be the victor soon            01/01/70 00:00      
                                                                        Protect dptr            01/01/70 00:00      
                                                                           RE: Protect dptr            01/01/70 00:00      
                                                                        RE: I will be the victor soon            01/01/70 00:00      
                                                                     RE: I will wait for my victory            01/01/70 00:00      
                                                                        RE: I will wait for my victory            01/01/70 00:00      
                                 RE: Is this okay            01/01/70 00:00      
                                    RE: Is this okay            01/01/70 00:00      
                                       RE: Is this okay            01/01/70 00:00      
                                    RE: Is this okay            01/01/70 00:00      
                                       RE: Is this okay            01/01/70 00:00      
                                       RE: Is this okay            01/01/70 00:00      
   close this discussion            01/01/70 00:00      

Back to Subject List