English
Language : 

HCS500 Datasheet, PDF (6/24 Pages) Microchip Technology – KEELOQ CODE HOPPING ENCODER
HCS500
3.2 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 transmis-
sion and decrypts it, using the encoder 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.3 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.
FIGURE 3-2: DECODER OPERATION
Start
No Transmission
Received?
Yes
No
Does
Ser # Check Val
Match?
Yes
Decrypt Transmission
No
Is
decryption
valid?
Yes
Is
counter within
Yes
16?
No
No
Is
counter within
16K?
Execute
Command
and
Update
Counter
Yes
Save Counter
in Temp Location
3.4 Synchronization with Decoder
The KEELOQ technology features a sophisticated
synchronization technique (Figure 3-3) which does not
require the calculation and storage of future codes. If
the stored synchronization counter value for that
particular transmitter and the synchronization counter
value that was just decrypted are within a formatted
window of 16, the counter is stored, and the command
is executed. If the synchronization counter value was
not within the single operation window, but is within the
double operation window of the 16K window, the
transmitted synchronization counter value is stored in a
temporary location, and the decoder goes back to wait-
ing for another transmission. When the next valid
transmission is received, it will check the new
synchronization counter value with the one in tempo-
rary storage. If the two values are sequential, it is
assumed that the counter had just gotten out of the
single operation ‘window’, but is now back in synchroni-
zation, so the new synchronization counter value is
stored, and the command is executed. If a transmitter
has somehow gotten out of the double operation
window, the transmitter will not work and must be
relearned. Since the entire window rotates after each
valid transmission, codes that have been used become
part of the ‘blocked’ (48K) codes and are no longer
valid. This eliminates the possibility of grabbing a previ-
ous code and retransmitting to gain entry.
FIGURE 3-3: SYNCHRONIZATION WINDOW
Entire Window
rotates to eliminate
use of previously
used codes
Blocked
(48K Codes)
Current
Position
Single
Operation
Window
(16 Codes)
Double
Operation
(16K Codes)
DS40153B-page 6
Preliminary
© 1997 Microchip Technology Inc.