Hello
I am using PCM compilator and 16f688 chip for the first time. I have debugged code in 18f1320 chip with PCH compiler. Now the code in 16f688
chip works susspicioussly. The Compiler gives me the two warnings which I ignore them.:
Interrupts dissabled during the function to prevent rentrancy:delayus()
..
I use delay procedure and my private procedure my_private_adc() inside the timer0 interrupt handler. I use rda interrupt handler too.
In timer0 int. handler is switch structure combined with if inside, but some case does not occur when it have to. It is the main problem. Is the state in the case(state) corrupted by something or the compiler translates switch structure bad?
The next problem is that I use 8MHz internal OSC but does not do the sleep before the adc converting as microchip warns. It was not problem
at 18f1320.
Thanks Brano
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Fri Jun 17, 2005 2:50 pm
Quote:
Interrupts disabled during the function to prevent rentrancy:delayus()
The following article in the CCS FAQ explains how to create two instances
of the CCS library code for the delay functions by adding a 2nd #use
delay statment. If you do this, it will stop that warning message.
http://www.ccsinfo.com/faq/?50
brano
Joined: 17 Jun 2005 Posts: 2
Posted: Sat Jun 18, 2005 7:08 am
Hello
It is probably recursion problem with using delay library procedure inside
the interrupt handler. But I think that my private function called inside the interrupt handler does not call itself outside of int. handler.
Next, I think that I did not define the structure state as volatile.
Thanks Banic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum