We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello! I have a problem and I don't know how I can resolve it. I have a starter kit and all the code is in the micro (XC167CI) and I have connected my PC to the starter kit. I want to set and reset an input pin when I push a key of my keyboard PC to simulate a fast interruption. I have tried it:
printf(menu); select=input(); switch (select) { case '1': P2_P8=1; break; case '2': P2_P8=0; break; case '3': break;
define button "ppoAvisoAI", "PORT2 |=0x0100" define button "finAvisoAI", "PORT2 &=0xFEFF"
I want to set and reset an input pin when I push a key of my keyboard PC to simulate a fast interruption. The micro generally cannot actually set or reset its own input pins. For that, you would have to electrically connect one of its output pins back to that input pin, and flip the output to control the input. But if all you want is to simulate interrupts, it should be possible to directly set the relevant interrupt flag bit instead.