CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

switch structure

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
brano



Joined: 17 Jun 2005
Posts: 2

View user's profile Send private message

switch structure
PostPosted: Fri Jun 17, 2005 2:41 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Jun 17, 2005 2:50 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jun 18, 2005 7:08 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group