Atmega328 read wiegand access control protocol

The purpose of this project was to be able to read wiegand protocol from a access control reader. In order to do this I used a Atmega328 microprocessor and one Rosslare AY-K12C Multi format proximity reader.

My program waiting for any serial protocol with length up to 100 bits and if reacaive a wiegand code from a 26-Bit or 32-Bits proximity card analyze the number and provide the facility code (FC) plus the card card (CC).