English
Language : 

RFHCS362F Datasheet, PDF (37/60 Pages) Microchip Technology – Code Hopping Encoder with UHF ASK/FSK Transmitter
7.0 INTEGRATING THE rfHCS362G/
362F INTO THE SYSTEM
Use of the rfHCS362G/362F in a system requires a
compatible decoder. This decoder is typically a micro-
controller with compatible firmware. Microchip will pro-
vide (via a license agreement) firmware routines that
accept transmissions from the rfHCS362G/362F and
decrypt the hopping code portion of the data stream.
These routines provide system designers the means to
develop their own decoding system.
7.1 Learning a Transmitter to a
Receiver
A transmitter must first be ’learned’ by a decoder before
its use is allowed in the system. Several learning strat-
egies are possible, Figure 7-1 details a typical learn
sequence. Core to each, the decoder must minimally
store each learned transmitter’s serial number and cur-
rent synchronization counter value in EEPROM. Addi-
tionally, the decoder typically stores each transmitter’s
unique encryption key. The maximum number of
learned transmitters will therefore be relative to the
available EEPROM.
A transmitter’s serial number is transmitted in the clear
but the synchronization counter only exists in the code
word’s encrypted portion. The decoder obtains the
counter value by decrypting using the same key used
to encrypt the information. The KEELOQ algorithm is a
symmetrical block cipher so the encryption and decryp-
tion keys are identical and referred to generally as the
encryption key. The encoder receives its encryption
key during manufacturing. The decoder is programmed
with the ability to generate an encryption key as well as
all but one required input to the key generation routine;
typically the transmitter’s serial number.
Figure 7-1 summarizes a typical learn sequence. The
decoder receives and authenticates a first transmis-
sion; first button press. Authentication involves gener-
ating the appropriate encryption key, decrypting,
validating the correct key usage via the discrimination
bits and buffering the counter value. A second trans-
mission is received and authenticated. A final check
verifies the counter values were sequential; consecu-
tive button presses. If the learn sequence is success-
fully complete, the decoder stores the learned
transmitter’s serial number, current synchronization
counter value and appropriate encryption key. From
now on the encryption key will be retrieved from
EEPROM during normal operation instead of recalcu-
lating it for each transmission received.
Certain learning strategies have been patented and
care must be taken not to infringe.
rfHCS362G/362F
FIGURE 7-1:
TYPICAL 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
Encryption key
Synchronization counter
Learn
Unsuccessful
Exit
© 2002 Microchip Technology Inc.
Preliminary
DS41189A-page 37