Tom The only bit that has anything to do with interrupts in the SREG is Bit7:GlobalInterruptEnable. Are you doing all that to try to set and clear Bit7? It would seem like it OUGHT to execute an ISR. Do you have the corresponding bits set in the timer? For a Mega16, its the TIMSK (Timer Mask Register) and, after the timer event happens, a bit is set in the TIFR (Timer Interrupt Flag Register). This latter bit will be cleared when the ISR executes. Jim On Fri, 05 Jan 2007 19:17:14 -0600 Thomas Keller <tjkeller1@alltel.net> wrote: > John. > > I didn't use an sei instruction,no. I set the > appropriate bit in a > register, read in the current SREG vale, or'ed it > together,t hen used an > out instruction to store the result in the SREG. While > unconventional, > it SHOULD have the same net result. > > John Samperi wrote: > > > > At 07:32 AM 6/01/2007, you wrote: > > >I cannot get the timer interrupt to work. > > > > You have NOT enabled the general interrupts as far as I > can > > see with a SEI instruction. This sets the general > interrupt > > bit. You will also need to set to the timer interrupt, > don't have > > time right now to go through your code :( > > > --------------------------------------------------------------- The Think Different Store http://www.thinkdifferentstore.com/ For All Your Mac Gear ---------------------------------------------------------------
Message
Re: [AVR-Chat] *yikes*
2007-01-06 by Jim Wagner
Attachments
- No local attachments were found for this message.