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.

camerart

Well-Known Member
Hi,
Im programming a PIC, and Vectors have cropped up, also I have ordered a VECTOR NETWORK ANALYSER for setting up antennas and filters.

What are VECTORS
Cheers, Camerart.
 
A vector is a combination of amplitude and direction (or angle or phase etc.)

e.g. 30 miles an hour is a speed or amplitude, but has no directional component.
30 mph north-west or 10m/sec at 77' are vectors.

Likewise voltage at a phase angle relative to another voltage or offset from zero.

You add vectors by trigonometry, starting each new one to be added at the end of the previous one.
(eg. one not on a single axis can be thought of as the hypotenuse of a triangle; working out the base & height gives the x & y offsets, for a 2D one.)
 
Back when was at college (long ago) Vectors were renamed Phasors (it was well before Startrek!).

Why have they 'cropped' up?.
Hi N,
I'm trying to both understand replies to my INTERRUPT programming questions, also in amateur radio a Vector network analyser can be used for setting up antennas and filter, and I've ordered an affordable NANO_VNA, so need to understand how that works.
C.
 
A vector is a combination of amplitude and direction (or angle or phase etc.)

e.g. 30 miles an hour is a speed or amplitude, but has no directional component.
30 mph north-west or 10m/sec at 77' are vectors.

Likewise voltage at a phase angle relative to another voltage or offset from zero.

You add vectors by trigonometry, starting each new one to be added at the end of the previous one.
(eg. one not on a single axis can be thought of as the hypotenuse of a triangle; working out the base & height gives the x & y offsets, for a 2D one.)
Hi R,
This looks like a comprehensive answer, and I'll need to think about it,
Thanks.
C.
 
An "interrupt vector" is just a pointer or link from a specific event to the program routine that handles the specific event.

A list of addresses in the program for each possible interrupt handler routine, with some types of CPUs.

If you are using a compiler of some sort, that probably fills the (hidden) table entries for you, when you supply the handler routine names in your program.
 
An "interrupt vector" is just a pointer or link from a specific event to the program routine that handles the specific event.

A list of addresses in the program for each possible interrupt handler routine, with some types of CPUs.

If you are using a compiler of some sort, that probably fills the (hidden) table entries for you, when you supply the handler routine names in your program.
Hi R,
A bit advanced for me, but in the case you mention, here are the PIC VECTORs.
C
 

Attachments

  • Vectors.gif
    Vectors.gif
    36.2 KB · Views: 141
VECTOR NETWORK ANALYSER
A VNA can resolve a complex impedance into its resistive and reactive components.

For example,
When we say "50 Ohms impedance" we are ideally wanting 50 Ohms pure resistance.

But if we have a circuit which has 40 Ohms of resistance and 30 Ohms of reactance (from a capacitor or inductor) connected in series, the combined resistance will be 50 Ohms.
It will also have a phase angle of 41 degrees, leading (capacitive) or lagging (inductive).

A VNA will tell you how much resistance and how much capacitance/inductance, and the impedance and its phase angle.

JimB
 
A VNA can resolve a complex impedance into its resistive and reactive components.

For example,
When we say "50 Ohms impedance" we are ideally wanting 50 Ohms pure resistance.

But if we have a circuit which has 40 Ohms of resistance and 30 Ohms of reactance (from a capacitor or inductor) connected in series, the combined resistance will be 50 Ohms.
It will also have a phase angle of 41 degrees, leading (capacitive) or lagging (inductive).

A VNA will tell you how much resistance and how much capacitance/inductance, and the impedance and its phase angle.

JimB
Hi J,
I'm first trying to understand Vectors, as a building block before the VNA arrives, then think about how they are used in a VNA, and PIC programming.
Thanks,
C.
 
Hi R,
A bit advanced for me, but in the case you mention, here are the PIC VECTORs.
C

Well that explains your confusion, you're looking at entirely different things - one reason perhaps that (mathematical) Vectors were renamed Phasors?. As far as the PIC goes, when you see 'Vector' substitute it with 'Address' instead - might make it clearer.

I did Vectors in maths at school for O Level, then a couple of years later at college we did them again, but called Phasors by that time.
 
Well that explains your confusion, you're looking at entirely different things - one reason perhaps that (mathematical) Vectors were renamed Phasors?. As far as the PIC goes, when you see 'Vector' substitute it with 'Address' instead - might make it clearer.

I did Vectors in maths at school for O Level, then a couple of years later at college we did them again, but called Phasors by that time.
Hi N,
So far I am in the naive stage, so haven't yet got confused, only bewildered.

I have a program called INKSCAPE that uses SVG (Scalable Vector Graphics) When a line is drawn, there are pull lines, so that the line can be made into a curve, if stretched, then the curve stretches.

I imagine that in the NANO_VNA the will be curves, that are changed by information coming in, from say the antenna.

As you say the PIC example is strange, that it would be better understood by using 'Address' instead of VECTOR., but why do they use VECTOR then?
Thanks,
C.
 
Hi N,
So far I am in the naive stage, so haven't yet got confused, only bewildered.

I have a program called INKSCAPE that uses SVG (Scalable Vector Graphics) When a line is drawn, there are pull lines, so that the line can be made into a curve, if stretched, then the curve stretches.

I imagine that in the NANO_VNA the will be curves, that are changed by information coming in, from say the antenna.

No, the vector is nothing to do with the curves, it's to do with the file format and how it actually draws the image. A normal bitmap is just a huge array of dots, you expand it and the dots get bigger, and the image gets blocky. Vector graphics are stored as a 'description' - so the vector is a direction and an amplitude (such as - draw a line at 45 degrees for 15cm) - this means you can expand the image as much as you like, as it simply redraws it at the new resolution.

Dictionary definition of this kind of Vector:

"a quantity having direction as well as magnitude, especially as determining the position of one point in space relative to another. "

As you say the PIC example is strange, that it would be better understood by using 'Address' instead of VECTOR., but why do they use VECTOR then?
Thanks,
C.

Interrupt vector, reset vector etc. has been used for decades in computers - no 'real' idea why - but it's often just a jump address, so the vector will provide the actual address of where it needs to go. I presume it comes from the aircraft use of vectoring?, where aircraft are vectored to a specific location - so it's an instruction to go somewhere.
 
I'm first trying to understand Vectors, as a building block before the VNA arrives, then think about how they are used in a VNA, and PIC programming.
Vector...

The same word, used in two completely different ways.
Do not try to equate the two, doing so leads to confusion and madness.
Consider the vector as a pointer. (Bad description but it is the best that I can do.

Vector as in VNA, is a close relation to the mathematical definition of a vector. ie something having magnitude and direction, or impedance and phase angle.

Vector as in PIC Interupts, is and address which points where to go (ie and address to jump to) when an interupt occurs.

JimB
 
Hi N and J,
It's becoming clearer :)
You've almost completly clarified the PIC use, apart from the choice. (Which is irrelevant) I'll think of it as ADDRESS instead.

VNA and Vector graphics. I'll keep thinking.

Thanks, C.
 
A vetctor in a processor is a hard coded goto, on power up the processor needs to 'know' what to do, or should I say where to go, so its programmed on power up reset to jump to a certain location, at that location is usually another jump or goto command which points to the very start of its program or operating system.
Interrupts are the same, only triggered by software ir pinchange, avr's have several vectors that they can jump to.
Vector as in vna is very different, and enough has already been saud about those.
 
A vetctor in a processor is a hard coded goto, on power up the processor needs to 'know' what to do, or should I say where to go, so its programmed on power up reset to jump to a certain location, at that location is usually another jump or goto command which points to the very start of its program or operating system.
Interrupts are the same, only triggered by software ir pinchange, avr's have several vectors that they can jump to.
Vector as in vna is very different, and enough has already been saud about those.
Hi Dr P,
Ok, thanks.

As mentioned the processor VECTOR is misnamed, as it's not much to do with the real use of VECTORS.
C.
 
Oy, this conversation makes my head hurt just thinking about the confusion.
 
There are three dictionary definitions for vectors, the one relating to aircraft I mentioned early seems to apply quite well.
Hi N,
I've just heard that they are gong to useVectors from a monkey to treat Covid 19, I think they save the word for when they don't know what to call something:confused:
C.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top