HCS200 - KeeLoQ Code Hopping Encoder

/var/www/html/datasheet/sites/default/files/pdfhtml_dummy/40138D-html.html
background image

© 2011 Microchip Technology Inc.

DS40138D-page 1

HCS200

FEATURES

Security

• Programmable 28-bit serial number
• Programmable 64-bit crypt key
• Each transmission is unique
• 66-bit transmission code length
• 32-bit hopping code
• 28-bit serial number, 4-bit button status, 

low battery indicator transmitted

• Crypt keys are read protected

Operating

• 3.5–13.0V operation
• Three button inputs - seven functions available 
• Selectable baud rate
• Automatic code word completion
• Low battery signal transmitted to receiver
• Non-volatile synchronization data

Other

• Easy to use programming interface
• On-chip EEPROM
• On-chip oscillator and timing components
• Button inputs have internal pull-down resistors
• Low external component cost

Typical Applications

The HCS200 is ideal for Remote Keyless Entry (RKE)
applications. These applications include:
• Fixed code replacement
• Automotive RKE systems
• Automotive alarm systems
• Automotive immobilizers
• Gate and garage door openers 
• Identity tokens
• Burglar alarm systems

DESCRIPTION

The HCS200 from Microchip Technology Inc. is a code
hopping encoder designed primarily for Remote Key-
less Entry (RKE) systems. The device utilizes the
K

EE

L

OQ®

 code hopping technology, incorporating high

security, a small package outline and low cost. The
HCS200 is a perfect replacement of fixed code devices
in unidirectional remote keyless entry systems and
access control systems.

PACKAGE TYPES

BLOCK DIAGRAM

The HCS200 operates over a wide voltage range of
3.5 volts to 13.0 volts and has three button inputs in an
8-pin configuration. This allows the system designer
the freedom to implement up to seven functions. The
only components required for device operation are the
buttons and RF circuitry, allowing a very low
system cost.

1

2

3

4

8

7

6

5

S0

S1

S2

V

DD

PWM

V

SS

PDIP, SOIC

NC

NC

HCS200

Vss

V

DD

Oscillator

Controller

Power

latching

and

switching

Button input port

32-bit shift register

Encoder

EEPROM

PWM   

S2 S1 S0

RESET circuit

K

EE

L

OQ®

 Code Hopping Encoder

/var/www/html/datasheet/sites/default/files/pdfhtml_dummy/40138D-html.html
background image

HCS200

DS40138D-page 2

© 2011 Microchip Technology Inc.

The HCS200 combines a 32-bit hopping code,
generated by a non-linear encryption algorithm, with a
28-bit serial number and 6 information bits to create a
66-bit code word. The code word length eliminates the
threat of code scanning and the code hopping mecha-
nism makes each transmission unique, thus rendering
code capture and resend schemes useless.
The crypt key, serial number and configuration data are
stored in an EEPROM array which is not accessible via
any external connection. The EEPROM data is pro-
grammable but read-protected. The data can be veri-
fied only after an automatic erase and programming
operation. This protects against attempts to gain
access to keys or manipulate synchronization values.
The HCS200 provides an easy to use serial interface
for programming the necessary keys, system parame-
ters and configuration data.

1.0

SYSTEM OVERVIEW

Key Terms

The following is a list of key terms used throughout this
data sheet. For additional information on K

EE

L

OQ

 and

Code Hopping, refer to Technical Brief 3 (TB003).

• RKE - Remote Keyless Entry

• Button Status - Indicates what button input(s) 

activated the transmission. Encompasses the 4 
button status bits S3, S2, S1 and S0 (

Figure 4-2).

• Code Hopping - A method by which a code, 

viewed externally to the system, appears to 
change unpredictably each time it is transmitted.

• Code word - A block of data that is repeatedly 

transmitted upon button activation (

Figure 4-1).

• Transmission - A data stream consisting of 

repeating code words (

Figure 9-2).

• Crypt key - A unique and secret 64-bit number 

used to encrypt and decrypt data. In a symmetri-
cal block cipher such as the K

EE

L

OQ

 algorithm, 

the encryption and decryption keys are equal and 
will therefore be referred to generally as the crypt 
key.

