zoukankan      html  css  js  c++  java
  • RFID之UID

    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

     1 entity uid15963 is
     2 port
     3 (
     4     RST            : in  std_logic;                       --! Async Reset
     5     C            : in  std_logic;                         --! Clock
     6     CE            : in  std_logic;                        --! Enable 
     7     BCNT        : in std_logic_vector(2 downto 0);        --! byte counter
     8     MANUFACT    : in  std_logic_vector(7 downto 0);       --! Manufacture-Code from EEPROM
     9     SERIAL        : in  std_logic_vector(47 downto 0);    --! Serial number from EEPROM 
    10     BYTE        : in  std_logic_vector(7 downto 0);       --! Data byte input  
    11     UIDVALID    : out std_logic;                         --! UID is OK
    12     MFCVALID    : out std_logic                           --! MANUFACT is OK (for custom commands) 
    13 );
    14 end uid15963;
    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; 
  • 相关阅读:
    shell语句for循环
    ls命令详解
    计算机相关概念总结(3)
    计算机相关概念总结(2)
    计算机相关概念总结(1)
    devops的概念
    jenkins无法连接gitlab
    Jenkins创建镜像后无法推送到harbor的问题
    Jenkins+gitlab+maven持续集成
    jenkins打完包在哪里
  • 原文地址:https://www.cnblogs.com/mengdie/p/4433685.html
Copyright © 2011-2022 走看看