ISR overwriting

Hi! I am using an ATmega168 with both INTs 0 and 1 enabled. I know that ISR vectors' length are only two words and I'm afraid my ISRs are larger, so INT0 may overwrite INT1 ISR. I was wondering if I am getting in trouble because of that or the compiler redirects automatically the ISR to another memory zone with more space.

Thanks in advance!

I know that ISR vectors' length are only two words and I'm afraid my ISRs are larger, so INT0 may overwrite INT1 ISR.

The vector contains pointers to functions. All pointers are 2 bytes. Yours can't possibly be larger.

I was wondering if I am getting in trouble because of that

No. You have a problem on line 34. At least, that's what my crystal ball says. But, I got it on sale at K-mart, so it might be off +/-42 bazillion.

fyllolo:
Hi! I am using an ATmega168 with both INTs 0 and 1 enabled. I know that ISR vectors’ length are only two words and I’m afraid my ISRs are larger, so INT0 may overwrite INT1 ISR. I was wondering if I am getting in trouble because of that or the compiler redirects automatically the ISR to another memory zone with more space.

How can you possibly expect a useful reply when you have not posted your code?

…R

Robin2: How can you possibly expect a useful reply when you have not posted your code?

...R

That is easy :grin: He succeeded in that one :grin:

My code does function correctly, I just wanted to know how the compiler works as far as ISRs are concerned in case I need to get use of it next time.

I just wanted to know how the compiler works as far as ISRs are concerned in case I need to get use of it next time.

It creates a function (which must be of return type “void” and cannot accept parameters)), and puts a pointer to the function in the interrupt vector.
What were you expecting?

The clue is in the word "vector"...

fyllolo: My code does function correctly, I just wanted to know how the compiler works as far as ISRs are concerned in case I need to get use of it next time.

As you are not prepared to post your code the only thing I can suggest is that you study the Atmel datasheet which will tell you everything there is to know.

...R