Interrupt of PIC 16F877A Features of the external interrupt that we will use. The interrupt is triggered by an input on RB0, either ( depending on how we set it up ) as the signal goes from 0 to 1, called the rising edge, or as the signal goes from 1 to 0, called the falling edge. This sets the interrupt flag, and if the interrupt is enabled ( and we are not already in an interrupt ) the microcontroller goes to the interrupt subroutine. The use of the RB0/Int to manage interrupt externally generated requires the setting of a couple of registers of the picmicro: INTCON and OPTION_REG It should be clear that the use of RB0/Int function of a picmicro requires the setting of the: GIE (7): set to 1 to enable global interrupts INTE (4): set to 1 to enable interrupts on pin RB0 PEIE (6): to disable other periferal interrupts and the set of the INTEDG bit(6) of the OPTION_REG register simply to select the...
This blog is dedicated for Internet Of Things, Embedded Projects and Tutorials. ARM, AVR, PIC, 8051, Arduino, ESP8266, ESP32, Raspberry PI Projects and Tutorials are discussed here.