View previous topic :: View next topic |
Author |
Message |
picstudent
Joined: 16 Jun 2004 Posts: 5
|
Interupt functions #include! |
Posted: Wed Jan 05, 2005 6:05 am |
|
|
Hai
I tried to include my interrrupt function as a seperate file and used # include before main(). Not working.I am using CCS from MPLAB with plug in. Any idea?
Picstudent |
|
|
Guest
|
|
Posted: Wed Jan 05, 2005 12:18 pm |
|
|
Please let us look at your code and tell us more specifically what is not working.
Happy New Year!
Nick |
|
|
jds-pic
Joined: 17 Sep 2003 Posts: 205
|
|
|
picstudent
Joined: 16 Jun 2004 Posts: 5
|
|
Posted: Wed Jan 05, 2005 10:01 pm |
|
|
Hai
I have timer0 interrupt function written just above the main () function.
like
#int_timer0
inter()
{
............
}
main()
{
........
}
It is working alright. Simulation and target is also Ok.
but Now I have written that timer0 interrupt function in a seperate file
called interupt.c and included
like
#include <interupt.c>
main()
{
.....
}
Now no error during compilation,But on simulation interupt is not reaching that c file
Breakepoints cannot be fixed there on that interupt file also.
hope I am clear now
Picstudent |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Thu Jan 06, 2005 11:52 am |
|
|
Hi Picstudent,
When I was doing what you have described, my project would not compile. So, to avoid this problem, I would put your ISR (both declaration and code) into an <interrupt.h> file.
Also, take a look at this discussion:
http://www.ccsinfo.com/forum/viewtopic.php?t=21424
Good luck,
Nick[/code] |
|
|
|