码迷,mamicode.com
首页 > 其他好文 > 详细

RFID之UID

时间:2015-04-17 01:08:23      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:

 

1  Unique identifier (UID)

  The VICCs are uniquely identified by a 64 bits unique identifier (UID). This is used for addressing each VICC uniquely and individually, during the anticollision loop and for one-to-one exchange between a VCD and a VICC.


  The UID shall be set permanently by the IC manufacturer in accordance with figure 1.

  技术分享

  The UID comprises

  • The 8 MSB bits shall be ‘E0‘,

  • The IC manufacturer code, on 8 bits according to ISO/IEC 7816-6/AM1,

  • A unique serial number on 48 bits assigned by the IC manufacturer.

 

2  Example

 

signal c_valid : std_logic;                --current validation
signal n_valid : std_logic;                --next validation

signal compare : std_logic_vector(7 downto 0);    --compare results

begin

--! It‘s an D-Reset-Flip-Flop with enable ...
pff: process (RST,C)
begin
    if RST = ‘1‘ then
        c_valid <= ‘0‘;
        MFCVALID <= ‘0‘;
    elsif C‘event and C = ‘1‘ then
        if CE = ‘1‘ then
            if BCNT = "000" then
                c_valid <= n_valid;
                MFCVALID <= compare(6);
            else
                c_valid <= c_valid and n_valid;
            end if;
        end if;
    end if;
end process;

UIDVALID <= c_valid;


compare(7) <= ‘1‘ when BYTE = X"E0" else ‘0‘; 
compare(6) <= ‘1‘ when BYTE = MANUFACT else ‘0‘;
compare(5) <= ‘1‘ when BYTE = SERIAL(47 downto 40) else ‘0‘;
compare(4) <= ‘1‘ when BYTE = SERIAL(39 downto 32) else ‘0‘;
compare(3) <= ‘1‘ when BYTE = SERIAL(31 downto 24) else ‘0‘;
compare(2) <= ‘1‘ when BYTE = SERIAL(23 downto 16) else ‘0‘;
compare(1) <= ‘1‘ when BYTE = SERIAL(15 downto  8) else ‘0‘;
compare(0) <= ‘1‘ when BYTE = SERIAL( 7 downto  0) else ‘0‘;

with BCNT select
    n_valid <=     compare(0) when "000",
                   compare(1) when "001",
                 compare(2) when "010",
                 compare(3) when "011",
                 compare(4) when "100",
                 compare(5) when "101",                                  
                 compare(6) when "110",
                 compare(7) when others; 

 

RFID之UID

标签:

原文地址:http://www.cnblogs.com/mengdie/p/4433685.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!