• Encoder - A device that generates and encodes 

data.

• Encryption Algorithm - A recipe whereby data is 

scrambled using a crypt key. The data can only be 
interpreted by the respective decryption algorithm 
using the same crypt key.

• Decoder - A device that decodes data received 

from an encoder.

• Decryption algorithm - A recipe whereby data 

scrambled by an encryption algorithm can be 
unscrambled using the same crypt key.

• Learn – 

Learning involves the receiver calculating 

the transmitter’s appropriate crypt key, decrypting 
the received hopping code and storing the serial 
number, synchronization counter value and crypt 
key in EEPROM. The K

EE

L

OQ

 product family facil-

itates several learning strategies to be imple-
mented on the decoder. The following are 
examples of what can be done. 

Simple Learning

The receiver uses a fixed crypt key, common 
to all components of all systems by the same 
manufacturer, to decrypt the received code 
word’s encrypted portion.

Normal Learning

The receiver uses information transmitted 
during normal operation to derive the crypt 
key and decrypt the received code word’s 
encrypted portion.

Secure Learn

The transmitter is activated through a special 
button combination to transmit a stored 60-bit 
seed value used to generate the transmitter’s 
crypt key. The receiver uses this seed value 
to derive the same crypt key and decrypt the 
received code word’s encrypted portion. 

• Manufacturer’s code – A unique and secret 64-

bit number used to generate unique encoder crypt 
keys. Each encoder is programmed with a crypt 
key that is a function of the manufacturer’s code. 
Each decoder is programmed with the manufac-
turer code itself.

The HCS200 code hopping encoder is designed specif-
ically for keyless entry systems; primarily vehicles and
home garage door openers. The encoder portion of a
keyless entry system is integrated into a transmitter,
carried by the user and operated to gain access to a
vehicle or restricted area. The HCS200 is meant to be
a cost-effective yet secure solution to such systems,
requiring very few external components (Figure 2-1).
Most low-end keyless entry transmitters are given a
fixed identification code that is transmitted every time a
button is pushed. The number of unique identification
codes in a low-end system is usually a relatively small
number. These shortcomings provide an opportunity
for a sophisticated thief to create a device that ‘grabs’
a transmission and retransmits it later, or a device that
quickly ‘scans’ all possible identification codes until the
correct one is found.
The HCS200, on the other hand, employs the K

EE

L

OQ

code hopping technology coupled with a transmission
length of 66 bits to virtually eliminate the use of code
‘grabbing’ or code ‘scanning’. The high security level of
the HCS200 is based on the patented K

EE

L

OQ 

technol-

ogy. A block cipher based on a block length of 32 bits
and a key length of 64 bits is used. The algorithm
obscures the information in such a way that even if the
transmission information (before coding) differs by only
one bit from that of the previous transmission, the next

/var/www/html/datasheet/sites/default/files/pdfhtml_dummy/40138D-html.html
background image

© 2011 Microchip Technology Inc.

DS40138D-page 3

HCS200

coded transmission will be completely different. Statis-
tically, if only one bit in the 32-bit string of information
changes, greater than 50 percent of the coded trans-
mission bits will change.
As indicated in the block diagram on page one, the
HCS200 has a small EEPROM array which must be
loaded with several parameters before use; most often
programmed by the manufacturer at the time of produc-
tion. The most important of these are:
• A 28-bit serial number, typically unique for every 

encoder

• A crypt key
• An initial 16-bit synchronization value
• A 16-bit configuration value

The crypt key generation typically inputs the transmitter
serial number and 64-bit manufacturer’s code into the
key generation algorithm (Figure 1-1). The manufac-
turer’s code is chosen by the system manufacturer and
must be carefully controlled as it is a pivotal part of the
overall system security. 

FIGURE 1-1:

CREATION AND STORAGE OF CRYPT KEY DURING PRODUCTION

