jwhitmore
Posts: 40
Joined: Mon Oct 01, 2012 5:32 pm

Multiple HATs and ID EEPROM?

Wed Oct 03, 2018 12:41 pm

I's designing a RaspberryPi "HAT" to fit onto a device which already has the RaspberryPi 7" touchscreen display. That display pretty much leaves the GPIO expansion header free for use apart from the I2C pins used for HAT Identification [1]. Now whilst I2C is can cope with multiple slave devices connected to the BUS the guidelines[1] indicate that the identification EEPROM "I2C address is 0x50". So that means that even though I can add a second HAT only one can use the ID system?


[1] https://github.com/raspberrypi/hats/blo ... gnguide.md

scotty101
Posts: 3406
Joined: Fri Jun 08, 2012 6:03 pm

Re: Multiple HATs and ID EEPROM?

Wed Oct 03, 2018 1:12 pm

There are two I2C buses available on the expansion header. One is dedicated for reading a HATs EEPROM but the other is free for you to use for what ever purpose you want.

But yes only 1 HAT can share it's EEPROM information (this isn't a great loss as so few HATs actually use the EEPROM)
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

hippy
Posts: 4361
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Multiple HATs and ID EEPROM?

Wed Oct 03, 2018 1:15 pm

jwhitmore wrote:
Wed Oct 03, 2018 12:41 pm
So that means that even though I can add a second HAT only one can use the ID system?
Correct. If you add a second HAT, and both use the same EEPROM device address, both will likely fail to work.

The PoE HAT gets round that by using a different EEPROM device address but that is only applicable to that and cannot AFAIK be used for anything else, cannot be used to identify a second HAT.

Considering only HATs attach to those ID lines it would potentailly be possible to have the Pi check more device addresses, just as it does for identifying a fitted PoE HAT, but that's not AFAIK implemented, not part of the HAT spec, and there's no indication such a capability will be added.

jwhitmore
Posts: 40
Joined: Mon Oct 01, 2012 5:32 pm

Re: Multiple HATs and ID EEPROM?

Wed Oct 03, 2018 7:39 pm

Thank you for the confirmation :(

I've just changed my HAT to have jumpers on it so you can disable the EEPROM, when the lines are already in use. I might look at the code which probes for attached HAT, but it probably needs a properly designed protocol between the master and the slave eeprom devices.

thanks again.

Return to “HATs and other add-ons”