
HCS509
DS40147A-page 6
Preliminary
1996 Microchip Technology Inc.
5.0
MODE CONFIGURATION
The HCS509 decoder has two modes of operation. The
nonlearning mode supports up to 4 transmitters and
the learning mode supports up to 6 transmitters.
The nonlearning mode must be used where transmit-
ters are preprogrammed at the factory and learning
capability is not required. In this mode there need not
be a relationship between the serial number and the
decryption key.
The learning mode does not store the decryption key
but derives it from the serial number and manufac-
terer’s key each time it is required.
In nonlearning mode, the serial number, synchroniza-
tion counter, and decryption key must be programmed
for each transmitter in the system. The manufacturer’s
key is not required in preprogram mode.
In learning mode, the only information that needs to be
programmed is the manufacturer’s key. Transmitters are
learned into the HCS509 through the normal learn pro-
cedure.
6.0
DECODER OPERATION
6.1
Learning a Transmitter to a Receiver
The learning mode is selected when the mode pin is
low. In order for a transmitter to be used with a decoder,
the transmitter must first be ‘learned’. When a transmit-
ter is learned to a decoder, the decoder stores the serial
number and current synchronization value in EEPROM.
The decoder must keep track of these values for every
transmitter that is learned (Figure 6-1). The maximum
number of transmitters that can be learned is five and
one master transmitter. The decoder must also store
the manufacturer’s key in order to learn a transmitter
and will typically be the same for all decoders in a sys-
tem.
In learning mode the decoder assigns 6 memory slots.
A learning pointer is used to point to the next learning
position. The learning pointer can be set up to point to
the first (master) memory slot. If LRN_PTR is initialized
to the master position, the first transmitter learned will
learn in the master position. This transmitter learned
into the system will then become the master transmit-
ter. If initialized to the transmitter 1 position, the first
transmitter will learn into transmitter 1. Transmitters will
be learned into the memory slots until position five is
reached. The learning pointer then wraps back to trans-
mitter 1. Transmitters can be erased by repeated learn-
ing. However, the master transmitter will be fixed into
the system and cannot be erased.
FIGURE 6-1:
ASSIGNMENT OF MEMORY
SLOTS
It must be stated that various patents exist on learning
strategies and care must be taken not to infringe these
patents when using the HCS509 in a system.
6.1.1
LEARNING PROCEDURE
Learning is activated by taking the LRNIN input low for
longer than 32 ms. This input requires an external pull-
up resistor. The learn input can be either pulled low
using a manual learn button or by feeding the MASTER
output inverted back to the LRNIN input (Master learn
activation).
Master
Transmitter 1
Transmitter 2
Transmitter 3
Transmitter 4
Transmitter 5