
Application note(PDF) from Silicon Labs on Magnetic stripe reader (MSR) implementation.
Magnetic stripe readers (MSRs) are widely used in many different applications such as point-of-sale terminals and key card readers. The C8051F330 is capable of integrating MSR functionality in a very small space with few external components. The high-speed, high-resolution ADC, coupled with a fast controller core makes this integration possible. This design demonstrates a two-channel MSR function using the on-chip ADC to read information directly from the magnetic read head. Output can be viewed using a PC’s terminal program via an RS-232 connection.

I was at a Radio Shack a while back (how much longer until we don’t hear that anymore?), and saw a card reader in a “clearance” bin for $5. I thought nothing of it until I saw the end of the cord. It was USB. Being a fan of USB, my cat would surely be dead. When I got it home, I opened the case and it has a chip to read the card, then, if I remember correctly, another to convert to HID keyboard data to send across the USB line. I ran a few tests and that is all it does. It was a USB HID keyboard, as far as the host was concerned, and inserted the card’s values right into the keyboard of the host.
Open a text editor, swipe the card, and a bunch of characters were written as if I typed them on the keyboard myself.
I don’t know what the chip was that read the card because it was covered in that black epoxy type bubble, adhered to the board. You know the type, many calculators have their chip covered by this
stuff.
I don’t remember the chip that was used to convert the data to USB HID. Could have been as simple as an ATTINY I guess, but I don’t remember. Maybe I will have to find that part and open it up again, just to have a look. I don’t remember if it was a single chip that did both, or two, one for the card reader and one for the USB interface.
Anyway, thanks for the article.
Most stripe card readers and barcode scanners work like that. They used to be PS/2 devices which you inserted between your computer and keyboard but now they’re just another USB HID since your OS can handle more than one. It is easier for them to emulate a keyboard so then your apps don’t need to have special support for it. The ones that aren’t are generally TTL to interface to an embedded system.