The 16-bit synchronization counter is the basis behind
the transmitted code word changing for each transmis-
sion; it increments each time a button is pressed. Due
to the code hopping algorithm’s complexity, each incre-
ment of the synchronization value results in greater
than 50% of the bits changing in the transmitted code
word.
Figure 1-2 shows how the key values in EEPROM are
used in the encoder. Once the encoder detects a button
press, it reads the button inputs and updates the syn-
chronization counter. The synchronization counter and
crypt key are input to the encryption algorithm and the
output is 32 bits of encrypted information. This data will
change with every button press, its value appearing
externally to ‘randomly hop around’, hence it is referred
to as the hopping portion of the code word. The 32-bit
hopping code is combined with the button information
and serial number to form the code word transmitted to
the receiver. The code word format is explained in
greater detail in Section 4.0. 
A receiver may use any type of controller as a decoder,
but it is typically a microcontroller with compatible firm-
ware that allows the decoder to operate in conjunction
with an HCS200 based transmitter. Section 7.0
provides detail on integrating the HCS200 into a sys-
tem.

A transmitter must first be ‘learned’ by the receiver
before its use is allowed in the system. Learning
includes calculating the transmitter’s appropriate crypt
key, decrypting the received hopping code and storing
the serial number, synchronization counter value and
crypt key in EEPROM.
In normal operation, each received message of valid
format is evaluated. The serial number is used to deter-
mine if it is from a learned transmitter. If from a learned
transmitter, the message is decrypted and the synchro-
nization counter is verified. Finally, the button status is
checked to see what operation is requested. Figure 1-3
shows the relationship between some of the values
stored by the receiver and the values received from
the transmitter. 

Transmitter 

Manufacturer’s 

Serial Number

Code

Crypt

 Key

Key

Generation

Algorithm

Serial Number

Crypt Key
Sync Counter

.

.

.

HCS200

Production

Programmer

EEPROM Array

/var/www/html/datasheet/sites/default/files/pdfhtml_dummy/40138D-html.html
background image

HCS200

DS40138D-page 4

© 2011 Microchip Technology Inc.

FIGURE 1-2:

BUILDING THE TRANSMITTED CODE WORD (ENCODER)

FIGURE 1-3:

BASIC OPERATION OF RECEIVER (DECODER) 

NOTE: Circled numbers indicate the order of execution.

Button Press

Information

EEPROM Array

32 Bits  

Encrypted Data

Serial Number

Transmitted Information

Crypt Key

Sync Counter

Serial Number

K

EE

L

OQ®

Encryption

Algorithm

Button Press

 Information

EEPROM Array

Manufacturer Code 

32 Bits of 

Encrypted Data

Serial Number

Received Information

 

  Decrypted

Synchronization

        

Counter

     Check for

     Match

Sync Counter

Serial Number

K

EE

L

OQ®

Decryption

Algorithm

1

3

4

     Check for

    Match

2

    Perform Function

        Indicated by

        button press 

5

Crypt Key

/var/www/html/datasheet/sites/default/files/pdfhtml_dummy/40138D-html.html
background image

© 2011 Microchip Technology Inc.

DS40138D-page 5

HCS200

2.0

ENCODER OPERATION

As shown in Figure 2-1, the HCS200 is a simple device
to use. It requires only the addition of buttons and RF
circuitry for use as the transmitter in your security appli-
cation. A description of each pin is described in
Table 2-1.

FIGURE 2-1:

TYPICAL CIRCUITS

TABLE 2-1:

PIN DESCRIPTIONS

The HCS200 will wake-up upon detecting a button
press and delay approximately 10 ms for button
debounce (Figure 2-2). The synchronization counter,
discrimination value and button information will be
encrypted to form the hopping code. The hopping code
portion will change every transmission, even if the
same button is pushed again. A code word that has
been transmitted will not repeat for more than 64K
transmissions. This provides more than 18 years of use
before a code is repeated; based on 10 operations per
day. Overflow information sent from the encoder can be
used to extend the number of unique transmissions to
more than 192K.
If in the transmit process it is detected that a new but-
ton(s) has been pressed, a RESET will immediately
occur and the current code word will not be completed.
Please note that buttons removed will not have any
effect on the code word unless no buttons remain
pressed; in which case the code word will be completed
and the power-down will occur.

FIGURE 2-2:

ENCODER OPERATION 

Note:

When V

DD

 > 9.0V and driving low capaci-

tive loads, a resistor with a minimum value
of 50

Ω should be used in line with V

DD

.

