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

external interrupt at pic16f18176

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



Joined: 05 Jan 2014
Posts: 17

View user's profile Send private message Send e-mail

external interrupt at pic16f18176
PostPosted: Tue Jun 17, 2025 2:34 am     Reply with quote

Hi everybody , I need external interrupt on PIN_A3 at "pc16f18176", does any know how to set, I tried as below at main() but does not work


#INT_EXT
void IR_INT(void) {
UPD6121_InterruptService();

}



enable_interrupts( INT_RA3_H2L );
enable_interrupts(INT_TIMER0);
enable_interrupts(GLOBAL);
Ttelmah



Joined: 11 Mar 2010
Posts: 19859

View user's profile Send private message

PostPosted: Tue Jun 17, 2025 3:45 am     Reply with quote

Very simple reason. Wrong interrupt.....

INT_EXT, handles the EXT interrupt pin.

The interrupt on change for port A, is INT_RA

Also beware that you have to clear the latch for the change interrupt for the
pin you are using (clear_interrupt), in the handler.
There is a single interrupt (which the compiler handles for you), and then
separate latches for each pin.
sezgin ozan



Joined: 05 Jan 2014
Posts: 17

View user's profile Send private message Send e-mail

PostPosted: Tue Jun 17, 2025 4:49 am     Reply with quote

Thank you Ttelmah, I will fix it.
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