Programmable boolean logic can be implemented transparently to your own application as a virtual circuit using the change on PORTB interrupt. This tutorial demonstrates the use of this interrupt to implement a 4 input boolean expression inputs on PORTB<4..7> and output on PORTB<0>. The output is compared with the equivalent logic circuit.
| Filename | Version | Description |
| tut10.pjt | 1.0 | Project |
| tut10.asm | 1.0 | Assembler code |
| tut10.hex | 1.0 | Precompiled HEX |
| tut10.lst | 1.0 | Precompiled LST |
| tut10.vbb | 1.0 | Virtual Breadboard simulation |
Open tut10.vbb and press RUN. Change the DIP settings until the logic shown by the equivalent circuit is true. The PIC output should equal the equivalent circuit expression. Note there is a slight delay between the equivalent circuit and the PIC, this is true of using the microcontroller to implement logic as it will not be as fast as pure logic.
|
TRISB/PORTB | |
|
Change on PortB interrupt |