Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work for pin High #12

Closed
bwheatl opened this issue Sep 13, 2016 · 4 comments
Closed

Does not work for pin High #12

bwheatl opened this issue Sep 13, 2016 · 4 comments

Comments

@bwheatl
Copy link

bwheatl commented Sep 13, 2016

The code works great except when I monitor for a pin high condition. I changed falling and low to rising and high in the library. Any thoughts?

@bwheatl
Copy link
Author

bwheatl commented Sep 13, 2016

I found all sleep modes except for idle requite pin LOW. Idle is the only one that allows pin HIGH and CHANGE.

@nullboundary
Copy link
Collaborator

screen shot 2016-09-21 at 11 52 11 am

If you check out this chart from the Atmega328 datasheet you will see that in all sleep modes besides Idle only a level interrupt works (INT1,INT0 column). Level interrupts are only HIGH or LOW. Edge interrupts are CHANGE, RISING, and FALLING.

Also the Arduino reference says only the Arduino Due, Zero, MKR1000 work for interrupt HIGH.

So that leaves us with only LOW interrupt available for sleep modes besides Idle.

@nullboundary
Copy link
Collaborator

nullboundary commented Sep 21, 2016

This is interesting, found it here. But your saying this is not true? Maybe it depends on the version/batch of the Atmega chip? Strange.


Tip:
I received this confirmation from Atmel that the datasheet is wrong about only LOW interrupts waking the processor.

Quote:

Commented by Manoraj Gnanadhas (Atmel)
2015-01-20 06:23:36 GMT
[Recipients: Nick Gammon]

Hello Nick,

Our design team has confirmed that “Note-3 mentioned under Table 10-1” is a datasheet bug. So you can use any type of interrupt (Rising edge/ Falling edge / Low level / Any logical change) to wake up from sleep mode. Sorry for the inconvenience caused.

Best Regards,
Manoraj Gnanadhas

Thus, all interrupt types will wake the processor.

@nullboundary
Copy link
Collaborator

Closing, hopefully its been solved or my answer helped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants