You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
793 B
C

/*
* geigerzaehler.main.c.c
*
* Created: 28.02.2019 09:07:22
* Author : John_Ditgens
*/
#define F_CPU ...UL // Taktfrequenz (...)Hz
#include <avr/io.h>
#include <avr/interrupt.h>
// Todo: Clock speed missing
int main(void)
{
DDRD &= ~(1<<2); // Activate PD2
DDRD &= ~(1<<3); // Activate PD3
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 INT1
sei();
while (1)
{
}
}
ISR(INT0_vect)
{
}
ISR(INT1_vect)
{
//???
}