Hello! I have configured PORT 2 to have eight fast interruptions. In Keil I can simulate them because I have created different buttons to simulate fast interruptions
define button "ppoAvisoAI", "PORT2 |=0x0100" define button "finAvisoAI", "PORT2 &=0xFEFF"
while (1) { printf(menu); select=input(); switch (select) { case '1': P2_P8=1; break; case '2': P2_P8=0; break; case '3': break; } }
What you are doing I don't know. If you are going to capture on a pin then it needs to be an input since it is assumed you are on the receiving end of the signal. But if you are felling lucky then you can set the data direction register so the port pin is an output. Then you should get the interrupt when you write to the output latch. Read the XC167CI user's manual under parallel ports to see the diagram for a port configuration. You do know that you should not have more than one output driving (push-pull) on the same pin? You run the risk of serious damage to your system.