Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What are Vectors

Status
Not open for further replies.
vectors have magnitude and direction.

In Interrupt Vector has both magnitude and direction.

Magnitude - priority
Direction - Where to go.

An array is typically called a vector too.
 
Hi I,
From here to there with force, is that better?
C
No!! Doesn't have to be force.... Vector drawing is just lines.... even curved lines... Vector is from point a to point b with length and angular direction, and some times via's...

That why an interrupt on a micro is a vector... Point a to point b ( b is where the routine is )..

Some here are confused with scalar vectors, which contains scale...
 
No!! Doesn't have to be force.... Vector drawing is just lines.... even curved lines... Vector is from point a to point b with length and angular direction, and some times via's...

That why an interrupt on a micro is a vector... Point a to point b ( b is where the routine is )..

Some here are confused with scalar vectors, which contains scale...
Hi I,
I hope 'G' has got rid of his headache! Mine is going as I find out the answer to my initial question.

Now I see why a micro has a Vector.

As for the confused, this is a confusing subject, but it does kind of make sense as it unfolds.
Thanks, C.
 
Last edited:
Just think of a vector in a micro as a "pointer" to a fixed address. That is, an interrupt will always trigger to a fixed address to start the interrupt code. These are usually hardwired in the micro.
For example, look at the memory map of the micro. In an example, the 16F887 datasheet, Section 2, "Memory Organization", it shows the "Interrupt Vector" to be at address 0004H. Whenever an interrupt is triggered, the PIC will jump to that address, which usually contains a "jump" instruction to your written interrupt code.
The "Reset Vector" is at 0000H, which is the power on/reset starting address, which also (usually) contains a Jump instruction to the beginning of the code.
Other micros may have several "vectors" depending on functions or other hardware features
 
Just think of a vector in a micro as a "pointer" to a fixed address. That is, an interrupt will always trigger to a fixed address to start the interrupt code. These are usually hardwired in the micro.
For example, look at the memory map of the micro. In an example, the 16F887 datasheet, Section 2, "Memory Organization", it shows the "Interrupt Vector" to be at address 0004H. Whenever an interrupt is triggered, the PIC will jump to that address, which usually contains a "jump" instruction to your written interrupt code.
The "Reset Vector" is at 0000H, which is the power on/reset starting address, which also (usually) contains a Jump instruction to the beginning of the code.
Other micros may have several "vectors" depending on functions or other hardware features
Hi S,
See #7,
Thanks.
C
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top