ATtiny interrupt response time

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

While calculating the response time of an interrupt handler, I came across the following text in the datasheet of the ATtiny2313:

Quote:
The interrupt execution response for all the enabled AVR interrupts is four clock cycles minimum. After four clock cycles the program vector address for the actual interrupt handling routine is executed. During this four clock cycle period, the Program Counter is pushed onto the Stack. The vector is normally a jump to the interrupt routine, and this jump takes three clock cycles.

Normally, an RJMP on the ATtiny2313 only takes 2 cycles. So, is there something special about the initial jump, or is this an error in the datasheet? The same text is in the datasheets of the tiny13, tiny24 and tiny25, but the datasheets of the tiny12 and tiny26 specify 2 cycles.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The interrupt vector can contain any arbitary piece of code you could want to give it. RJMP just happens to be the most common op-code for most applications. I would earnestly expect that the RJMP instruction timing wouldn't be any slower when executed from the interrupt vectors than it would be if executed anywhere else...

My bet is that these datasheet sections were copied from another AVR's datasheet. One whose program memory is larger than 8 kB, so the full JMP instruction is assumed. JMP takes longer than RJMP.