Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Help with using interrupts and ATtiny13.

2005-08-04 by Jim Wagner

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.&nbsp;
> 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.&nbsp;
> Specifically, I
> want to use 8-bit timer that it comes equipped
> with.&nbsp; 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).&nbsp; I also am having trouble understanding how
> to respond to a
> timer overflow interrupt.&nbsp; 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
> 
> 
> 
>   &nbsp;Visit your group "AVR-Chat" on the web.&nbsp;
>   &nbsp;To unsubscribe from this group, send an email
> to:&nbsp;AVR-Chat-unsubscribe@yahoogroups.com&nbsp;
>   &nbsp;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
---------------------------------------------------------------

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.