I want to create a 2 byte ID from the MAC address at XDATA 0x780E in the CC2541. I'd like for it to be as unique as possible. The MAC address for these parts looks like this:
54:4a:16:xx:yy:zz . I believe the 3 high order bytes (mac_id[5], mac_id[4], mac_id[3]) are TI specific and constant, and the lower order 3 bytes (mac_id[2], mac_id[1], mac_id[0]) form unique CC2541 addresses. Is this correct?
Assuming that is the case, I could use the lower order two bytes only, but then if, say, zz is constant for a run of parts and xx is changing the uniqueness is really poor.
So, I need an algorithm to best combine xx:yy:zz. I propose the following but I'm wondering if flawed:
ID = (mac_id[0] | ( mac_id[1] << 8)) + mac_id[2];
Thanks,
GiGi