Decoder power-up, Decoder receive mode, Decoder create key mode – Linx Technologies LICAL-DEC-HS001 User Manual
Page 9

– –
– –
12
13
encoder that must be entered before the encoder activates. Furthermore, 
since each encoder has its own key and the Control Permissions are stored 
in the decoder, all the attackers would be able to do is duplicate the device 
that they have already taken. They will not be able to grant themselves 
greater authority, create a new controller, or replicate another encoder.
Before the encoder sends a packet, it calculates the Hamming Weight (the 
number of ‘1’s in the string) of the packet to determine the duty cycle. If the 
duty cycle is greater than 50% (more ‘1’s than ‘0’s), the encoder logically 
inverts all of the bits. This ensures that every packet always contains 50% 
or less ‘1’s. Since the FCC allows transmitter output power to be averaged 
over 100ms, this allows a legal improvement in link range and performance 
for many devices using an ASK / OOK transmitter. A 50% duty cycle is 
generally the best compromise between data volume and output power.
Some other manufacturers may use a Pulse Width Modulation (PWM) 
scheme or Manchester Encoding scheme to maintain a 50% duty cycle. 
Both of these methods work, but are inefficient and do not make use of 
the full link budget. The HS Series uses true serial data while maintaining a 
50% duty cycle. Application Note AN-00310 covers these issues in detail.
Decoder Power-Up
When the decoder first powers up, it sets the baud rate and goes to sleep 
until: 1) the LEARN line is taken high, placing the decoder into Learn Mode, 
2) a rising edge (low to high transition) on the COPY_IN line puts it into Get 
Copy Mode, or 3) a rising edge on the DATA_IN line puts it into Receive 
Mode.
Decoder Receive Mode
When a rising edge is seen on the DATA_IN line, the decoder enters 
Receive Mode. It begins by looking for a valid packet (meaning one that 
can be decrypted with the saved key) that has no errors. If the packet is 
valid, then the decoder replicates the Data byte on its data lines and pulls 
the MODE_IND line high. It also outputs a number that represents the ID of 
the encoder once when the first valid packet is received. The decoder then 
looks for the next valid packet. If an error is detected at any time, or if the 
transmission cannot be decrypted with the saved key, then the decoder 
ignores the packet and looks for the next one.
If no valid packet is detected within 262ms, the decoder goes back to 
sleep.
Decoder Create Key Mode
Create Key Mode is entered when the CREATE_KEY line is high when 
the LEARN line is taken high. When this happens, the MODE_IND line 
goes high as an indication that the decoder is ready to create the key. The 
CREATE_KEY line needs to go high ten times to set the key. Each edge 
on the line starts a timer that is used to populate a part of the key. This 
method is used to gather entropy so that the key is truly random and is 
chosen from among all 2
80
possible keys.
Following the tenth press, the decoder begins to send the key to the 
encoder on the KEY_OUT line. This is output as a serial data stream, so it 
can be sent to the encoder by any method suitable for serial data transfer. 
This can include the use of a wire, contact points on an enclosure, or 
infrared. The HS Series Master Development System demonstrates wire 
and infrared transfer methods. Please refer to the development system 
User’s Guide for circuit schematics and further details.
Once the encoder receives the key on its KEY_IN line, it sends a 
confirmation to the decoder through its DATA_OUT line. This means that 
the standard mode of communication, whether a wire, RF, or infrared, 
must be active. When the decoder receives this confirmation, it sends a 
final confirmation through the KEY_OUT line. The MODE_IND LED lines on 
the encoder and the decoder turn on for one second. This indicates that 
the encoder and decoder are now ready to be used. The decoder outputs 
the key information for seventeen seconds or until it receives a valid 
confirmation from the encoder. If Control Permissions are going to be used, 
they may now be set as described in the Decoder Learn Mode section.
Note that the CREATE_KEY line should be connected to a button or 
another contact that will give random times between presses. Connecting 
this line to a deterministic source, such as a microprocessor clock, does 
not produce a secure key and could compromise the system.
