View previous topic :: View next topic |
Author |
Message |
karlos
Joined: 03 Apr 2015 Posts: 107
|
Posted: Thu Jun 30, 2016 7:13 am Post subject: using an interrupt just for wakeup |
|
|
Hi
i want to use int0 of atmega64 just for wakeing up microcontroller from powerdown mode by an external signal. also i dont want to do any instruction in interrupt isr. i want to know if i dont use "on int0 int0_isr" what will happen?
i want to dont go to any interrupt service routine and dont save any register to save time, is it possible?
Regards
(BASCOM-AVR version : 2.0.7.8 ) |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
|
Back to top |
|
|
karlos
Joined: 03 Apr 2015 Posts: 107
|
Posted: Thu Jun 30, 2016 12:21 pm Post subject: |
|
|
thank you
but, forget atmega64 and other hardware recomandation, please say me obviousely my answer.
my question:
if i use below instruction:
config int0=rising(/falling/change)
enable int0
do
loop
end
what will happen after trigering int0 pin?
Regards |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
|
Back to top |
|
|
karlos
Joined: 03 Apr 2015 Posts: 107
|
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5921 Location: Holland
|
Posted: Thu Jun 30, 2016 2:04 pm Post subject: |
|
|
if an int occurs and there is no vector defined, there is only a RETI.
the vector table contains either RETI or a jump to the ISR. _________________ Mark |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Thu Jun 30, 2016 2:15 pm Post subject: |
|
|
Yes but most important thing is that only LOW LEVEL can wake up from Powerdown and I think uC not execute any next command till pin goes high. But I`m not shure about that |
|
Back to top |
|
|
karlos
Joined: 03 Apr 2015 Posts: 107
|
Posted: Thu Jun 30, 2016 5:16 pm Post subject: |
|
|
thanks a lot EDC
thanks a lot Mark
Quote: | PostPosted: Thu Jun 30, 2016 2:15 pm Post subject:
Yes but most important thing is that only LOW LEVEL can wake up from Powerdown and I think uC not execute any next command till pin goes high. But I`m not shure about that Very Happy |
from datasheet:
Note that recognition of falling or rising edge interrupts
on INT7:4 requires the presence of an I/O clock, described in “Clock Systems and
their Distribution” on page 35. Low level interrupts and the edge interrupt on INT3:0 are
detected asynchronously. This implies that these interrupts can be used for waking the
part also from sleep modes other than Idle mode. The I/O clock is halted in all sleep
modes except Idle mode.
Note that if a level triggered interrupt is used for wake-up from Power-down mode, the
changed level must be held for some time to wake up the MCU. This makes the MCU
less sensitive to noise.
so int0-3 can wakeup uc from powerdown in atmega64
Regards |
|
Back to top |
|
|
karlos
Joined: 03 Apr 2015 Posts: 107
|
|
Back to top |
|
|
|