English
Language : 

HCS512 Datasheet, PDF (3/20 Pages) Microchip Technology – KEELOQ CODE HOPPING DECODER
HCS512
The 16-bit synchronization value is the basis for the
transmitted code changing for each transmission and is
updated each time a button is pressed. Because of the
complexity of the code hopping encryption algorithm, a
change in one bit of the synchronization value will result
in a large change in the actual transmitted code. There
is a relationship (Figure 1-3) between the key values in
EEPROM and how they are used in the encoder. Once
the encoder detects that a button has been pressed,
the encoder reads the button and updates the synchro-
nization counter. The synchronization value is then
combined with the encoder key in the encryption algo-
rithm, and the output is 32 bits of encrypted information.
This data will change with every button press, hence, it
is referred to as the hopping portion of the code word.
The 32-bit hopping code is combined with the button
information and the serial number to form the code
word transmitted to the receiver.
1.3 HCS Decoder Overview
Before a transmitter can be used with a particular
receiver, the transmitter must be ‘learned’ by the
receiver. Upon learning a transmitter, information is
stored by the receiver so that it may track the
transmitter, including the serial number of the
transmitter, the current synchronization value for that
transmitter, and the same encoder key that is used on
the transmitter. If a receiver receives a message of valid
format, the serial number is checked and, if it is from a
learned transmitter, the message is decrypted and the
decrypted synchronization counter is checked against
what is stored. If the synchronization value is verified,
then the button status is checked to see what operation
is needed. Figure 1-3 shows the relationship between
some of the values stored by the receiver and the val-
ues received from the transmitter.
FIGURE 1-2: BASIC OPERATION OF TRANSMITTER (ENCODER)
Transmitted Information
EEPROM Array
Encoder Key
Sync Counter
Serial Number
KEELOQ
Encryption
Algorithm
32 Bits of
Encrypted Data
Serial Number
Button Press
Information
FIGURE 1-3: BASIC OPERATION OF RECEIVER (DECODER)
EEPROM Array
Encoder Key
Sync Counter
Serial Number
Manufacturer’s Code
Check for
Match
KEELOQ
Decryption
Algorithm
Button Press
Information
Serial Number
32-Bits of
Encrypted Data
Received Information
Check for
Match
Decrypted
Synchronization
Counter
© 1997 Microchip Technology Inc.
DS40151C-page 3