English
Language : 

RFHCS362G_11 Datasheet, PDF (35/54 Pages) Microchip Technology – KEELOQ® Code Hopping Encoder with UHF ASK/FSK Transmitter
7.2 Decoder Operation
Figure 7-2 summarizes normal decoder operation. The
decoder waits until a transmission is received. The
received serial number is compared to the EEPROM
table of learned transmitters to first determine if this
transmitter's use is allowed in the system. If from a
learned transmitter, the transmission is decrypted
using the stored encryption key and authenticated via
the discrimination bits for appropriate encryption key
usage. If the decryption was valid the synchronization
value is evaluated.
FIGURE 7-2:
TYPICAL DECODER
OPERATION
Start
No Transmission
Received
?
Yes
No
Does
Serial Number
Match
?
Yes
Decrypt Transmission
Is
No Decryption
Valid
?
Yes
No
Is
Counter
Within 16
Execute
Yes Command
and
?
Update
Counter
No
Is
No
Counter
Within 32K
?
Yes
Save Counter
in Temp Location
rfHCS362G/362F
7.3 Synchronization with Decoder
(Evaluating the Counter)
The KEELOQ technology patent scope includes a
sophisticated synchronization technique that does not
require the calculation and storage of future codes. The
technique securely blocks invalid transmissions while
providing transparent resynchronization to transmitters
inadvertently activated away from the receiver.
Figure 7-3 shows a 3-partition, rotating synchronization
window. The size of each window is optional but the
technique is fundamental. Each time a transmission is
authenticated, the intended function is executed and
the transmission's synchronization counter value is
stored in EEPROM. From the currently stored counter
value there is an initial "Single Operation" forward win-
dow of 16 codes. If the difference between a received
synchronization counter and the last stored counter is
within 16, the intended function will be executed on the
single button press and the new synchronization coun-
ter will be stored. Storing the new synchronization
counter value effectively rotates the entire synchroniza-
tion window.
A "Double Operation" (resynchronization) window fur-
ther exists from the Single Operation window up to 32K
codes forward of the currently stored counter value. It
is referred to as "Double Operation" because a trans-
mission with synchronization counter value in this win-
dow will require an additional, sequential counter
transmission prior to executing the intended function.
Upon receiving the sequential transmission the
decoder executes the intended function and stores the
synchronization counter value. This resynchronization
occurs transparently to the user as it is human nature
to press the button a second time if the first was unsuc-
cessful.
The third window is a "Blocked Window" ranging from
the double operation window to the currently stored
synchronization counter value. Any transmission with
synchronization counter value within this window will
be ignored. This window excludes previously used,
perhaps code-grabbed transmissions from accessing
the system.
Note:
The synchronization method described in
this section is only a typical implementation
and because it is usually implemented in
firmware, it can be altered to fit the needs
of a particular system.
© 2011 Microchip Technology Inc.
DS41189B-page 35