[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] newbie interrupts question

From: Eric Smith
Subject: [avr-gcc-list] newbie interrupts question
Date: Sun, 7 May 2006 22:41:39 -0500


I have a working program running on an ATmega8 that I wrote with avr-gcc.  It does some ADC data acqusition with environmental sensors.

Now I'd like to improve the timing in this code by using the RTC timer with inerrupts.  I read an example of how to set up the interrupt vectors at the beginning of memory using assembly - each vector has a relative jump to the appropriate routine.

My question is this:  how do I set up this interrupt vector table using C?  Or, if I have to mix assembly with C to do it, that's fine -- but can you tell me (show me) explicitely how to do it?

I have to be able to set up the interrupt vectors such that when my timer reaches zero, and the interrupt is generated, the appropriate routine is called.  Also, I'm assuming that if I enable interrupts I'll need vectors for all available interrupts even if I'm only going to use one, is that right?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]