This prevents clamping of PWM at 9.0V in
the event of PWM overshoot.

Name

Pin

Number

Description

S0

1

Switch input 0

S1

2

Switch input 1

S2

3

Switch input 2/Clock pin when in 
Programming mode

V

SS

5

Ground reference

PWM

6

Pulse Width Modulation (PWM) 
output pin/Data pin for Program-
ming mode

V

DD

8

Positive supply voltage 

B0

Tx out

S0

S1
S2

V

DD

PWM

Vss

2 button remote control

B1

Tx out

S0

S1
S2

V

DD

PWM

Vss

4 button remote control (Note

1

)

B3 B2 B1 B0

+12V

(Note

2

)

+12V

NC

NC

NC

NC

(Note 

2

)

Note

1: Up to 7 functions can be implemented by pressing

more than one button simultaneously or by using a
suitable diode array.

2: Resistor (R) is recommended for current limiting.

Power-Up

RESET and Debounce Delay

     

 

(10 ms)

Sample Inputs

Update Sync Info 

Encrypt With

Load Transmit Register 

Buttons

Added

?

All

Buttons

Released

?

(A button has been pressed) 

 Transmit 

Stop

No

Yes

No

Yes

Crypt Key

 Complete Code 

Word Transmission 

/var/www/html/datasheet/sites/default/files/pdfhtml_dummy/40138D-html.html
background image

HCS200

DS40138D-page 6

© 2011 Microchip Technology Inc.

3.0

EEPROM MEMORY 
ORGANIZATION

The HCS200 contains 192 bits (12 x 16-bit words) of
EEPROM memory (Table 3-1). This EEPROM array is
used to store the crypt key information, synchronization
value, etc. Further descriptions of the memory array is
given in the following sections.

TABLE 3-1:

EEPROM MEMORY MAP 

3.1

Key_0 - Key_3 (64-Bit Crypt Key)

The 64-bit crypt key is used to create the encrypted
message transmitted to the receiver. This key is calcu-
lated and programmed during production using a key
generation algorithm. The key generation algorithm
may be different from the K

EE

L

OQ 

algorithm. Inputs to

the key generation algorithm are typically the transmit-
ter’s serial number and the 64-bit manufacturer’s code.
While the key generation algorithm supplied from
Microchip is the typical method used, a user may elect
to create their own method of key generation. This may
be done providing that the decoder is programmed with
the same means of creating the key for
decryption purposes.

3.2

SYNC (Synchronization Counter)

This is the 16-bit synchronization value that is used to
create the hopping code for transmission. This value
will increment after every transmission.

3.3

 Reserved

Must be initialized to 0000H.

3.4

SER_0, SER_1 
(Encoder Serial Number) 

SER_0 and SER_1 are the lower and upper words of
the device serial number, respectively. Although there
are 32 bits allocated for the serial number, only the
lower order 28 bits are transmitted. The serial number
is meant to be unique for every transmitter. 

3.5

SEED_0, SEED_1 (Seed Word)

The 2-word (32-bit) seed code will be transmitted when
all three buttons are pressed at the same time (see
Figure 4-2). This allows the system designer to imple-
ment the secure learn feature or use this fixed code
word as part of a different key generation/tracking pro-
cess.

3.6

Configuration Word

The 16-bit Configuration Word stored in the EEPROM
array contains information required to form the
encrypted portion of the transmission, as well as the
device option configurations. The following sections
further explain these bits.

TABLE 3-2:

CONFIGURATION WORD 

3.6.1

DISCRIMINATION VALUE 
(DISC0 TO DISC11) 

The discrimination value aids the post-decryption
check on the decoder end. It may be any value, but in
a typical system it will be programmed as the 12 Least
Significant bits of the serial number. Values other than
this must be separately stored by the receiver when a
transmitter is learned. The discrimination bits are part
of the information that form the encrypted portion of
the transmission (Figure 4-2). After the receiver has
decrypted a transmission, the discrimination bits are

WORD 

ADDRESS

MNEMONIC

DESCRIPTION

0

KEY_0 

64-bit crypt key 
(word 0) LSb’s

1

KEY_1

64-bit crypt key 
(word 1)

2

KEY_2

64-bit crypt key 
(word 2)

