Pages: 1 [2]   Go Down
Author Topic: <SOLVED> ATmega644 does not catch the interupt  (Read 2487 times)
0 Members and 1 Guest are viewing this topic.
The Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 38
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 PB2, ATmega644 pin 3


* PB2.jpg (56.95 KB, 358x306 - viewed 17 times.)
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

WInterrupts.c is confusing with all the defines, but this looks relevant:

Code:
    case 4:
      EICRA = (EICRA & ~((1 << ISC20) | (1 << ISC21))) | (mode << ISC20);
      EIMSK |= (1 << INT2);
      break;

Given that you want an INT2 interrupt, it looks like attachInterrupt (4, foo) is what you want. Try it anyway, and see what happens.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Also see this thread:

http://arduino.cc/forum/index.php?topic=147080
Logged

The Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 38
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Your the best! That solved the problem!
Logged

Pages: 1 [2]   Go Up
Jump to: