Pic16f84 Interruption Vector

atferrari

Joined Jan 6, 2004
4,764
Originally posted by Iodem_Asakura@Aug 1 2005, 06:25 AM
Someone knows where is the Interruption Vector of the PIC16F84 for the Timer Interruption?
[post=9367]Quoted post[/post]​
All interrupts have the same vector address: H'0004'
 

atferrari

Joined Jan 6, 2004
4,764
Hola Iodem,

Go to Microchip site and look for manuals. They are quite easy to get.

Once you are used to them it's easy to look for what you need for any PIC.

A good idea is to read the family manual so any variation is much easier to understand.

Good luck!

Agustín Tomás
 

atferrari

Joined Jan 6, 2004
4,764
Hi Ioden,

Better you download the manual from the Microchip's site (PDF format) and then you can read it. Later you can come to any forum for more specific questions.

Buena suerte.
 

Thread Starter

Iodem_Asakura

Joined Sep 14, 2004
140
That is why i'm asking because i was reading the datasheet (i haven't read it complete yet) and where i supossed they tell me how to do it (in a section where they explain how the use of the Timer), i hadn't found how to start the Timer.

I don't want you to think i'm not studying, i am. But i have really short time these days, and need it quick that is why i'm looking for your help for such a simple question.

Notice that my question is very very specific: What is the bit used to run and stop the timer? In the next days i will check it if i got some time, but i'll appreciate your help.
 

atferrari

Joined Jan 6, 2004
4,764
Originally posted by Iodem_Asakura@Aug 8 2005, 09:26 PM
I don't want you to think i'm not studying, i am. But i have really short time these days, and need it quick that is why i'm looking for your help for such a simple question.
[post=9540]Quoted post[/post]​
OK, don't worry. I am not assuming what you are actually doing.

Timer0, in fact is always running and being an 8-bits counter, will overflow every time it reaches 255.

Being writable, this "ever increasing" beahvior allows to start counting from any value other than zero, that is you can write a certain value different from zero for Timer0 to increase from there until overflowing.

You have two possibilities: pulses from an internal or external clock.

Regarding all that, you may:

a - Decide what clock source is good for you from the two possible options.

b - If the prescaler (divider) will be in between clock and Timer0 and what will be the divider used.

c - If the overflow is of any use. You could then take advantage of the generated inetrrupt, if properly enabled. The most common use for everyone.

As you can see there is not a bit to start or stop Timer0, but, basically, an interrupt that every XX msec will tell you "an overflow has occurred".

(In my case I use this for a 5 msec interrupt to update several counters in charge of the on/off times of 8 different LEDs).

Does this help you for a start? Please let me know.
 

pebe

Joined Oct 11, 2004
626
Originally posted by atferrari@Aug 9 2005, 08:56 PM
.....Timer0, in fact is always running and being an 8-bits counter, will overflow every time it reaches 255.....

...As you can see there is not a bit to start or stop Timer0, but, basically, an interrupt that every XX msec will tell you "an overflow has occurred"....
[post=9559]Quoted post[/post]​
I'm not familiar with PIC chips, other than their early ones which had no interrupts.

But are you saying that if a timer overflow occurs then the program is not notified until XX msec later?
 

atferrari

Joined Jan 6, 2004
4,764
Hola Pebe,

Yes, I explained it poorly and hope I did not confuse him.

Interrupt will be served, if enabled, as soon as it occurs.

It's up to you how long it will take between two consecutive interrupts, that is, you decide how many (XX) msec it will take.

Yes, the explanation was not correct.

Thanks for drawing my attention.
 

Thread Starter

Iodem_Asakura

Joined Sep 14, 2004
140
The problem was that i didn't see any data about how to start and stop the timer. I thought it was running all the time, but it seems weird (at least for me), 'cause other pic's and microcontrollers i have seen have a register with a bit to start and stop it, so i wanted to confirm what i thought.

That is what i told you is a specific question. I didn't intend you to explain so much, i know sometimes is a little bothering. But know that you have done it, maybe it's good for other readers.

Thanks for your help, i think now i'm complete to begin my project.
 
Top