3

KEY_3 

64-bit crypt key 
(word 3) MSb’s

4

SYNC

16-bit synchronization 
value 

5

Reserved

Set to 0000H

6

SER_0

Device Serial Number 
(word 0) LSb’s

7

SER_1

Device Serial Number 
(word 1) MSb’s

8

SEED_0

Seed Value (word 0)

9

SEED_1

Seed Value (word 1)

10

Reserved

Set to 0000H

11

CONFIG

Configuration Word

Bit Number

Bit Description

0

Discrimination Bit 0

1

Discrimination Bit 1

2

Discrimination Bit 2

3

Discrimination Bit 3

4

Discrimination Bit 4

5

Discrimination Bit 5

6

Discrimination Bit 6

7

Discrimination Bit 7

8 Discrimination 

Bit 

8

9

Discrimination Bit 9

10

Discrimination Bit 10

11

Discrimination Bit 11

12

Low Voltage Trip Point Select (V

LOW

 

SEL

)

13

Baudrate Select Bit 0 (BSL0)

14

Reserved, set to 0

15

Reserved, set to 0

/var/www/html/datasheet/sites/default/files/pdfhtml_dummy/40138D-html.html
background image

© 2011 Microchip Technology Inc.

DS40138D-page 7

HCS200

checked against the receiver’s stored value to verify
that the decryption process was valid. If the discrimi-
nation value was programmed as the 12 LSb’s of the
serial number then it may merely be compared to the
respective bits of the received serial number; saving
EEPROM space.

3.6.2

BAUD RATE SELECT BIT (BSL0)

BSL0 selects the speed of transmission and the code
word blanking. Table 3-3 shows how the bit is used to
select the different baud rates and Section 5.2 provides
detailed explanation in code word blanking.

TABLE 3-3:

BAUD RATE SELECT

3.6.3

LOW VOLTAGE TRIP POINT 
SELECT (V

LOW

 

SEL

)

The low voltage trip point select bit tells the HCS200
what V

DD

 level is being used. This information will be

used by the device to determine when to send the volt-
age low signal to the receiver. When this bit is set to a
one, the V

DD

 level is assumed to be operating from a

9.0 volt or 12.0 volt V

DD

 level. If the bit is set to zero,

the V

DD

 level is assumed to be 6.0 volts. Refer to

Figure 3-1 for voltage trip point.

FIGURE 3-1:

VOLTAGE TRIP POINTS 
BY CHARACTERIZATION

4.0

TRANSMITTED WORD 

4.1

Code Word Format

The HCS200 code word is made up of several parts
(Figure 4-1). Each code word contains a 50% duty
cycle preamble, a header, 32 bits of encrypted data and
34 bits of fixed data followed by a guard period before
another code word can begin. Refer to Table 9-3 for
code word timing.   

4.2

Code Word Organization

The HCS200 transmits a 66-bit code word when a
button is pressed. The 66-bit word is constructed from
a Fixed Code portion and an Encrypted Code portion
(Figure 4-2).
The 32 bits of Encrypted Data are generated from 4
button bits, 12 discrimination bits and the 16-bit sync
value. The encrypted portion alone provides up to four
billion changing code combinations.
The 34 bits of Fixed Code Data are made up of 1 sta-
tus bit, 1 fixed bit, 4 button bits and the 28-bit serial
number. The fixed and encrypted sections combined
increase the number of code combinations to 7.38 x
10

19

4.3

Synchronous Transmission Mode

Synchronous Transmission mode can be used to clock
the code word out using an external clock.
To enter Synchronous Transmission mode, the Pro-
gramming mode start-up sequence must be executed
as shown in Figure 4-3. If either S1 or S0 is set on the
falling edge of S2, the device enters Synchronous
Transmission mode. In this mode it functions as a nor-
mal transmitter, with the exception that the timing of the
PWM data string is controlled externally and that 16
extra reserved bits are transmitted at the end of the
code word. The reserved bits can be ignored. The but-
ton code will be the S0, S1 value at the falling edge of
S2. The timing of the PWM data string is controlled by
supplying a clock on S2 and should not exceed 20 kHz.
When in Synchronous Transmission mode S2 should
not be toggled until all internal processing has been
completed as shown in Figure 4-3.

