Step 3Magnetic Card Reader
The first step in this project is establishing how the card reader actually works. The datasheet can be found here: http://www.allelectronics.com/mas_assets/spec/MCR-12.pdf
The two most important data lines are RDT and RCT, which are data and clock respectively. The way this card reader sends what it's reading is using these two pins. When the clock line goes from 1 to 0, that means the next bit of the card is present on RDT. There is an example in the first picture.
The RDT line is inverted, meaning when the clock goes from 0 to 1, if a 0 is present on RDT, that means there's a 1 on the next bit of the card. The example above shows what might happen if the data "1101" was on the card. Note that the frequency of the clock pulses are purely dependent on the rate in which the card is scanned. They are not necessary uniform width.
The next part after grabbing the data is interpreting it. Most magnetic cards use the same format, including the school IDs. There is a picture of example data provided.
The data is in groups of 5 bits with 4 data bits and one odd parity bit. The first bit is a semi-colon, or a 'start sentinel'. It has the value of 11, and signifies the beginning of the card. There is also one parity byte at the end of the card. For this simplified design, the parity bits are ignored, because any misread card will simply result in an access denied error.
| « Previous Step | Download PDFView All Steps | Next Step » |
1
comment
|
Add Comment
|
![]() |
Add Comment
|














































