need help for Interrupt subrutine in AVR

Status
Not open for further replies.

piyush manavar

Member level 4
Joined
Jul 23, 2009
Messages
78
Helped
10
Reputation
20
Reaction score
8
Trophy points
1,288
Location
india
Activity points
1,827
Hi
I am developing a program for velocity measurement of object.
In this program i need to use timer interrupt.
But i don't know how to use timer interrupt in c language.
In assembly i can do this job very well but in c language how to interface interrupt and how ini. timer for 500us(8 MHz X-tal) and how the program can jump on specific location and come back after ISR. To do this which header file i have to include in AVRstudio.


If i want to write a program for specific location what i will have to write instead of org 0f45 (in assembly) in c language



Thanks
 

exact synthax depend from compiler you are using.

read documentation from your compiler or examples supplied.


an example from google :

**broken link removed**
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…