Skip to content

readEUI()

Arnd edited this page Jan 6, 2021 · 1 revision

Function reads any data type from the MCP79400 / MCP79401 / MCP78402 8 bytes of protected memory. Addressing outside of the 8 byte space results in undefined data being returned. The optional unsigned integer return value is the number of bytes actually read. This memory is generally used to store a device EUI address.


Example:

...
MCP7940_Class MCP7940;        // Create an instance of the MCP7940
...
  uint8_t buffer[8];         // 8 byte EUI address
  MCP7940.readEUI(0,buffer); // read it back from the MCP79401 with offset 0
  Serial.print("Buffer is \"");
  for (uint8_t i = 0; i< 8;i++) {
     Serial.print("0x");
     Serial.print(buffer[i],HEX);
     Serial.print(" ");
  } // of for-next loop
  Serial.println("\".");
...
Clone this wiki locally