⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tx900-ok.lst

📁 我在东莞一厂家做的宠物训练RF控制器的全部源码
💻 LST
📖 第 1 页 / 共 3 页
字号:
MPASM 03.20.02 Released      TX900-OK.ASM   12-2-2003  17:03:10         PAGE  1


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                      00001 ;***********************************************************************************
                      00002 ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
                      00003 ; project:  RF 900 MHz radio communication module
                      00004 ; filename: Tx900-OK.asm
                      00005 ; mcu:      pic16c505
                      00006 ; pin define:
                      00007 ;                           ________
                      00008 ;                     VCC--| o      |--VSS
                      00009 ;                      LV--|        |--SEL0
                      00010 ;                      NC--|        |--SEL1
                      00011 ;                    SEL2--|        |--NC
                      00012 ;                    DATA--|        |--NC
                      00013 ;                  PLL EN--|        |--NC
                      00014 ;                   TX EN--|        |--NC
                      00015 ;                           --------   
                      00016 ; key encode value:     SEL0--aah
                      00017 ;                       SEL1--55h
                      00018 ;                       SEL2--0fh
                      00019 ;***********************************************************************************
                      00020 ;***********************************************************************************
                      00021 ; The STATUS register 
                      00022 
                      00023 ;bit 7: GPWUF: GPIO reset bit
                      00024 ;       1 = Reset due to wake-up from SLEEP on pin change
                      00025 ;       0 = After power up or other reset
                      00026 ;bit 6: Unimplemented
                      00027 ;bit 5: PA0: Program page preselect bits
                      00028 ;       1 = Page 1 (200h - 3FFh) - PIC12C509, PIC12C509A, PIC12CR509A and PIC12CE519
                      00029 ;       0 = Page 0 (000h - 1FFh) - PIC12C5XX
                      00030 ;       Each page is 512 bytes.
                      00031 ;       Using the PA0 bit as a general purpose read/write bit in devices which do not
                      00032 ;       use it for program
                      00033 ;       page preselect is not recommended since this may affect upward compatibility 
                      00034 ;       with future products.
                      00035 ;bit 4: TO: Time-out bit
                      00036 ;       1 = After power-up, CLRWDT instruction, or SLEEP instruction
                      00037 ;       0 = A WDT time-out occurred
                      00038 ;bit 3: PD: Power-down bit
                      00039 ;       1 = After power-up or by the CLRWDT instruction
                      00040 ;       0 = By execution of the SLEEP instruction
                      00041 ;bit 2: Z: Zero bit
                      00042 ;       1 = The result of an arithmetic or logic operation is zero
                      00043 ;       0 = The result of an arithmetic or logic operation is not zero
                      00044 ;bit 1: DC: Digit carry/borrow bit (for ADDWF and SUBWF instructions)
                      00045 ;       ADDWF
                      00046 ;       1 = A carry from the 4th low order bit of the result occurred
                      00047 ;       0 = A carry from the 4th low order bit of the result did not occur
                      00048 ;       SUBWF
                      00049 ;       1 = A borrow from the 4th low order bit of the result did not occur
                      00050 ;       0 = A borrow from the 4th low order bit of the result occurred
                      00051 ;bit 0: C: Carry/borrow bit (for ADDWF, SUBWF and RRF, RLF instructions)
                      00052 ;***********************************************************************************
                      00053 ;The code init. OPTION set.
MPASM 03.20.02 Released      TX900-OK.ASM   12-2-2003  17:03:10         PAGE  2


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                      00054 
                      00055 ;bit 7: GPWU: Enable wake-up on pin change (GP0, GP1, GP3)
                      00056 ;       1 = Disabled
                      00057 ;       0 = Enabled
                      00058 ;bit 6: GPPU: Enable weak pull-ups (GP0, GP1, GP3)
                      00059 ;       1 = Disabled
                      00060 ;       0 = Enabled
                      00061 ;bit 5: T0CS: Timer0 clock source select bit
                      00062 ;       1 = Transition on T0CKI pin
                      00063 ;       0 = Transition on internal instruction cycle clock, Fosc/4
                      00064 ;bit 4: T0SE: Timer0 source edge select bit
                      00065 ;       1 = Increment on high to low transition on the T0CKI pin
                      00066 ;       0 = Increment on low to high transition on the T0CKI pin
                      00067 ;bit 3: PSA: Prescaler assignment bit
                      00068 ;       1 = Prescaler assigned to the WDT
                      00069 ;       0 = Prescaler assigned to Timer0
                      00070 ;bit 2-0: PS2:PS0: Prescaler rate select bits
                      00071 ;    Bit Value Timer0 Rate   WDT Rate
                      00072 ;       000 1 :   2             1 : 1
                      00073 ;       001 1 :   4             1 : 2
                      00074 ;       010 1 :   8             1 : 4
                      00075 ;       011 1 :   16            1 : 8
                      00076 ;       100 1 :   32            1 : 16
                      00077 ;       101 1 :   64            1 : 32
                      00078 ;       110 1 :   128           1 : 64
                      00079 ;       111 1 :   256           1 : 128
                      00080 ;***********************************************************************************
                      00081 ;------------------------
                      00082 ;special register define
                      00083 ;------------------------
  00000000            00084 INDF            EQU     0H
  00000001            00085 TMR0            EQU     1H
  00000002            00086 PCL             EQU     2H
  00000003            00087 STATUS  EQU     3H
  00000004            00088 FSR             EQU     4H
  00000005            00089 OSCCAL  EQU     5H
  00000006            00090 PB              EQU     6H
  00000007            00091 PC              EQU     7H
                      00092 ;-------------------
                      00093 ;special bit define
                      00094 ;-------------------
  00000000            00095 C               EQU     0
  00000001            00096 DC              EQU     1
  00000002            00097 Z               EQU     2
  00000003            00098 PD              EQU     3
  00000004            00099 TO              EQU     4
  00000005            00100 PA0             EQU     5
                      00101 ;
  00000007            00102 GPWUF           EQU     7
                      00103 ;------------------------
                      00104 ;General register define
                      00105 ;------------------------
  00000008            00106 COMPARE_BUF     EQU     08H
