M24LR64E Class
- ID: m24lr64e
- Name: Dynamic NFC/RFID Tag Module
- Other Names: Grove NFC Tag
- Category: other
- Manufacturer: seeed
- Link: http://www.seeedstudio.com/wiki/Grove_-_NFC_Tag
- Connection: i2c
The M24LR64E NFC tag is an 8KB electrically erasable programmable read-only memory (EEPROM) that can be written to or read from using I2C and NFC-equipped devices.
The user mode (default) allows read and write access to all 8KB of space, provided the sector security status (SSS) allows it. The root mode allows modification of the SSS data and other information, provided the proper password is submitted. The default password for a new tag is 0x00000000. See the datasheet for more details.
The Seeed Studio* wiki page for this device includes a link to an Android* application that can be used to also read and write the device via NFC, as well as set NFC passwords, which cannot be done via I2C.
Item Index
Methods
Methods
M24LR64E
-
bus
-
mode
M24LR64E constructor
Parameters:
-
bus
NumberI2C bus to use
-
mode
AccessModeAccess mode (user or root) to use
Returns:
submitPasswd
-
passwd
Submits an I2C access password
Parameters:
-
passwd
Number4-byte access password
Returns:
writePasswd
-
passwd
Writes a new I2C password
Parameters:
-
passwd
Number4-byte access password
Returns:
sectorProtectConfig
-
sectorNumber
-
protectEnable
-
accessRight
-
passwd
Sets a protection bit for a sector. Must be in the root mode
Parameters:
-
sectorNumber
NumberSector whose protection you are modifying
-
protectEnable
BooleanTrue if you are enabling protection
-
accessRight
SectorAccessRightAccess rights to set
-
passwd
SectorSelectPassWdPassword number to enable, if any
clearSectorProtect
()
Clears sector protection bits. Must be in the root mode.
sectorWriteLockBit
-
sectorNumber
-
sockEnable
Sets or clears a sector security status lock bit for a sector. Must be in the root mode.
Parameters:
-
sectorNumber
NumberSector whose SSS you want to modify
-
sockEnable
BooleanTrue to set the bit, false to clear it
getDSFID
()
Number
Returns a data storage family identifier (DSFID) Must be in the root mode.
Returns:
DSFID
getAFI
()
Number
Returns an application family identifier (AFI) Must be in the root mode.
Returns:
AFI
getUID
()
Uint8_t *
Returns a unique ID. Must be in the root mode. Maintained to preserve compatibility with older code.
Returns:
buf Buffer to hold the UID. Must be UID_LENGTH bytes.
getMemorySize
()
Number
Returns the memory size Must be in the root mode.
Returns:
Amount of memory present
clearMemory
()
Sets all memory to 0, if permissions allow
writeByte
-
address
-
data
Writes a byte to the EEPROM
Parameters:
-
address
NumberAddress to write to
-
data
NumberData to write
Returns:
writeBytes
-
address
-
buffer
-
len
Writes bytes to the EEPROM
Parameters:
-
address
NumberAddress to write to
-
buffer
Uint8_t *Data to write
-
len
NumberLength of the data buffer
Returns:
readByte
-
address
Reads a byte from the EEPROM
Parameters:
-
address
NumberAddress to read from
Returns:
data Value read
readBytes
-
address
-
buffer
-
len
Reads multiple bytes from the EEPROM
Parameters:
-
address
NumberAddress to read from
-
buffer
Uint8_t *Buffer to store data
-
len
NumberNumber of bytes to read