View previous topic :: View next topic |
Author |
Message |
sorasit46
Joined: 07 May 2007 Posts: 69
|
... Programmer ! help me too |
Posted: Wed Mar 18, 2009 6:08 am |
|
|
You tell
Quote: | If you feel that you must put a delay inside an isr, and you don't
want to see that warning message, then tell the compiler to create
a 2nd instance of the delay library by adding a 2nd #use delay()
statement as shown in bold below. That way, the isr and the
code in main() (and beyond) will each have their own separate
delay routines.
|
I do that.But not work.Are you have another way ?
I must put many delay inside isr and alot of function that calling from inside the isr and outside .Now I have 14 warning.All warning are "warning 216 .. interrupts disable during call to prevent re-entrancy :[...]". When I cancel isr.All warning are gone.I am not sure this warning effect to destroy my ADC port too.[subject - Can open ADC port full time ? ]
Regards
Last edited by sorasit46 on Wed Mar 18, 2009 6:26 pm; edited 1 time in total |
|
![](templates/subSilver/images/spacer.gif) |
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Wed Mar 18, 2009 9:15 am |
|
|
If you have lots of function and delays in the ISR then you are almost certainly not using ISRs correctly. Use ISRs for time critical functions and, if necessary, set flags that the mainline code can use to determine what action needs to e performed in the main code loop.
On the VERY rare occasion you needs delays in an ISR (I can't think of any other than chip select I/O interfacing which requires a series of one or more NOPs) then use a timer dedicated to the ISR. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Mar 18, 2009 11:15 am |
|
|
And don't post to me by name. I don't work for CCS. |
|
![](templates/subSilver/images/spacer.gif) |
sorasit46
Joined: 07 May 2007 Posts: 69
|
|
Posted: Wed Mar 18, 2009 6:31 pm |
|
|
PCM programmer wrote: | And don't post to me by name. I don't work for CCS. |
Ohh! so sorry.
I post your name. Because you used to solve re-entrancy problem.However thank you for your knowledge and kindness.
Regards |
|
![](templates/subSilver/images/spacer.gif) |
|