BSL0

Basic Pulse 

Element

Code Words 

Transmitted

0

400 

μs

All

1

200 

μs

1 out of 2

-40

20

40

100

8.5

7.5

8.0

7.0

9.0

V

LOW

Temp (C)

Volts (V)

V

LOW

 

SEL

 = 1

-20

0

60

80

2.5

3.0

3.5

4.0

V

LOW

 

SEL

 = 0

4.5

5.0

5.5

Max

Min

Max

Min

/var/www/html/datasheet/sites/default/files/pdfhtml_dummy/40138D-html.html
background image

HCS200

DS40138D-page 8

© 2011 Microchip Technology Inc.

FIGURE 4-1:

CODE WORD FORMAT 

FIGURE 4-2:

CODE WORD ORGANIZATION

FIGURE 4-3:

SYNCHRONOUS TRANSMISSION MODE

FIGURE 4-4:

CODE WORD ORGANIZATION (SYNCHRONOUS TRANSMISSION MODE)  

LOGIC ‘0’

LOGIC ‘1’

Bit

Period

Preamble

Header

Encrypted Portion

 of Transmission

Fixed Portion of

Transmission

 

Guard

 

Time

T

P

T

H

T

HOP

T

FIX

T

G

T

E

T

E

T

E

50% Duty Cycle

    

Fixed

(1-bit)

V

LOW

(1-bit)

Button 

Status

S2 S1 S0 S3 

Serial Number

(28 bits)

Button 

Status

S2 S1 S0 S3 

Discrimination 

bits

(12 bits)

Sync Counter

(16 bits)

Fixed

(1-bit)

V

LOW

(1-bit)

Button 

Status

1   1  1  1  

Serial Number

(28 bits)

SEED

(32 bits)

34 bits of Fixed Portion

32 bits of Encrypted Portion

66 Data bits

Transmitted

LSb first.

LSb

MSb

MSb

LSb

SEED replaces Encrypted Portion when all button inputs are activated at the same time.

“01,10,11”

PWM

S2

S[1:0]

T

PS

T

PH

1 T

PH

2

t = 50 ms

Preamble

Header

Data

 

Reserved

(16 bits)

Padding

(2 bits)

Button 

Status

S2 S1 S0 S3 

Serial Number

(28 bits)

Button 

Status

S2 S1 S0 S3 

Discrimina-

tion bits

(12 bits)

Sync Counter

(16 bits)

82 Data bits

Transmitted

LSb first.

LSb

MSb

 Fixed Portion

Encrypted Portion

/var/www/html/datasheet/sites/default/files/pdfhtml_dummy/40138D-html.html
background image

© 2011 Microchip Technology Inc.

DS40138D-page 9

HCS200

5.0

SPECIAL FEATURES

5.1

Code Word Completion 

The code word completion feature ensures that entire
code words are transmitted, even if the button is
released before the code word is complete. If the but-
ton is held down beyond the time for one code word,
multiple code words will result. If another button is acti-
vated during a transmission, the active transmission
will be aborted and a new transmission will begin using
the new button information. 

5.2

 Blank Alternate Code Word 

Federal Communications Commission (FCC) part 15
rules specify the limits on worst case average funda-
mental power and harmonics that can be transmitted in
a 100 ms window. For FCC approval purposes, it may
therefore be advantageous to minimize the transmis-
sion duty cycle. This can be achieved by minimizing the
duty cycle of the individual bits as well as by blanking
out consecutive code words. Blank Alternate Code
Word (BACW) may be used to reduce the average
power of a transmission by transmitting only every sec-
ond code word (Figure 5-1). This is a selectable feature
that is determined in conjunction with the baud rate
selection bit BSL0. 

Enabling the BACW option may likewise allow the user
to transmit a higher amplitude transmission as the time
averaged power is reduced. BACW effectively halves
the RF on time for a given transmission so the RF out-
put power could theoretically be doubled while main-
taining the same time averaged output power.

5.3

Seed Transmission

In order to increase the level of security in a system, it
is possible for the receiver to implement what is known
as a secure learn function. This can be done by utilizing
the seed value stored in EEPROM, transmitted only
when all three button inputs are pressed at the same
time (Table 5-1). Instead of the normal key generation
inputs being used to create the crypt key, this seed
value is used. 

