Using Interrupts Vectors

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

I need to put RETIs, RJMPs and the like into the interrupt vector spaces. I'm new to Studio 5. Where are they located in the included files, or how do I define .ORG and make my own?

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

For assembler or c?

In c, this is all handled for you.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

Thanks, Jim.

C. Since I'm using 8 bits I prefer an RJMP to Reset (Main) instead of spurious interrupts. But if the (GCC puts RETI into all)? then I'll accept that.

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

There is a "catchall" interrupt that does this for you. You need to review the avr-libc manual for the details. Its there. What does "8 bits" have to do with it?

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

Thanks, Jim I'll look up the manual. In 8 bit you can do RETI at a vector location, but for 16 bits, if you do that a nop must be placed in between RETIs. RJMP works in 8 bit, but JUMP is 16 bit.

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

This thread seems to be a cross post of this:

https://www.avrfreaks.net/index.p...

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

! interrupt.h. io8x.h

Thank you again

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

Off-Earth wrote:
Thanks, Jim I'll look up the manual. In 8 bit you can do RETI at a vector location, but for 16 bits, if you do that a nop must be placed in between RETIs. RJMP works in 8 bit, but JUMP is 16 bit.
Actually, all instructions are at least 16 bits.
JUMP is 32 bits.

Iluvatar is the better part of Valar.