External interrupt For CSS Compiler




 

#include <16F877.h> 
#device adc=8
#fuses XT,NOWDT,NOPROTECT,NOLVP    
#use delay(clock=4000000)        

#INT_EXT                                                                 
void EXT_ISR(void){                 
    output_toggle(PIN_B7);        
    delay_us(300);
 }

void Init_MCU(void){
    enable_interrupts(GLOBAL);    
    enable_interrupts(INT_EXT);   
    ext_int_edge(H_TO_L);         
    set_tris_B(0x01);
    output_low(pin_B7);
}

void main(){
    Init_MCU();                   
    while (TRUE) {
        output_toggle(PIN_B6);     
        delay_ms(1000);                     
    }
}

 




Current Project / Post can also be found using:

  • ccs code for interrupt
  • css external interrupt example
  • external iinterrupt n 12f675 ssoource code
  • External Interrupt ccs pic c

Leave a Comment

*
= 4 + 7

Read previous post:
Imagination lets MIPS take academic plunge

Imagination Technologies’ decision to reveal the inner-most secrets of the MIPS microprocessor architecture to academics could dramatically improve the teaching...

Close
Scroll to top