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 interrupts

Leave a Comment

*
= 5 + 0

Read previous post:
Projects on Speed Checker To Detect Rash Driving On Highways

While driving on highways, drivers should not exceed the maximum speed limit permitted for their vehicle. However, accidents keep on...

Close
Scroll to top