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 CCS Technical Support

interrupt problem please....

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







interrupt problem please....
PostPosted: Mon Sep 29, 2008 9:05 am     Reply with quote

I have problem executing this interrupt for a week:

The PIC is starting MAIN function and then after a few seconds he goes and execute the interrupt while the interrupt pin is low !

Every time again. He starts MAIN, few seconds, and jump to interrupt!
I can't understand what it is. No hardware problem.
If I push the button of the interrupt-he goes and execute him just fine.
But why does he jump to interrupt alone ??
Code:
#include <16F690.h>
#fuses HS,NOWDT,NOPROTECT,put
#use delay(clock=8000000)
#include <stdlib.h>

#int_ext
void int_ext_isr()
{
output_low(pin_b6);
output_high(PIN_C2);//go straight
output_low(PIN_C3);
output_high(PIN_C5);
output_low(PIN_C4);
delay_ms(3000);
}


void main() {

enable_interrupts(global);
enable_interrupts(INT_EXT);
ext_int_edge( L_TO_H );

while(1)
{
 output_high(pin_b6);
}

}
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