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

Back to Subject List

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


 
#177977 - Still misunderstanding
Responding to: ???'s previous message
I think we are misunderstading one another.
Johan Smit said:
Maarten Brock said:
All this can be avoided if the code is inserted in the ISR and you did not need a function to prove your point.
I don't think so. The serial interrupt is the highest on the priority list, and that will screw up all interrupts such as timers and rotary encoders on external interrupts. The response can be quite long. It is far safer to call the routine and free the interrupts immediately in my opinion.

Yes, wasn't that your point you wanted to make? And I meant that you do not need the separate function send_char(). You only need the freeint() function. This saves you the overhead of calling a function and possible other trouble.

The priority list is of no influence, only the priority setting in the IP sfr.

Calling a function that is not using the same bank will at best give a setback in performance if not fail.
I regularly use a separate reg bank for certain interrupt routines to avoid pushing an popping. Why not, surely that is what the USING keyword is for?

Yes, but when you start mixing register banks in the ISR and the called function, you can get into a lot of trouble. Your proposed function send_char() has no using directive which makes it default to using 0. The ISR of the OP has using 3. So the ISR must still save all registers from bank 0 on stack and also transfer parameters from register bank 3 to bank 0 and vice versa for the return value.

I don't know what an assembler page is. So I have no idea what you mean here.
Yes, English is not my home language, and I get the semantics wrong. Shall we say an assembler file? If you do inline assembler, your debugging is a pain, all code is shown in assembler. A separate file with only the RETI instruction prevents that.

Ah, I understand. This is a Keil restriction that other compilers do not have.

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