A bit is a logical term for the difference between on/off, true/false, yes/no, etc. All digital electronics operate off of bits. You computer computes with millions of bits. Think of them as switches, that turn off and on. Different paths occur when certain switches get turned off and on. A bit has two states, on and off. When it is on, it is considered a (1). When it is off, is considered a (0). If you string several together, they form bytes, words, etc. That is as far as I will go for now. We will focus on the bits for Wiegand data.
If you take the number of 25 and convert it to bits you will get 11001.
26bit Wiegand data is formed using 24bits of data, and two parity bits.
The facility code is made up of 8 bits. This allows the facility code to have a range of 0-255.
The device number uses 16 bits. This allows the device to have a range of 0-65535.
Although there are many combinations of codes that can be used, many manufactures have created larger bit rates to increase the number of facility codes and device numbers.
In this first image, I have a screen capture from an oscilloscope attached to the two data lines of a 26bit card reader.
The voltage normally rests at 5v. When a card is read, the card reader sends the 26 bits. In this demonstration, the first bit is a 1. The Data 1 (white wire, D1) line falls close to 0v briefly. The next two bits are zeros. The Data 0 (green wire, D0) line falls close to 0v twice briefly. This continues until all 26 bits are sent in this manner. This is how Wiegand data is transferred.
The bits are numbered 1 – 26 left to right.
Bit 1 is an even parity bit. Put simply this is an error correction bit. If the bits 2-13 have an odd number of bits (1’s), then this bit is on to make the first 13 bits even.
The opposite is true with the 26th odd bit. If the bits 14-25 have an even number of bits (1’s), then this bit is on to make the last 13 bits odd.
These parity bits may be used in certain access controllers. DoorKing and Linear ignore these parity bits. This is demonstrated by wiring the Wiegand device backwards. If you swap the data 1 and data 0 wires you reverse the order of the bits. Thus, a seemingly random number is shown. If the parity bits were used for error checking, then the data would be rejected.
No comments:
Post a Comment