PIC16F84A external hardware interrupt example with CCS C

PIC16F84A External hardware interrupt example

The microcontroller PIC16F84A has a unique external interrupt at RB0 pin (hardware interrupt). When an interrupt occurred, the microcontroller immediately executes the code attached with the interrupt, after finishing the interrupt code the microcontroller returns to the main code.
This topic shows how to use PIC16F84A microcontroller external hardware interrupt. CCS C compiler is used in this example.
PIC16F84A external interrupt example circuit:
PIC16F84A external hardware interrupt example circuit
In the circuit schematic above we have just a button and an LED , the button is connected to the external interrupt RB0/INT pin and the LED is connected to RA0 pin. When the button is pressed, an interrupt will occur and the LED will toggle its state (ON or OFF).
PIC16F84A external interrupt example CCS C code:

PIC16F84A external interrupt example video:
The following video has some details about the circuit and the CCS C code.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.