滚动码解码源程序和资料下载

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

;------------------------------------------------------------------------------;MICROCHIPKEELOQCODEHOPPINGSIMPLEDECODER;;------------------------------------------------------------------------------;------------------------------------------------------------------------------;LEGALNOTICE;;Theinformationcontainedinthisdocumentisproprietaryand;confidentialinformationofMicrochipTechnologyInc.Thereforeall;partiesarerequiredtosignanon-disclosureagreementbefore;receivingthisdocument.;;TheinformationcontainedinthisApplicationNoteisforsuggestion;only.Itisyourresponsibilitytoensurethatyourapplicationmeets;withyourspecifications.Norepresentationorwarrantyisgivenand;noliabilityisassumedbyMicrochipTechnologyIncorporatedwith;respecttotheaccuracyoruseofsuchinformationorinfringementof;patentsorotherintellectualpropertyarisingfromsuchuseor;otherwise.;------------------------------------------------------------------------------;------------------------------------------------------------------------------;SIMPLEDECODERWITHONESTEPLEARNANDSINGLEKEY;------------------------------------------------------------------------------;;PROGRAMINFORMATION:FILE:SIMDEC11.ASM;DATE:8SEPTEMBER1998;VER.:1.1;CKSM:XXXXH-FUSES:RC,WDT=ON,CP=ON;ASM.:MPASMVERSION2.13USED;INCL:NONE;TABS:8;------------------------------------------------------------------------------;CONFIGURATIONCONTROL:;;-VERSION1.1S.DAWSON;;FILE:SIMDEC11.ASM.;DATE:8SEPTEMBER1998;VER.:1.1;FUSES:RC,WDT=ON,CP=ON.;ASM.:MPASMVERSION2.13USED.;INCL:NONE;;CHANGES:;1.CODEHASBECOMEARESERVEDWORDINMPASM-CHANGEDITTODISC;2.ADDEDDISCLAIMER;;;DATEVERSIONLINECHANGES;08/14/961.0FIRSTVERSION;------------------------------------------------------------------------------LISTP=16C54,R=DEC;------------------------------------------------------------------------------;******USERDEFINITIONS******MAX_USERSEQU15;Thisisthemaximumnumberoftransmittersthatthesystemisableto;learn(1to15).;------------------------------------------------------------------------------;GENERALPURPOSEREGISTERSINDEQU00H;INDIRECTADDRESSREGISTERRTCCEQU01H;REALTIMECOUNTERCLOCKPCEQU02H;PROGRAMCOUNTERSTATUSEQU03H;STATUSREGISTERFSREQU04H;FILESELECTREGISTERPORTAEQU05H;PORTAPORTBEQU06H;PORTB;USERDEFINEDREGISTERFLAGSEQU07H;USERFLAGREGISTERADDRESSEQU08H;ADDRESSREGISTERTXNUMEQU09H;CURRENTTXOUTBYTEQU0AH;GENERALDATAREGISTERMASKEQUOUTBYT;MASKREGISTERUSEDINDECRYPTIONTMP_CNTEQUOUTBYT;TEMPORARYCOUNTER;COUNTERREGISTERSCNT0EQU0BH;LOOPCOUNTERSCNT1EQU0CHCNT2EQU0DHCNT_HIEQU0EH;16BITCLOCKCOUNTERCNT_LWEQU0FH;CIRCULARBUFFERREGISTERCSR0EQU10H;64BITRECEIVESHIFTREGISTERCSR1EQU11HCSR2EQU12HCSR3EQU13HCSR4EQU14HCSR5EQU15HCSR6EQU16HCSR7EQU17H;TEMPREGISTERSTMP1EQU18H;TEMPREGISTERFORREADANDWRITETMP2EQU19H;TEMPREGISTERFORREADANDWRITEREGEQU1AH;NOTUSEDREG1EQU1BH;NOTUSEDKEY0EQU1CH;64BITKEYSHIFTREGISTERKEY1EQU1DHKEY2EQU1EHKEY3EQU1FHKEY4EQUCNT2KEY5EQUCSR5KEY6EQUCSR6KEY7EQUCSR7;*****USERREGISTERRE-MAPPINGS***************HOP1EQUCSR0;32BITHOPCODEREGISTERHOP2EQUCSR1HOP3EQUCSR2HOP4EQUCSR3;RECEIVEDTRANSMISSIONOPEN32BITSSER_0EQUCSR7;28BITSERIALNUMBERSER_1EQUCSR6SER_2EQUCSR5SER_3EQUCSR4;RECEIVEDTRANSMISSIONENCRYPTED32BITSFUNCEQUCSR3;BUTTONCODE&USERBITFUNCTIONBYTEDISCEQUCSR2;DISCRIMINATIONVALUECNTR_HIEQUCSR1;16BITRXCOUNTERHIGHBYTECNTR_LWEQUCSR0;16BITRXCOUNTERLOWBYTE;*********EEPROMMEMORY*******LRNPTREQU01H;LEARNPOINTER;*********PORTABITDEFINITIONS*******RES0EQU0H;RESERVEDPINRFINEQU1H;RFINPUTLRNEQU2H;LEARNBUTTONLEDEQU3H;LEARNINDICATORLEDOUTPUT-VALIDSIGNAL;*********PORTBBITDEFINITIONS*******S0EQU0H;S0OUTPUTS1EQU1H;S1OUTPUTS2EQU2H;S2OUTPUTS3EQU3H;S3OUTPUTDIOEQU4H;EEPROMDATALINECLKEQU5H;EEPROMSERIALCLOCKCSEQU6H;EEPROMCHIPSELECTRES1EQU7H;RESERVEDPIN;*********COMPILERDEFINES******************NBITSEQU64;MAXIMUMTRANSMISSIONBITLENGTHMINEQU560;TRANSMISSIONHEADERMINIMUMLENGTH[鍿]TRISAEQU0111B;PORTA:TRI-STATEVALUEWRCFGEQU00000000B;PORTB:EEPROMWRITETRI-STATEVALUERDCFGEQU00010000B;PORTB:EEPROMREADTRI-STATEVALUE;******FLAGSDEFINITIONS**************BITINEQU0H;RFBITVALUELRNFEQU1H;LEARNFLAGSEC_CNTEQU2H;SECONDCOUNTERISBEINGCHECKEDRELEARNEQU3H;RELEARNINGATRANSMITTER;******STATUSREGISTERBITDEFINITIONS*****************CEQU0;CARRYDCEQU1;DIGITCARRYZEQU2;ZEROPDEQU3;POWERDOWNTOEQU4;TIMEOUTPA0EQU5;NOTUSEDPA1EQU6;NOTUSED;------------------------------------------------------------------------------;PAGE0:;------------------------------------------------------------------------------ORG00H;------------------------------------------------------------------------------;;FUNCTION:RESET();;DESCRIPTION:PROGRAMRESETROUTINE;;------------------------------------------------------------------------------RESETMOVLW000111B;SETUPRTCCPRESCALEROPTIONCLRFPORTA;RESETPORTACLRFPORTB;RESETPORTBMOVLWTRISA;SETUPPORTATRISPORTAMOVLWWRCFG;SETUPPORTBTRISPORTBCLRFFLAGS;RESETFLAGSGOTOM_LOOP;GOTOMAINPROGRAMLOOP;------------------------------------------------------------------------------;;FUNCTION:ROT_SHIFT();;DESCRIPTION:RIGHTROTATE64BITRECEIVESHIFTREGISTER;;NOTE:THISROUTINEMUSTBEINTHELOWERHALFOFTHEPAGE;;-----------------------------

1 / 25
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功