Wiegand Clock/Data Converter PIC

From Wiki
Jump to: navigation, search

Converts wikipedia:Wiegand encoding to clock/data format, or clock/data to Wiegand. A jumper selects which mode the board operates in. This is version 2 of the converter. Version 1 (Wiegand Clock/Data Converter AVR) used an AVR processor, and only supported Wiegand to clock/data conversion.

In the Wiegand to clock/data mode, as DATA0 or DATA1 goes low, the data line is driven accordingly, followed by a pulsing the clock line low for 100 microseconds. Should both lines be low, then the transitions are ignored.

In clock/data to Wiegand mode, the DATA0 or DATA1 line is driven based on the state of the data line. DATA0 or DATA1 stays low for 100 microseconds.

In both cases, if the inputs make transitions while the 100us timer is active, the transitions are ignored.

The code is completely interrupt driven, and the processor is asleep when the 100us timer is not running. The quiescent current is extremely low, somewhere in the 5ua range.

An LED is lit when the 100us timer is active. This gives a good indication of the traffic present.

Schematics

PCB

  • (no images yet)

Source Code