View previous topic :: View next topic |
Author |
Message |
sraiderk
Joined: 09 Feb 2005 Posts: 48
|
#device *=16 |
Posted: Tue May 31, 2005 5:48 am |
|
|
My code contains 3 timer interrupts routine and #int_TBE ,#int_RDA routines(total 5) . It is very interesting to me that if I use the #device *=16 statement then someting is going wrong in my software . But, I ignore the this line . Result is perfect. I made this operation three times, I always saw the same result. Especially, problem occurs timer0_int that is not calling. I used the 16f877 and CCS C 3.221. |
|
|
yerpa
Joined: 19 Feb 2004 Posts: 58 Location: Wisconsin
|
|
Posted: Tue May 31, 2005 11:38 am |
|
|
Your code will run more slowly when you use the #device *=16 directive because then the compiler has to do double-precision math for pointers instead of single precision. Maybe the extra execution time is messing up your program? |
|
|
valemike Guest
|
Re: #device *=16 |
Posted: Tue May 31, 2005 12:10 pm |
|
|
sraiderk wrote: | My code contains 3 timer interrupts routine and #int_TBE ,#int_RDA routines(total 5) . It is very interesting to me that if I use the #device *=16 statement then someting is going wrong in my software . But, I ignore the this line . Result is perfect. I made this operation three times, I always saw the same result. Especially, problem occurs timer0_int that is not calling. I used the 16f877 and CCS C 3.221. |
On the 16XXX devices, you definitely need the #device *=16 statement when your program grows. w/o it, jumps and braches will get wacky, just like you're noticing. |
|
|
|