No, you do not have to toggle the output, but you wanted some pulse and only using |= sets the pin high, that's it - and it will stay high. Keep in mind that toggling a pin always doubles the time period, means toggling a pin at a period of 1s gives you one pulse every 2s. The pragma interrupt function will be called when the interrupt fires, so yes, without enabling the interrupt this function will not be called. And a low power mode is not required if you do not care about saving energy.
↧