I've been looking over the pinouts for the Trinket: http://learn.adafruit.com/introducing-trinket/pinouts ,but I'm not sure I understand it well enough. Are there any external interrupts on the Trinket microcontroller?
Thanks
External Interrupts on Trinket?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88037
- Joined: Sat Feb 07, 2009 10:11 am
Re: External Interrupts on Trinket?
PB2 on the chip is INT0 (among other things) the sole external interrupt on the ATTiny85. This is brought out as GPIO#2 on the Trinket.
- docwisdom
- Posts: 4
- Joined: Tue Aug 05, 2014 1:44 am
Re: External Interrupts on Trinket?
Sorry to dig up an old thread, but can you do external interrupt and I2C on the Trinket at the same time?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: External Interrupts on Trinket?
Sure! Just don't use the interrupt pin for I2C.docwisdom wrote:can you do external interrupt and I2C on the Trinket at the same time?
- lukebo
- Posts: 2
- Joined: Sat Nov 11, 2017 12:22 pm
Re: External Interrupts on Trinket?
Hi everyone,
sorry to dig out that old thread again!
I did not really understand your answer, Rick. My problem is as follows. I want to use the trinket to grab the signal of an anemometer (10101010101 with a certain frequency) and measure that frequency. The result must be sent over I2C to a master for further processing. If i use GPIO2 to measure the frequency using the (only) interrupt, how can i use it as I2C clock line at the same time!?!? Can the clock line be changed? I always thought that it is fixed?
Thanks for the help,
Luke
sorry to dig out that old thread again!
I did not really understand your answer, Rick. My problem is as follows. I want to use the trinket to grab the signal of an anemometer (10101010101 with a certain frequency) and measure that frequency. The result must be sent over I2C to a master for further processing. If i use GPIO2 to measure the frequency using the (only) interrupt, how can i use it as I2C clock line at the same time!?!? Can the clock line be changed? I always thought that it is fixed?
Thanks for the help,
Luke
- adafruit_support_bill
- Posts: 88037
- Joined: Sat Feb 07, 2009 10:11 am
Re: External Interrupts on Trinket?
The external interrupt would interfere with i2c. But you can use pin-change interrupts. Pin change interrupts (PCINTx) are supported on all of the GPIO pins.
- lukebo
- Posts: 2
- Joined: Sat Nov 11, 2017 12:22 pm
Re: External Interrupts on Trinket?
Thanks a lot for the keywords, Bill!
Please be positive and constructive with your questions and comments.