English
Language : 

M24LR64-RDW6T-2 Datasheet, PDF (116/121 Pages) STMicroelectronics – Dynamic NFC/RFID tag IC with 64-Kbit EEPROM with I²C bus and ISO 15693 RF interface
Anticollision algorithm (informative)
M24LR64-R
Appendix A Anticollision algorithm (informative)
The following pseudocode describes how anticollision could be implemented on the VCD,
using recursivity.
A.1
Algorithm for pulsed slots
function push (mask, address); pushes on private stack
function pop (mask, address); pops from private stack
function pulse_next_pause; generates a power pulse
function store(M24LR64-R_UID); stores M24LR64-R_UID
function poll_loop (sub_address_size as integer)
pop (mask, address)
mask = address & mask; generates new mask
; send the request
mode = anticollision
send_Request (Request_cmd, mode, mask length, mask value)
for sub_address = 0 to (2^sub_address_size - 1)
pulse_next_pause
if no_collision_is_detected ; M24LR64-R is inventoried
then
store (M24LR64-R_UID)
else ; remember a collision was detected
push(mask,address)
endif
next sub_address
if stack_not_empty ; if some collisions have been detected and
then ; not yet processed, the function calls itself
poll_loop (sub_address_size); recursively to process the
last stored collision
endif
end poll_loop
main_cycle:
mask = null
address = null
push (mask, address)
poll_loop(sub_address_size)
end_main_cycle
116/121
DocID15170 Rev 15