Yes. You definitely need to make RB0/INT0 an input first.
Any time you make a pin an input, then you'll want to hold that pin at logic 1 or 0 through a pull-up or pull-down resistor or some "constant" external logic.
With the hardware PWM output pin connected to the RB0/INT0 input, you could possibly get by without the pull-up or pull-down, but it's cheap insurance that could save you a lot of head-scratching down the road.
A floating input will return random logic values when read, which will cause major problems. Especially with the pin configured as an interrupt source triggered by logic transitions.
If there's any chance that the external pin or device providing the interrupt logic input could be disconnected or go to a high-impedance state, then the pull-up or pull-down resistor is essential.
I always use one. If the interrupt logic is configured to trigger on a high-to-low transition, then I use a pull-up, and let the external signal provide the low-going trigger pulse. If it's setup for low-to-high transitions, then I use a pull-down resistor.
Bookmarks