PIC16F84A PORTB interrupt on change (IOC) example with CCS C

PIC16F84A PORTB Interrupt on change

This topic shows how to use PIC16F84A microcontroller PORTB change interrupt, this interrupt occurs when an input port changes its state. The pins responsible for this interrupt are RB4, RB5, RB6 and RB7. The compiler used in this example is CCS PIC C.

PIC16F84A PORTB interrupt on change (IOC) example circuit:
Example circuit schematic is shown below.
PIC16F84A PORTB interrupt on change circuit
As shown in the circuit schematic above there is an LED and 4 push buttons. The interrupt will occur when at least one push button is pressed or depressed. When the interrupt occurs the LED toggles its state. The video below describes the circuit and the code.

PIC16F84A PORTB interrupt on change (IOC) example CCS C code:
The C code below was tested with CCS C compiler version 5.051.

PIC16F84A PORTB interrupt on change (IOC) example video:
The video below shows Proteus simulation of the example.


Discover more from Simple Circuit

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

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

Scroll to Top