English
Language : 

HCS412 Datasheet, PDF (34/44 Pages) Microchip Technology – KEELOQ Code Hopping Encoder and Transponder
HCS412
7.0 PROGRAMMING THE HCS412
The HCS412 requires some parameters programmed
into the device before it can be used. The programming
cycle allows the user to input all 288 bits in a serial data
stream, which are then stored internally in EEPROM.
Programming is initiated by forcing the DATA line high,
after the S2 line has been held high for the appropriate
length of time line (Table 7-1 and Figure 7-2).
A delay is required after entering Program mode while
the automatic bulk erase cycle completes. The bulk
erase writes all EEPROM locations to zeros.
The device is then programmed by clocking in the
EEPROM memory map (Least Significant bit first) 16
bits at a time, using S2 as the clock line and DATA as
the data-in line. After each 16-bit word is loaded, a pro-
gramming delay is required for the internal program
cycle to complete. This delay can take up to Twc.
The HCS412 will signal a ‘write complete’ after writing
each 16-bit word by sending out a series of ACK pulses
TACKH high, TACKL low on DATA. The ACK pulses con-
tinue until S2 is dropped.
Programming verification is allowed only once, after the
programming cycle (Figure 7-3), by reading back the
EEPROM memory map. Reading is done by clocking
the S2 line and reading the data bits on DATA, again
Least Significant bit first. For security reasons, it is not
possible to execute a Verify function without first pro-
gramming the EEPROM.
Note:
To ensure that the device does not acci-
dentally enter Programming mode, DATA
should never be pulled high by the circuit
connected to it. Special care should be
taken when driving PNP RF transistors.
FIGURE 7-1:
CREATION AND STORAGE OF CRYPT KEY DURING PRODUCTION
Production
Programmer
Transmitter
Serial Number
Manufacturer’s
Code
Key
Generation
Algorithm
Crypt
Key
HCS412
EEPROM Array
Serial Number
Crypt Key
Sync Counter
.
.
.
FIGURE 7-2:
PROGRAMMING WAVEFORMS
S2
(Clock)
DATA
(Data)
Enter Program
Mode
TPBW TCLKH
Initiate Data
Polling Here
TDS
TCLKL
T
TPS TPH1
TPH2
TCLKL
TDH
TWC
TT
Bit 0 Bit 1 Bit 2 Bit 3
Bit 14 Bit 15
Ack
Ack
Ack
Data for Word 0
(KEY1_0)
Write Cycle
Complete Here
Calibration Pulses
Repeat for each word (18 times total)
Note 1: S0 and S1 button inputs to be held to ground during the entire programming sequence.
Bit 16 Bit 17
Data for Word 1
(KEY1_1)
FIGURE 7-3:
VERIFY WAVEFORMS
End of Programming Cycle
Beginning of Verify Cycle
DATA
(Data) Bit190 Bit191
Ack
TWC
S2
(Clock)
Data from Word 0
Bit 0 Bit 1 Bit 2 Bit 3
TDV
Bit 14
Bit 15
Bit 16 Bit 17
Note: If a Verify operation is to be done, then it must immediately follow the Program cycle.
Bit190 Bit191
DS41099C-page 34
Preliminary
© 2002 Microchip Technology Inc.