DataSheet.es    


PDF AN652 Data sheet ( Hoja de datos )

Número de pieza AN652
Descripción Code Hopping Decoder Using Secure Learn
Fabricantes Microchip 
Logotipo Microchip Logotipo



Hay una vista previa y un enlace de descarga de AN652 (archivo pdf) en la parte inferior de esta página.


Total 30 Páginas

No Preview Available ! AN652 Hoja de datos, Descripción, Manual

AN652
Code Hopping Decoder Using Secure Learn
Author: Steven Dawson
Standard Microcontroller and
ASSP Division
OVERVIEW
This application note fully describes the working of a
code hopping decoder implemented on a Microchip
PIC16C56 microcontroller. This decoder uses the
secure learn (seed-based) method of learning new
transmitters. This application note describes the vari-
ous KEELOQ code hopping encoders that can be used
with the decoder, the decoder hardware, and the vari-
ous software modules comprising the system. The soft-
ware can be used to implement a stand alone decoder
or integrate with full function security systems. The
decoder supports the Microchip HCS200, HCS300,
HCS301, HCS360, and HCS361 KEELOQ code hop-
ping encoders.
KEY FEATURES
• Stand alone decoder
• Compatible with Microchip HCS200, HCS300,
HCS301, HCS360, and HCS361 encoders
• Automatic bit rate detection
• Automatic encoder type detection
• Four function outputs
• Six learnable transmitters
• RC Oscillator
FIGURE 1: PIC16C56 KEELOQ DECODER
LEARN INIT
LEARN IND
Vcc
MCLR
GND
S0
S1
S2
S3
1
2
3
4
5
6
7
8
9
18 RFIN
17 NC
16 OSC OUT
15 OSC IN
14 Vcc
13 BUT LRNT
12 EE CS
11 EE CK
10 EE DIO
THE INFORMATION CONTAINED IN THIS DOCUMENT IS PROPRIETARY AND
CONFIDENTIAL INFORMATION OF MICROCHIP TECHNOLOGY INC. THEREFORE,
ALL PARTIES ARE REQUIRED TO ENTER INTO A NONDISCLOSURE AGREEMENT
BEFORE RECEIVING THIS DOCUMENT.
KEELOQ is a registered trademark of Microchip Technology Inc.
© 1996 Microchip Technology Inc.
This document was created with FrameMaker 4 0 4
DS00652B_C-page 1

1 page




AN652 pdf
PWM Format
In general, all KEELOQ encoders share a common
transmission format:
A preamble to improve biasing of decision thresholds
in super-regenerative receivers. The preamble con-
sists of alternate on and off periods, each lasting as
long as a single elemental period.
A calibration header consisting of a low period of 10
elemental periods. Calibration actions should be per-
formed on the low period of the header to ensure cor-
rect operation with header chopping.
A string of 66 or 67 pulse-width modulated bits, each
consisting of three elements. The first element is high,
the second contains the data transmitted and is either
high or low, the third element is always low.
A guard period is usually left between the transmis-
sions. During this period nothing is transmitted by the
encoder.
AN652
Figure 4 shows the sampling points when sampling the
data bits. The first and last elements are used exclu-
sively to verify the integrity of the received symbol. The
first element (sample point A) is always high, the sec-
ond (sample point B) is the complement of the data bit
being sent, and the final element (sample point C) is
always low. Because the period between the low por-
tion of a bit (sample point C) and the rising edge of the
following bit (sample point X) can vary, the rising edge
of the first element (sample point X) is used to resyn-
chronize the receiving routine to each incoming bit.
If random noise is being received, the probability of a
set of three samples producing a valid combination is
only 2-2 = 1/4. For a string of 66 bits, the corresponding
figure is 2-132 < 2 x 10-40.
Integrity checking on incoming signals is important.
Code hopping signals require significant processing,
as well as EEPROM access, to decrypt. Unnecessary
processing can be avoided by not attempting to decrypt
incoming codes that have bit errors.
FIGURE 4: KEELOQ PWM TRANSMISSION FORMAT
Data
Bit Format I
Bit Format II
0
2 te te
2 te 4 te
Sampling Points
1 XA B C
1 te 2 te
te 5 te
TABLE 5:
TRANSMISSION FORMATS
Encoder
Preamble
Header
Chopping
HCS200
HCS300/301
HCS360
HCS361
PWM Bit Format
I II
•—
•—
•—
••
Hopping Code
Length
32 bits
32 bits
32 bits
32 bits
Unencrypted
Code Length
34 bits
34 bits
35 bits
35 bits
Microwire is registered trademark of Motorola.
© 1996 Microchip Technology Inc.
DS00652B_C-page 5

5 Page





AN652 arduino
Transmission Validation
Once a complete transmission has been received from
an encoder, the transmission needs to be validated
before any further action is taken. Validation consists of
the following steps and is shown in Figure 10:
1. Check the serial number (28 bits) received
against the stored encoder serial numbers
(M_SERIAL).
2. Decrypt the transmission received (M_HOP).
3. Compare the 12 bit discrimination value in the
decrypted hopping portion of the transmission
against the stored discrimination value (M_DIS).
4. Check if the synchronization counter falls within
the resynchronization window (M_CHECK1).
5. Check if the synchronization counter falls within
the open window. If not, then decoder resyn-
chronization is necessary (M_CHECK2).
6. If resynchronization is necessary wait for a sec-
ond transmission from the encoder with a con-
secutive
synchronization
counter
(M_RESYNC).
7. Update the synchronization counters in
EEPROM (M_UPDATE).
8. Set the appropriate outputs (M_BUT).
9. Return to MAIN routine and continue normal
housekeeping chores.
AN652
Discrimination Values
After decryption, the Code Shift Register (CSR) used
by the KEELOQ decryption algorithm contains the same
32 bits of information originally encrypted in the
encoder before transmission. Twelve of these bits are
discrimination bits.
The decryption operation can be checked by compar-
ing parts of the decrypted 32-bit word (the discrimina-
tion values) with known values.
When using an HCS200 encoder all 12 bits are user
selectable discrimination bits. The HCS300/301 encod-
ers have 10 bits of user programmable bits and 2 user
programmable overflow bits. The HCS360/361 encod-
ers set the least significant 8 bits of the discriminator to
the least significant 8 bits of the serial number. The
remaining 4 bits are made up of a user-programmable
overflow bit, 2 user bits, and a bit showing whether
independent mode is enabled.
If the discrimination bits are programmed to a known
value, the integrity of the decryption can be easily ver-
ified. The encoder uses this to check whether the two
transmissions received are a HOP/ SEED transmission
pair. The decoder checks that the least significant 8 bits
of the discrimination value are identical to the least sig-
nificant 8 bits of the serial number before signaling a
successful learn (M_SL_UPDATE).
All 12 discrimination bits are stored in the external
EEPROM during learn. These are checked whenever a
transmission is received to check for a valid transmis-
sion. If one of the overflow bits are cleared during a
counter overflow, the decoder will cease to recognize
the encoder. The overflow bits in the transmitter should
be set to zero if the user wants to prevent this from hap-
pening.
TABLE 7:
HCS200 AND HCS300/301 DECRYPTED HOPPING CODE TRANSMISSION FORMAT
Function1 MSB
Encoder disc. bits
LSB MSB
Synchronization counter
LSB
(4 bits)
(12 bits)
(16 bits)
1The HCS200 has padding in S3 button position since no S3 button is present.
TABLE 8:
HCS360/361 DECRYPTED HOPPING CODE TRANSMISSION FORMAT
Function
(4 bits)
MSB
Encoder disc. bits
(12 bits)
LSB MSB
Synchronization counter
(16 bits)
LSB
© 1996 Microchip Technology Inc.
DS00652B_C-page 11

11 Page







PáginasTotal 30 Páginas
PDF Descargar[ Datasheet AN652.PDF ]




Hoja de datos destacado

Número de piezaDescripciónFabricantes
AN650Si468X SCHEMATICS AND LAYOUT GUIDESilicon Laboratories
Silicon Laboratories
AN650Service ManualSuzuki
Suzuki
AN6500(AN6501) Built-in Reference Voltage Operational AmplifiersPanasonic
Panasonic
AN6501Built-in Reference Voltage Operational AmplifiersMatsushita Electric
Matsushita Electric

Número de piezaDescripciónFabricantes
SLA6805M

High Voltage 3 phase Motor Driver IC.

Sanken
Sanken
SDC1742

12- and 14-Bit Hybrid Synchro / Resolver-to-Digital Converters.

Analog Devices
Analog Devices


DataSheet.es es una pagina web que funciona como un repositorio de manuales o hoja de datos de muchos de los productos más populares,
permitiéndote verlos en linea o descargarlos en PDF.


DataSheet.es    |   2020   |  Privacy Policy  |  Contacto  |  Buscar