Solarwind, Your code is incomplete. You need to enable porta on change interrupt, global interrupt, disable analog, comparator. Using ccs compiler void main() { setup_adc_ports(NO_ANALOGS|VSS_VDD); setup_adc(ADC_OFF); setup_spi(SPI_SS_DISABLED); setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); setup_timer_1(T1_DISABLED); setup_timer_2(T2_DISABLED,0,1); setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard enable_interrupts(INT_RA); enable_interrupts(GLOBAL); while(true) { SLEEP(); } } #int_RA // porta change interrupt will jump here void RA_isr(void) { // // put your code here to turn on off and after 10 seconds go to sleep. } -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of solarwind Sent: Saturday, December 06, 2008 3:10 PM To: Microcontroller discussion list - Public. Subject: [PIC] Interrupt on Change Pin So I tried to get this to work. I have a PICKIT 2 with a LPC demo board. It's a PIC 16F690 with LEDs on PORT C and a push button switch on PORT A. Here's my code: http://pastebin.com/f5e47b284 I'm trying to turn the LEDs on or off every time I press the switch. How do I do this? -- ..::[ solarwind ]::.. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist