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

Back to Subject List

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


 
#177955 - You missed the point
Responding to: ???'s previous message
Johan Smit said:
Maarten Brock said:
What is the use of calling send_char? Why not put its code in the ISR?
Is send_char reentrant? Which register bank is it using?

It was just something to show that from any interrupt any routine can be called immediately without tying up the interrupt. It could be anything.

You CANNOT call ANY routine from an interrupt. You must ensure that the routine is reentrant or that it is called from that interrupt only.
The OP was using register bank 3 for the interrupt. Calling a function that is not using the same bank will at best give a setback in performance if not fail.
All this can be avoided if the code is inserted in the ISR and you did not need a function to prove your point.

Johan Smit said:
Actually it is better to have a separate assembler page to use for the reti, but the difference is only in debugging.

I don't know what an assembler page is. So I have no idea what you mean here.

Maarten

List of 17 messages in thread
TopicAuthorDate
Writing to SBUF in Serial Routine            01/01/70 00:00      
   Sure...            01/01/70 00:00      
   yes, but            01/01/70 00:00      
      TX inside serialint            01/01/70 00:00      
         Pardon??            01/01/70 00:00      
            Pardon accepted            01/01/70 00:00      
               Still a Missing Part of Scheme            01/01/70 00:00      
            Pardon            01/01/70 00:00      
               Will that work in 'C' ?            01/01/70 00:00      
                  Assembler if you want            01/01/70 00:00      
                     Why send_char?            01/01/70 00:00      
                        Why send_char            01/01/70 00:00      
                           You missed the point            01/01/70 00:00      
                              Call a routine from an interrupt            01/01/70 00:00      
                                 Still misunderstanding            01/01/70 00:00      
                                 misunderstandings            01/01/70 00:00      
      what happened to the OP?            01/01/70 00:00      

Back to Subject List