Stm32 Study Notes 2--rc522

Source: Internet
Author: User

Rc522 has been studying for four or five days. Today, I am barely aware of what is going on. The results are summarized as follows:

I. Operation Procedure of rc522:

650) This. width = 650; "style =" float: none; "Title =" IMG 11111111.png "src =" http://s3.51cto.com/wyfs02/M00/45/CE/wKiom1PrgQ_zvLjvAABR3-c3050394.jpg "alt =" wKiom1PrgQ_zvLjvAABR3-c3050394.jpg "/> 650) This. width = 650; "style =" float: none; "Title =" image 1231213.jpg "src =" http://s3.51cto.com/wyfs02/M01/45/CF/wKioL1PrgieTd5FYAACeXmmrHlo736.jpg "alt =" wkiol1prgietd5fyaacexmmrhlo736.jpg "/>

Ii. M1 card introduction:

1.16 sectors, each of which is divided into four

2. Blocks 0, 1 and 2 for each sector are data blocks, and block 3 is the control block.

3. 0th slice Block 0 is fixed by the manufacturer and cannot be changed

 

Iii. M1 card read/write:

Reading and writing are the same. First, define the storage array for reading and writing. Read writes data in the block to an empty array, read writes the value of the pre-assigned array to the block.

Unsigned char RFID [16]; // read

Unsigned charrfid1 [16] = {0, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0}; // write

Status = pcdread (S, RFID); // read, S is a block

Status = pcdwrite (S, rfid1); // write

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.