Author Topic: Stacking two I2C Shields?  (Read 3031 times)

ElectronicWar

  • Newbie
  • *
  • Posts: 8
Stacking two I2C Shields?
« on: March 03, 2013, 03:26:51 pm »
While I'm waiting for my EEPROM shield to arrive I want to ask if it's possible
to stack two I2C shields and control both from the digispark.


I want to combine the EEPROM shield and the LCD shield (using the EEPROM for message storage).
Both are using different address spaces (0x27 for the LCD and 0x50 for the EEPROM).


My problems are now:
- How to "stack" them physically (aka connecting)
- How to access them


I'm still new to embedded programming, so bare with me please :D

ephphatha

  • Newbie
  • *
  • Posts: 6
Re: Stacking two I2C Shields?
« Reply #1 on: March 03, 2013, 07:47:13 pm »
It certainly is possible. It's easiest if you solder stackable headers to the 6 pin and 3 pin rows of each board as they're designed to be easily stacked (hence the name). Accessing and controlling them is done via the TinyWireM library as if they were connected individually. You only need to make sure each i2c device has a different address otherwise you might get multiple devices responding to the same commands or other unintended behaviour.

Mark

  • Full Member
  • ***
  • Posts: 196
Re: Stacking two I2C Shields?
« Reply #2 on: March 03, 2013, 08:36:04 pm »
If you're using the supplied stackable headers, you may wish to look at this post.
http://digistump.com/board/index.php/topic,346.msg1785.html#msg1785

Mark