Changes between Version 3 and Version 4 of S6350serialcom


Ignore:
Timestamp:
10/27/08 11:38:29 (16 years ago)
Author:
pinwc4
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S6350serialcom

    v3 v4  
    5050The resulting command could look like this: 
    5151ChrB(&h01) + ChrB(&h0D) + ChrB(&h00) + ChrB(&h00) + ChrB(&h00) + ChrB(&h00) + ChrB(&h60) + ChrB(&h11) + ChrB(&h27) + ChrB(&h01) + ChrB(&h00) + ChrB(&h5B) + ChrB(&hA4) 
     52 
     53= Silence Tag = 
     54 
     55The UID passed must be a string in the reverse byte order that it is recieved in the string assemled by this can be sent directly to the serial port to silence the given RFID tag 
     56 
     57dim silencecommand as string 
     58   
     59Everything but checksum, portion before UID is the ISO15693 silence command for a TI S6350 
     60Byte 1 is the Start of Frame, always 01 
     61Byte 2 and 3 is the length of the command including the 2 byte check sum that is added to the end, Least Significant Byte first 
     62Byte 4 and 5 is the node address, leave at 00 as we do not reference nodes 
     63Byte 6 is the command flags, no flags present 
     64Byte 7 is the command, &h60 means it is an ISO15693 command which will be in the data portion of the packet 
     65Byte 8 is the config byte for the reader, &h11 means 100% modulation and 1/4 data mode 
     66Byte 9 is the ISO15693 command flags, &h23 means 2 sub carriers, high data rate, and address flag is set 
     67Byte 10 is the ISO15693 command, &h02 means be quiet 
     68Byte 11-18 are the UID that needs to shut up 
     69Byte 19 and 20 are the checksum that is added later 
     70 
     71An example would be: 
     72 
     73ChrB(&h01) + ChrB(&h14) + ChrB(&h00) + ChrB(&h00) + ChrB(&h00) + ChrB(&h00) + ChrB(&h60) + ChrB(&h11) + ChrB(&h23) + ChrB(&h02) + UID + Checksum 
     74   
     75 
     76= Checksum = 
     77 
     78The checksum used by the TI S6350 is very basic.  It is a 2 byte checksum.  The first byte is the XOR of the string.  The second byte is teh XOR of &hFF and the first byte. 
     79 
     80Here is an example of the code to do this: 
     81   
     82  dim checksum as string 
     83  dim xornumber1 as integer 
     84  dim xornumber2 as integer 
     85   
     86  'Do a XOR of all the bytes of the string for byte 1 of the checksum 
     87  'Do not worry about xornumber having a zero initially, this does not impact the XOR operation 
     88  for i as Integer=1 to len(data) 
     89    xornumber1 = xornumber1 xor ascB(mid(data,i,1)) 
     90  next 
     91   
     92  'calculates byte 2 of the checksum 
     93  xornumber2 = &hFF xor xornumber1 
     94   
     95  'put the two together for the complete checksum 
     96  checksum = chrB(xornumber1) + chrB(xornumber2)