„Geigerzaehler/main.c“ ändern

Correcting EICRA for both interrupts
master
John D 6 years ago
parent 34e1fe2d6b
commit f951c39bbe

@ -50,10 +50,10 @@ int main()
// Interrupts // Interrupts
// for INT0 Pin-D2 - Counter-click // for INT0 Pin-D2 - Counter-click
EICRA |= (0 << ISC01)|(1 << ISC01); // On rising edge [Code: 01] EICRA |= (1 << ISC01)|(1 << ISC00); // On rising edge [Code: 01]
EIMSK |= (1 << INT0); // Activate Interrupt INT0 EIMSK |= (1 << INT0); // Activate Interrupt INT0
// for INT1 Pin-D3 - High-voltage check // for INT1 Pin-D3 - High-voltage check
EICRA |= (1 << ISC10)|(1 << ISC11); // On any edge [Code: 11] EICRA |= (1 << ISC10); // On any edge [Code: 11]
EIMSK |= (1 <<INT1); // Activate Interrupt INT1 EIMSK |= (1 <<INT1); // Activate Interrupt INT1
// Init timer1 // Init timer1

Loading…
Cancel
Save