English
Language : 

HCS512_11 Datasheet, PDF (10/34 Pages) Microchip Technology – KEELOQ® Code Hopping Decoder system and high security
HCS512
6.2 Programming the Manufacturer’s
Code
The manufacturer’s code must be programmed into
EEPROM memory through the synchronous program-
ming interface using the DATA and CLK lines. Provision
must be made for connections to these pins if the
decoder is going to be programmed in circuit.
Programming mode is activated if the CLK is low for at
least 1 ms and then goes high within 64 ms after power-
up, stays high for longer than 8 ms but not longer than
128 ms. After entering Programming mode the 64-bit
manufacturer’s code, 8-bit configuration byte, and 8-bit
checksum is sent to the device using the synchronous
interface. After receiving the 80-bit message the check-
sum is verified and the information is written to
EEPROM. If the programming operation was success-
ful, the HCS512 will respond with an Acknowledge
pulse.
After programming the manufacturer’s code, the
HCS512 decoder will automatically activate an
Erase All function, removing all transmitters from the
system.
6.3 Download Format
The manufacturer’s code and configuration byte must
be downloaded Least Significant Byte, Least Signifi-
cant bit first as shown in Table 6-3.
6.4 Checksum
The checksum is used by the HCS512 to check that the
data downloaded was correctly received before pro-
gramming the data. The checksum is calculated so that
the 10 bytes added together (discarding the overflow
bits) is zero. The checksum can be calculated by add-
ing the first 9 bytes of data together and subtracting the
result from zero. Throughout the calculation the over-
flow is discarded.
Given a manufacturer’s code of 01234567-
89ABCDEF16 and a Configuration Word of 116, the
checksum is calculated as shown in Figure 6-1. The
checksum is 3F16.
6.5 Test Transmitter
The HCS512 decoder will automatically add a test
transmitter each time an Erase All Function is done. A
test transmitter is defined as a transmitter with a serial
number of zero. After an Erase All, the test transmitter
will always work without learning and will not check the
synchronization counter of the transmitter. Learning of
any new transmitters will erase the test transmitter.
Note 1: A transmitter with a serial number of zero
cannot be learned. Learn will fail after the
first transmission.
2: Always learn at least one transmitter after
an Erase All sequence. This ensures that
the test transmitter is erased.
TABLE 6-3: DOWNLOAD DATA
Byte 9
Check-
sum
Byte 8
Config
Byte 7
Man
Key_7
Byte 6
Man
Key_6
Byte 5
Man
Key_5
Byte 4
Man
Key_4
Byte 3
Man
Key_3
Byte 2
Man
Key_2
Byte 1
Man
Key_1
Byte 0
Man
Key_0
FIGURE 6-1: CHECKSUM CALCULATION
Byte 0, right-most bit downloaded first.
0116 + 2316 = 246
2416 + 4516 = 6916
6916 + 6716 = D016
D016 + 8916 = 15916
5916 + AB16 = 10416 (Carry is discarded)
0416 + CD16 = D116 (Carry is discarded)
D116 + EF16 = 1C016
C016 + 116 = C116 (Carry is discarded)
(FF16 - C116) + 116 = 3F16
DS40151E-page 10
© 2011 Microchip Technology Inc.