Hi, Kevin - Doing what you ask involves two separate things: (1) Initializing the timer's registers and various interrupt enables to generate the interrupt event. (2) An interrupt service routine (ISR) that includes a jump instruction (called a "vector") at the appropriate location for the int you need to handle. The interrupt vector locations are listed in a table in the data sheet. How you put the jump in depends on whether you are using assembly language or C. For this, you ought to be able to get a pretty good idea of what is happening using the Studio simultor, recognizing that it is, at best, full of lots of "holes". Best wishes, Jim On Wed, 03 Aug 2005 23:11:54 -0000 "klassasin" <klassasin@bresnan.net> wrote: > I recently obtained a STK500 and two ATtiny13V's. > I've done basic I/O > with them already, but I want to try something a little > more advanced. > I've been researching interrupts, yet I fail to find any > particularly > large amount of information on ATtiny13 interrupts. > Specifically, I > want to use 8-bit timer that it comes equipped > with. I've looked > through it's datasheet, yet the section on interrupts is > confusing me. > I am unable to understand how to initialize interrupts > (or the > timer). I also am having trouble understanding how > to respond to a > timer overflow interrupt. Simply put, I need to > initialize the timer > interrupt so I can do a certain action every time it > overflows. > Can anybody please help me with sample code to utilize > timer > interrupts on tiny13's or with a site that could help me > with them? > > Thanks for any help, > > Kevin > > > > > > > > > > > > > SPONSORED LINKS > > > > > Atmel avr > > > Microcontrollers > > > Intel microprocessors > > > > > Pic microcontrollers > > > 8085 microprocessor > > > > > > > > > > > > > > YAHOO! GROUPS LINKS > > > > Visit your group "AVR-Chat" on the web. > To unsubscribe from this group, send an email > to: AVR-Chat-unsubscribe@yahoogroups.com > Your use of Yahoo! Groups is subject to the > Yahoo! Terms of Service. > > > > > > > > > > > > > --------------------------------------------------------------- The Think Different Store http://www.thinkdifferentstore.com/ For All Your Mac Gear ---------------------------------------------------------------
Message
Re: [AVR-Chat] Help with using interrupts and ATtiny13.
2005-08-04 by Jim Wagner
Attachments
- No local attachments were found for this message.