diff --git a/Geigerzaehler/main.c b/Geigerzaehler/main.c index dcb034d..1fe695b 100644 --- a/Geigerzaehler/main.c +++ b/Geigerzaehler/main.c @@ -1,5 +1,5 @@ /* - * geigerzaehler.main.c.c + * geigerzaehler.c * * Created : 28.02.2019 09:07:22 * Author : John Ditgens, Alexander Brandscheidt @@ -8,13 +8,15 @@ * MController : AtMega328P * Board : Arduino Nano */ -#define F_CPU 20000000UL // Clock speed: 20 MHz - Maximum of AtMega328P +#define F_CPU 20000000UL // Clock speed: 20 MHz - Maximum of AtMega328P // Imports #include #include +#include -int main(void) + +int main() { DDRD &= ~(1<<2); // Activate PD2 DDRD &= ~(1<<3); // Activate PD3 @@ -22,11 +24,11 @@ int main(void) PORTD |= (1<<2); // Enable Pull Up Resistor Pin D2 PORTD |= (1<<3); // Enable Pull Up Resistor Pin D3 - EICRA |= (1 << ISC01)|(1 << ISC00); // Only at raising edge - EIMSK |= (1 << INT0); // Activate Interrupt INT0 + EICRA |= (1 << ISC11)|(1 << ISC10); // Only at raising edge + EIMSK |= (1 << INT1); // Activate Interrupt INT0 - EICRA |= (1 << ISC11)|(1 << ISC10); // Only at raising edge - EIMSK |= (1 <