English
Language : 

HCS500_15 Datasheet, PDF (6/42 Pages) Microchip Technology – KEELOQ® Code Hopping Decoder
HCS500
The following checks are performed by the decoder to
determine if the transmission is valid during learn:
• The first code word is checked for bit integrity
• The second code word is checked for bit integrity
• The crypt key is generated according to the
selected algorithm
• The hopping code is decrypted
• The discrimination value is checked
• If all the checks pass, the key, serial number
check value, and synchronization counter values
are stored in EEPROM memory
Figure 3-1 shows a flow chart of the learn sequence.
FIGURE 3-1: LEARN SEQUENCE
Enter Learn
Mode
Wait for Reception
of a Valid Code
Wait for Reception
of Second
Non-Repeated
Valid Code
Generate Key
from Serial Number/
Seed Value
Use Generated Key
to Decrypt
Compare Discrimination
Value with Serial Number
Equal? No
Yes
Learn successful. Store:
Serial number check value
crypt key
Sync. counter value
Learn
Unsuccessful
Exit
3.3 Validation of Codes
The decoder waits for a transmission and checks the
serial number to determine if it is a learned transmitter.
If it is, it takes the code hopping portion of the
transmission and decrypts it, using the crypt key. It
uses the discrimination value to determine if the
decryption was valid. If everything up to this point is
valid, the synchronization counter value is evaluated.
3.4 Validation Steps
Validation consists of the following steps:
1. Search EEPROM to find the Serial Number
Check Value Match
2. Decrypt the Hopping Code
3. Compare the 10 bits of the discrimination value
with the lower 10 bits of serial number
4. Check if the synchronization counter value falls
within the first synchronization window.
5. Check if the synchronization counter value falls
within the second synchronization window.
6. If a valid transmission is found, update the
synchronization counter, else use the next
transmitter block, and repeat the tests.
DS40000153E-page 6
 2001-2015 Microchip Technology Inc.