English
Language : 

HCS410 Datasheet, PDF (24/36 Pages) Microchip Technology – KEELOQ CODE HOPPING ENCODER AND TRANSPONDER
HCS410
4.2 Learning an HCS410 to a Receiver
In order for a transmitter to be used with a decoder, the
transmitter must first be ‘learned’. Several learning
strategies can be followed in the decoder implementa-
tion. When a transmitter is learned to a decoder, it is
suggested that the decoder stores the serial number
and current synchronization counter value (synchroni-
zation counter stored in CH Mode only) in EEPROM.
The decoder must keep track of these values for every
transmitter that is learned (Figure 4-2 and Figure 4-3).
FIGURE 4-2: TYPICAL CH MODE LEARN
SEQUENCE
Enter Learn
Mode
Wait for Reception
of a Valid Code
Generate Key
from Serial Number
Use Generated Key
to Decrypt
Compare Discrimination
Value with Fixed Value
Equal
No
?
Yes
Wait for Reception
of Second Valid Code
Use Generated Key
to Decrypt
Compare Discrimination
Value with Fixed Value
Equal
No
?
Yes
Counters No
Sequential
?
Yes
Learn successful Store:
Serial number
Encoder key
Synchronization counter
Learn
Unsuccessful
Exit
The maximum number of transmitters that can be
learned is only a function of how much EEPROM
memory storage is available. The decoder must also
store the manufacturer’s code in order to learn an
HCS410, although this value will not change in a typical
system so it is usually stored as part of the microcon-
troller ROM code. Storing the manufacturer’s code as
part of the ROM code is also better for security rea-
sons.
FIGURE 4-3: TYPICAL IFF LEARN
SEQUENCE
Enter Learn
Mode
Wait for token
to be detected
Read
Serial Number
Generate Key
From Serial
Number
Perform IFF
with Token
Compare Token
and expected
response
Token and
Response
No
Equal?
Yes
Learn successful
Store:
Serial number
Encoder key
Exit
DS40158C-page 24
Preliminary
© 1997 Microchip Technology Inc.