hi everyone , i have a problems about interuption in AVR atmega, i trying to solve a problems is
Turn led with two buttons
bt1 in pd2 (int0)
bt2 in pd3 (int1)
LED must be Eteine if it exceeds 20s staying on, for that you need to configure a temp basis interupption for each 1s and realize a timer that counts the seconds
party to achieve
the configuration input output
int0 configure and int1
ISR (int0) and SRI (int1)
configure the interuption of SRI timer 1
SRI (tcnt1_compa_vect)
incrementation of the counter
reset to zero of the counter
any solution ?
Turn led with two buttons
bt1 in pd2 (int0)
bt2 in pd3 (int1)
LED must be Eteine if it exceeds 20s staying on, for that you need to configure a temp basis interupption for each 1s and realize a timer that counts the seconds
party to achieve
the configuration input output
int0 configure and int1
ISR (int0) and SRI (int1)
configure the interuption of SRI timer 1
SRI (tcnt1_compa_vect)
incrementation of the counter
reset to zero of the counter
any solution ?