Add the function of Reading multiple consecutive RFID microcontroller programs

Source: Internet
Author: User

In the actual application of RFID, due to the large data volume, the customer needs to occupy multiple sectors and blocks. In the previous interface, only one block can be read for one interaction. When the data volume is large, interaction takes a long time. Based on this demand, I am an RFID MicrocontrollerProgramAdded the continuous multi-block READ function.

 

Before implementation, determine whether the transmitted data packet is in the previous format. On the one hand, it is convenient, and you do not need to change the parsing of the Java receiving part. On the other hand, it is unnecessary to create a new data format, single-Chip Microcomputer resources are limited. A data packet cannot contain too much data. Therefore, this method is still the most effective even if there is more redundancy.

 

Then, it is the parameter; whether the block number is the unit, whether the slice is the unit, or the slice and block number are used as the parameter; based on the principle of how to make it simple, the slice is the unit. Because of the block number range, the block number range of The S50 card is 0-63, which must be expressed in 8 bits, and the slice is 0-15, which can be expressed in 4 bits. From this point of view, we need to change this part to use larger-capacity cards in the future.

 

I still want to implement block write. However, the single-chip microcomputer Ram capacity is limited and large data packets cannot be used. The existing method remains unchanged. For practical applications, all the data is written during the first release, and the most frequently used process is generally the Reading Card and modifying a very small part of the data.

 

Because the passwords for each sector are different, when reading a continuous sector, authentication or card reading may fail. Therefore, on the Java side, A continuous read interface is provided. This continuous read operation is considered successful only when all the blocks to be read are read correctly.

 

I also want to provide a writing interface on the Java end. It is not necessary to discuss it with Huang; because the writing time is long. When I call this method, the blocking time is not good. Is it better to let the customer do this and create a progress bar?

 

Problems encountered during debugging:

The bracket in front of for {} was forgotten, and the bracket was missing in the latter part. Therefore, it took an hour to solve the problem; the main reason for this long time is the debugging tool, which is simple and too lazy to find someone to fly.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.