Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Arduino Interrupts and I2C

Arduino Interrupts and I2C

Scheduled Pinned Locked Moved Troubleshooting
4 Posts 2 Posters 1.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • zboblamontZ Offline
    zboblamontZ Offline
    zboblamont
    wrote on last edited by
    #1

    Having learned a lot from this forum, I wonder if somebody can now enlighten me on how to identify an interrupt as the TWI address match on I2C Slave after it wakens from Sleep, or point me where I can find out?
    I could activate a external interrupt from Master to Slave if stuck or if it brings other issues, but I keep finding reference to TWI match with no detail of how the Slave knows why it was wakened...

    YveauxY 1 Reply Last reply
    0
    • zboblamontZ zboblamont

      Having learned a lot from this forum, I wonder if somebody can now enlighten me on how to identify an interrupt as the TWI address match on I2C Slave after it wakens from Sleep, or point me where I can find out?
      I could activate a external interrupt from Master to Slave if stuck or if it brings other issues, but I keep finding reference to TWI match with no detail of how the Slave knows why it was wakened...

      YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by
      #2

      @zboblamont Refer to http://ww1.microchip.com/downloads/en/AppNotes/atmel-2565-using-the-twi-module-as-i2c-slave_applicationnote_avr311.pdf top of page 5:

      if a START CONDITION followed by a TWI address matches the address in the Slave’s TWI Address Register (TWAR) the TWINT flag is set, resulting in the execution of the corresponding interrupt (if Global Interrupt and TWI interrupts are enabled).

      See here and here on how to use it.

      http://yveaux.blogspot.nl

      zboblamontZ 1 Reply Last reply
      0
      • YveauxY Yveaux

        @zboblamont Refer to http://ww1.microchip.com/downloads/en/AppNotes/atmel-2565-using-the-twi-module-as-i2c-slave_applicationnote_avr311.pdf top of page 5:

        if a START CONDITION followed by a TWI address matches the address in the Slave’s TWI Address Register (TWAR) the TWINT flag is set, resulting in the execution of the corresponding interrupt (if Global Interrupt and TWI interrupts are enabled).

        See here and here on how to use it.

        zboblamontZ Offline
        zboblamontZ Offline
        zboblamont
        wrote on last edited by
        #3

        @yveaux Not sure what the second link is but thank you very much for the pointers... :ok_hand:

        YveauxY 1 Reply Last reply
        0
        • zboblamontZ zboblamont

          @yveaux Not sure what the second link is but thank you very much for the pointers... :ok_hand:

          YveauxY Offline
          YveauxY Offline
          Yveaux
          Mod
          wrote on last edited by
          #4

          @zboblamont avr-libc is the 'base library' which allows c-coding on atmega's. It describes how to use the twi interface and includes some example code to juggle the twi registers of the atmega.
          Possibly you can find some arduino library abstracting these details for you, but this is how it works/should be done.

          http://yveaux.blogspot.nl

          1 Reply Last reply
          1
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          22

          Online

          11.7k

          Users

          11.2k

          Topics

          113.1k

          Posts


          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • MySensors
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular