diff --git a/Geigerzaehler/main.c b/Geigerzaehler/main.c index 9ed238a..a27ad14 100644 --- a/Geigerzaehler/main.c +++ b/Geigerzaehler/main.c @@ -61,11 +61,11 @@ int main() PORTB |= (boost_highVoltage_nextTick << PORTB5); // Onboard-Led - sei(); // Activate global interrupts (after checks) [when an interrupt was fired, it will now be executed] - // Endless loop while (1) { + cli(); // Deactivate global interrupts (before checks) + /* * HighVoltage boosting */ @@ -123,6 +123,8 @@ int main() if(signalOutput_led_nextTick == 0) signalOutput_led_nextTick++; // If its 0, it stops, we dont want that } } + + sei(); // Activate global interrupts (after checks) [when an interrupt was fired, it will now be executed] } }