English
Language : 

HCS473 Datasheet, PDF (41/68 Pages) Microchip Technology – Code Hopping Encoder and Transponder
5.0 INTEGRATING THE HCS473
INTO A SYSTEM
Use of the HCS473 in a system requires a compatible
decoder. This decoder is typically a microcontroller with
a low frequency coil antenna and radio frequency
receiver. Example firmware routines that accept and
decrypt KEELOQ transmissions can be found in Applica-
tion Notes and the KEELOQ license disk.
5.1 Training the Receiver
In order for a transmitter to be used with a decoder, the
transmitter must first be ‘learned’. When a decoder
learns a transmitter, it is suggested that the decoder
stores the serial number and current synchronization
value in EEPROM. Some learning strategies have
been patented and care must be taken not to infringe
on them. The decoder must keep track of these values
for every transmitter that is learned (see Figure 5-1).
The maximum number of transmitters that can be
learned is limited only by the available EEPROM
memory. The decoder must also store the manufac-
turer’s code in order to learn a transmitter. This value
will not change in a typical system, so it is usually
stored as part of the microcontroller ROM code. Storing
the manufacturer’s code as part of the ROM code
improves security by keeping it off the external bus to
the EEPROM.
HCS473
FIGURE 5-1:
TYPICAL LEARN
SEQUENCE
Enter Learn
Mode
Wait for Reception
of a Valid Code & Seed
Generate Key
Use Generated Key
to Decrypt
Compare Discrimination
Value with Fixed Value
Equal
No
?
Yes
Wait for Reception
of Second Valid Code
(Optional)
Counters No
Sequential
?
Yes
Learn Successful Store:
Serial Number
Encoder Key
Synchronization Counter
Learn
Unsuccessful
Exit
5.2 Decoder Operation
In a typical decoder operation (Figure 5-2), the key
generation on the decoder side is performed by taking
the serial number from a transmission and combining
that with the manufacturer’s code to create the same
secret key that was used by the transmitter. Once the
secret key is obtained, the rest of the transmission can
be decrypted. The decoder waits for a transmission
and immediately can check the serial number to
determine if it is a learned transmitter. If it is, the
encrypted portion of the transmission is decrypted
using the stored key. It uses the discrimination bits to
determine if the decryption was valid. If everything up
to this point is valid, the synchronization value
is evaluated.
 2002 Microchip Technology Inc.
Preliminary
DS40035C-page 39