How to enable Input pull-up on multiple pins (non-async-interrupt ones) that could trigger an ISR #596
Unanswered
dattasaurabh82
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Target uC:
ATTINY1607
Context:
Depending on which pins have Async Interrupt, an event on those pins can trigger an ISR, waking up the uC if it was sleeping.
So for 1607, have 4 such pins: PA2, PB2, PB6 & PC2.
I'm currently using PC2 in input pull up mode to trigger an ISR.
The ISR itself is like this:
And in the main loop, I'm doing something like:
Unclear:
Now I want to add another button (Input pull) with the intention that it can also trigger the/an ISR.
I can't use the remaining Async Interrupt pins (i.e: PA2, PB2, PB6 which could to trigger ISR) as they are taken .
So I was thinking of using PC0, as it is still on the same port
PORTC
.I tried using
pinConfig()
on PC0 like belowIf it triggers, the it should fire the same ISR as above.
And in the main loop, I could imagine to do something like:
But it doesn't trigger!
Is it a lost cause or there is still some ray of hope and what would be the cost? 🤔
Beta Was this translation helpful? Give feedback.
All reactions