VMAC PiHat v2 EEPROM
The VMAC PiHat has an onboard EEPROM. This is intended as part of the HAT (Hardware Attached on Top), specification, or with PiHat v2.4 onwards, can also be user addressable from the i2c bus.
Two sets of solder pads are provided on the underside of the PCB. This allows EEPROM configuration to be either HAT Pi ID, or User I2C. Please ensure BOTH pads are soldered in the required position.
HAT Pi ID
The EEPROM on the VMAC PiHat is not configured and defaults to blank. It was intended for possible future use and maybe left off.
In a nutshell, the HAT EEPROM is connected to two dedicated and reserved pins on the GPIO 40 way header (namely ID_SD and ID_SC). The device is included to automatically configure and provide the board manufacturer information, GPIO setup and a ‘device tree‘ fragment.
Information on HAT is out of the scope of this Wiki but further external details can be found here and on GitHb Plus other code examples can be found here.
User Addressable I2C
In this mode, you have full access to the EEPROM from within your programming environment, such as Python.
You can easily check the existence of the EEPROM from the terminal, using the below command
Tip: 0 = /dev/i2c-0 (port I2C0) and 1 = /dev/i2c-1 (port I2C1)
sudo i2cdetect -y 1
As you will note in the above, we have #43 which is the FMS6501 Matrix and #50 which is the EEPROM.
NB. i2cdetect only shows the 7-bit address. 0x50 corresponds to 0xa0 write, 0xa1 read.