English
Language : 

HCS500-I Datasheet, PDF (12/34 Pages) Microchip Technology – KEELOQ Code Hopping Decoder
HCS500
4.2.7 ACTIVATE LEARN
The activate learn command (Figure 4-6) is used to
activate a transmitter learning sequence on the
decoder. The command consists of a Command mode
activation sequence, a command byte, and two dummy
bytes. The decoder will respond by taking the data line
high to acknowledge that the command was valid and
that learn is active.
Upon reception of the first transmission, the decoder
will respond with a learn status message (Figure 4-7).
During learn, the decoder will acknowledge the recep-
tion of the first transmission by taking the data line high
for 60 ms. The controlling microcontroller can clock out
at most eight bits, which will all be zeros. All of the bits
of the status byte are zero, and this is used to distin-
guish between a learn time-out status string and the
first transmission received string. The controlling micro-
controller must ensure that the clock line does not go
high 60 ms after the falling edge of the data line, for this
will terminate learn.
FIGURE 4-6: LEARN MODE ACTIVATION
CLK
Upon reception of the second transmission, the
decoder will respond with a learn status message
(Figure 4-8).
The learn status message after the second transmis-
sion consists of the following:
• 1 START bit.
• The function code [S3:S0] of the message is zero,
indicating that this is a status string.
• The RESULT bit indicates the result of the learn
sequence. The RESULT bit is set if successful
and cleared otherwise.
• The OVR bit will indicate whether an exiting trans-
mitter is over written. The OVR bit will be set if an
existing transmitter is learned over.
• The [CNT3…CNT0] bits will indicate the number
of transmitters learned on the decoder.
• The [TX3…TX0] bits indicate the block number
used during the learning of the transmitter.
TLRN
TACK
TRESP
µC DATA
LSB
MSB LSB
MSB LSB
MSB
TACK2
Decoder
DATA
Start Command
A
B
Command Byte
C
Dummy Byte
Dummy Byte
D
E
Acknowledge
F
FIGURE 4-7:
LEARN STATUS MESSAGE AFTER FIRST TRANSMISSION
TCA
TCLL
TCLKH
TDS
CLK
TCLA
TCLH
TCLKL
Decoder
Data
TDHI
0
Command Request
A
B
0 00 0 0 00
Status Byte
C
FIGURE 4-8:
CLK
TCLA
LEARN STATUS MESSAGE AFTER SECOND TRANSMISSION
TCA
TCLL
TCLKL
TCLKH
TDS
TCLH
TDHI
Decoder
Data
0 OVR RSLT 0
Communications Request
A
B
0 0 0 1 CNT0
Learn Status Bits
CNT3 TX0
TX3 RX0 RX1
RX62 RX63
Decoded Tx
Ci
Cii
DS40153C-page 12
© 2002 Microchip Technology Inc.