5.4

V

LOW

: Voltage LOW Indicator 

The V

LOW

 signal is transmitted so the receiver can give

an indication to the user that the transmitter battery is
low. The V

LOW

 bit is included in every transmission

(Figure 4-2 and Figure 9-5) and will be transmitted as a
zero if the operating voltage is above the low voltage
trip point. Refer to Figure 4-2. The trip point is select-
able based on the battery voltage being used. See Sec-
tion 3.6.3 for a description of how the low voltage trip
point is configured.

FIGURE 5-1:

BLANK ALTERNATE CODE WORD (BACW) 

TABLE 5-1:

PIN ACTIVATION TABLE

External

Internal

S2

S1

S0

S3

S2

S1

S0

Standby

0

0

0

0

0

0

0

Hopping Code

Transmission

0

0

1

0

0

0

1

0

1

0

0

0

1

0

0

1

1

0

0

1

1

1

0

0

1

1

0

0

1

0

1

1

1

1

0

1

1

0

1

1

1

0

Seed Transmission

1

1

1

1

1

1

1

BACW Disabled

(All words transmitted)

BACW Enabled

(1 out of 2 transmitted)

A

2A

Transmission Amplitude = A

Code Word

Code Word

Code Word

Code Word

Code

Word

Code

Word

Code

Word

Code

Word

/var/www/html/datasheet/sites/default/files/pdfhtml_dummy/40138D-html.html
background image

HCS200

DS40138D-page 10

© 2011 Microchip Technology Inc.

6.0

 PROGRAMMING THE HCS200 

When using the HCS200 in a system, the user will have
to program some parameters into the device, such as
the serial number and crypt key, before it can be used.
The programming cycle allows the user to input all 192
bits in a serial data stream, which are then stored inter-
nally in EEPROM. Programming will be initiated by
forcing the PWM line high, after the S2 line has been
held high for the appropriate length of time (Table 6-1
and Figure 6-1). After the Program mode is entered, a
delay must be provided for the automatic bulk write
cycle to complete. This will write all locations in the
EEPROM to zeros. The device can then be pro-
grammed by clocking in 16 bits at a time, using S2 as
the clock line and PWM as the data in line; data is
clocked in on the falling edge of S2. After each 16-bit

word is sent, a programming delay of TWC is required
for the internal program cycle to complete. At the end
of the programming cycle, the device can be verified
(Figure 6-2) by reading back the EEPROM. Reading is
done by clocking the S2 line and reading the data bits
on PWM. The falling edge of S2 initiates the reading.
For security reasons, it is not possible to execute a Ver-
ify function without first programming the EEPROM. A
Verify operation can only be done immediately fol-
lowing the Program cycle

FIGURE 6-1:

PROGRAMMING WAVEFORMS

FIGURE 6-2:

VERIFY WAVEFORMS  

Note:

To ensure that the device does not acci-
dentally enter Programming mode (result-
ing in a bulk erase), PWM should never be
pulled high by the circuit connected to it.
Special care should be taken when driving
PNP RF transistors.

PWM

Enter Program 

Mode

(Data)

(Clock)

Bit 0

Bit 1

Bit 2

Bit 3

Bit 14

Bit 15

Bit 16

Bit 17

T

PH

1

T

PBW

T

PS

Repeat for each word (12 times)

T

PH

2

T

CLKH

T

CLKL

T

WC

T

DS

S2 

Data for Word 0 (KEY_0)

Data for Word 1

T

DH

Note 1: Unused button inputs to be held to ground during the entire programming sequence.

2: The V

DD

 pin must be taken to ground after a Program/Verify cycle.

PWM

(Clock)

(Data)

Note: If a Verify operation is to be done, then it must immediately follow the Program cycle.

 

End of Programming Cycle

Beginning of Verify Cycle

Bit 1 Bit 2

Bit 3 

Bit 15

Bit 14

Bit 16 Bit 17

Bit190 Bit191

T

WC

Data from Word 0

T

DV

S2 

Bit 0

Bit191

Bit190

Maker
Microchip Technology Inc.