MPASM 03.20.02 Released      TX900-OK.ASM   12-2-2003  17:03:10         PAGE  3


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

  00000009            00107 COUNTER_BUF     EQU     09H
  0000000A            00108 FLG_AGO EQU     0AH
  0000000B            00109 FLG_NOW EQU     0BH
  0000000C            00110 TEMP_BUF        EQU     0CH
  00000012            00111 PUL_BREADTH EQU         12H
  00000013            00112 BIT_CONT        EQU     13H
  00000014            00113 DATA_BUF        EQU     14H
  00000015            00114 DATA_TMP        EQU     15H
  00000016            00115 BAG_CNT EQU     16H
  00000017            00116 R0              EQU     17H
  00000018            00117 R5              EQU     18H
  00000019            00118 ID_CONT EQU     19H
  0000001A            00119 ID_CODE EQU     1AH
  0000001B            00120 COUNT           EQU     1BH
                      00121 ;---------------------
                      00122 ;port define
                      00123 ;---------------------
  00000000            00124 S1              EQU     0
  00000001            00125 S2              EQU     1
  00000003            00126 S3              EQU     3
  00000005            00127 LV              EQU     5
                      00128 ;
  00000003            00129 TXEN            EQU     3
  00000004            00130 PLLEN           EQU     4
  00000005            00131 DAT             EQU     5
                      00132 ;
                      00133 ;=====================
                      00134 ; pulse breadth value
                      00135 ;=====================
  00000001            00136 SYN_BREADTH     SET     D'1'            ;sync-code  5 * 60 = 300US
  00000004            00137 ONE_BREADTH     SET     D'4'            ;BIT "1"   10 * 30 = 300US
  00000007            00138 ZER_BREADTH     SET     D'7'            ;BIT "0"   15 * 20 = 300US
  0000000F            00139 STA_BREADTH     SET     D'15'           ;BIT "STA" 30 * 10 = 300US
                      00140 ;=====================
                      00141 ; macro define
                      00142 ;=====================
                      00143 DELX_US MACRO
                      00144         MOVWF           COUNT
                      00145         NOP
                      00146         NOP
                      00147         DECFSZ  COUNT,F
                      00148         GOTO            $-3
                      00149         ENDM
                      00150 ;*********************************************************************
                      00151 ;*********************************************************************
0000                  00152         ORG             000H
0000   0025           00153         MOVWF           OSCCAL
0001   0A10           00154         GOTO            MAIN
                      00155 ;*********************************************************************
                      00156 ;**** the NOP is uniform to address 010H of ROM
0002   0000           00157         NOP
0003   0000           00158         NOP
0004   0000           00159         NOP
MPASM 03.20.02 Released      TX900-OK.ASM   12-2-2003  17:03:10         PAGE  4


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

0005   0000           00160         NOP
0006                  00161 GET_ID
0006   0219           00162         MOVFW           ID_CONT         ; ID number to W
Message[305]: Using default destination of 1 (file).
0007   01E2           00163         ADDWF           PCL               ; Add W to PC
0008   0812           00164         RETLW           012H                    ; the ID number can alter at program MCU
0009   08AA           00165         RETLW           0AAH
000A   08AA           00166         RETLW           0AAH
                      00167 ;========================================================================
0010                  00168         ORG             010H
0010                  00169 MAIN
0010   0064           00170         CLRF            FSR                     ; Select blank 0
                      00171 ;
0011   0C80           00172         MOVLW           B'10000000'             ; check power on of start
0012   0143           00173         ANDWF           STATUS,W
0013   0743           00174         SKPZ
0014   0A1F           00175         GOTO            KEY_WAKE                ;PIN_CHANGE
0015                  00176 POWER_UP
                      00177 ;========================================================================

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -