datasheetbank_Logo
전자부품 반도체 검색엔진( 무료 PDF 다운로드 ) - 데이터시트뱅크

AN665 데이터 시트보기 (PDF) - Microchip Technology

부품명
상세내역
일치하는 목록
AN665 Datasheet PDF : 17 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
AN665
Software Implementation
The software is composed of three short code
segments:
• Receive routine for the KEELOQ HCS300 Encoder
• Keyboard Emulation Routines
• Main loop routine.
Receive Routine for the HCS300 Encoder
(RECEIVE)
The RECEIVE routine gathers the first 64 bits transmit-
ted by the HCS300, ignoring the last two bits (repeat
and battery status) as they carry no useful information
for this application, and packs them into a 8-bytes
buffer (Buffer0…Buffer7).
Keyboard Emulation Routines
(Sendbit, SendKey)
These implement the transmission of the key scan
codes according to the IBM-PC/AT keyboard protocol.
Main Loop
While the CMOS switch connects the PC to the key-
board clock and data lines, the LED output line is con-
tinuously polled to detect the activation of the HCS300
Note: Any combination of its four input lines after
debouncing activates the encoder.
When the LED line goes low, the CMOS switch is acti-
vated to isolate the clock and data lines from the key-
board. The RECEIVE routine is called.
Upon successfully receiving a transmission, a loop is
entered where 16 hex digits from the receive buffer are
transmitted as a sequence of key press and key
release messages, separated by appropriate delays
repetitively calling the SENDKEY subroutine.
The software has been developed in the simplest pos-
sible form and, therefore, is open to a number of opti-
mizations. For example:
• The PIC12C508 could be put to “sleep” to further
reduce power consumption.
• The encoder could be removable and its pres-
ence/activation should be properly detected.
• For simplicity, the presented RECEIVE routine
requires a 400 ms transmission speed being con-
figured in the encoder, while a more flexible multi-
baud rate routine can be used as presented in
various other application notes.
• A second code word could be compared with the
first code word received to recognize transmission
errors (although highly improbable when the
encoder is wired to the PIC12508), since there is
no decryption, there is no other means to tell that
the transmission has not been corrupted.
Decoding Options
A code hopping password can be used to validate
access to a wide variety of electronic services provid-
ing the recipient application (typically, it will be some
software running on a server) is capable of following
some simple decryption and verification steps. The
fixed unencrypted part of the code (last 8 digits) can be
used to identify the user (7 digits) and the function acti-
vated on the encoder (1 out of 15, corresponding to the
last digit).
The hopping part has to be decrypted using the appro-
priate 64-bit decryption key. Depending on the desired
level of security, many different key generation and
management techniques can be adopted. For exam-
ple, the key could be deduced by the User ID and a
Manufacturer’s Key, by the “seed” code of the encoder
or could simply be a fixed 64-bit constant.
Learning techniques can also be applied so that the
application actually autonomously acquires the
required keys and builds a database of users, ID codes,
and decryption keys. For a further analysis, consult the
following literature:
AN645
AN662
AN663
TB001
TB003
PIC16C57 Based Code Hopping Secu-
rity System (DS00645)
KEELOQ Code Hopping Decoder Using
Secure Learn (DS00662)
KEELOQ Simple Code Hopping Decoder
(DS00663)
An Introduction to KeeLoq Code Hopping
(DS91000A)
An Introduction to KEELOQ Code Hopping
(DS91002A).
.
DS00665A-page 6
ã 1997 Microchip Technology Inc.

Share Link: 

datasheetbank.com [ Privacy Policy ] [ Request Datasheet ] [ Contact Us ]