That's the problem.I’m using X1 board with 16F877A and pulsing RB0 with a wire lead.
If you are using a wire to +5V, there's nothing to pull it back down.
The pin will hold a charge, and will slowly drain off, allowing it to re-trigger after a few seconds.
If you add a pull-down resistor it should work better.
Or, you can turn on PORTB pull-ups (OPTION_REG.7 = 0), make PORTB.4 LOW so you can use SW1 pushbutton.
Changing to OPTION_REG.6 = 0 will make it trigger on the falling edge (button press) instead of the rising edge (button release).
Bookmarks