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

📄 main.lst

📁 胎压监测系统接收端控制器motorolar开发源代码
💻 LST
📖 第 1 页 / 共 5 页
字号:

Main.asm               Assembled with CASM08Z  3/12/2003  10:12:03 AM  PAGE 1



                        1  * Main.asm
                        2  
                        3  ****************************************************
                                                             ******************
                        4  * Contains the main control program for the TPMS 
                                                          receiver module.    *
                        5  ****************************************************
                                                             ******************
                        6  
 0000                   7  RAMStart        EQU     $0040
 0000                   8  RomStart        EQU     $E000
 0000                   9  FLASHVARS       EQU     $E000                       
                                 ;Variables that need to be in NVM are stored 
                                                     here (first page of Flash)
 0000                  10  VectorStart     EQU     $FFDC
                       11  
 0000                  12  NB_DATA         EQU     !8                          
                                            ;8 bytes of real data in the frame.
                       13  
 0000                  14  $Include        'kx8regs.inc'
                       15   ; 68HC908KX8 Equates
                       16  
 0000                  17  PTA     EQU $0000     ; Ports and data direction
 0000                  18  PORTA   EQU $0000
 0000                  19  PTB     EQU $0001
 0000                  20  PORTB   EQU $0001
 0000                  21  DDRA    EQU $0004
 0000                  22  DDRB    EQU $0005
                       23  
 0000                  24  PTAPUE  EQU $000D    ; Port pull-up enables
                       25  
 0000                  26  SCC1    EQU $0013    ; SCI (Asyncronous communicatio
                                                                            ns)
 0000                  27  SCC2    EQU $0014
 0000                  28  SCC3    EQU $0015
 0000                  29  SCS1    EQU $0016
 0000                  30  SCS2    EQU $0017
 0000                  31  SCDR    EQU $0018
 0000                  32  SCBR    EQU $0019
                       33  
 0000                  34  KBSCR   EQU $001A   ; Keyboard interrupt control/sta
                                                                            tus
 0000                  35  KBIER   EQU $001B
                       36  
 0000                  37  TBCR    EQU $001C    ; Time base module
                       38  
 0000                  39  ISCR    EQU $001D    ; IRQ status/control
                       40  
 0000                  41  CONFIG2 EQU $001E    ; System configuration
 0000                  42  CONFIG1 EQU $001F
                       43  
 0000                  44  TSC     EQU $0020    ; Timer 1
 0000                  45  TCNTH   EQU $0021
 0000                  46  TCNTL   EQU $0022
 0000                  47  TMODH   EQU $0023
 0000                  48  TMODL   EQU $0024
 0000                  49  TSC0    EQU $0025
 0000                  50  TCH0H   EQU $0026


Main.asm               Assembled with CASM08Z  3/12/2003  10:12:03 AM  PAGE 2



 0000                  51  TCH0L   EQU $0027
 0000                  52  TSC1    EQU $0028
 0000                  53  TCH1H   EQU $0029
 0000                  54  TCH1L   EQU $002A
                       55  
 0000                  56  ICGCR   EQU $0036    ; Internal Clock Generator
 0000                  57  ICGMR   EQU $0037
 0000                  58  ICGTR   EQU $0038
 0000                  59  ICDVR   EQU $0039
 0000                  60  ICGDSR  EQU $003A
                       61  
 0000                  62  ADSCR   EQU $003C    ; A to D converter
 0000                  63  ADR     EQU $003D
 0000                  64  ADCLK   EQU $003E
                       65  
 0000                  66  SBSR    EQU $FE00    ; System integration
 0000                  67  SRSR    EQU $FE01
 0000                  68  SUBAR   EQU $FE02
 0000                  69  SBFCR   EQU $FE03
                       70  
 0000                  71  INT1    EQU $FE04    ; Interrupt status
 0000                  72  INT2    EQU $FE05
 0000                  73  INT3    EQU $FE06
                       74  
 0000                  75  FLTCR   EQU $FE07    ; Flash test/programming
 0000                  76  FLCR    EQU $FE08
                       77  
 0000                  78  BRKH    EQU $FE09    ; Hardware breakpoint
 0000                  79  BRKL    EQU $FE0A
 0000                  80  BRKSCR  EQU $FE0B
                       81  
 0000                  82  LVISR   EQU $FE0C    ; Low voltage detect
                       83  
 0000                  84  FLBPR   EQU $FF7E    ; Flash boot protect
                       85  
 0000                  86  COPCTL  EQU $FFFF    ; COP (Computer operating 
                                                              properly) control
                       87  
                       88  
                       89  ;(C)opywrite P&E Microcomputer Systems, 2000
                       90  ; You may use this code freely as long as this 
                                                               copyright notice
                       91  ; is included.
                       92  
                       93  
 0040                  94                  ORG     RamStart
 0040                  95  $Include        'Ram.inc'
                       96  * Ram.inc
                       97  
                       98  ****************************************************
                                                             ******************
                       99  * Ram variables                                     
                                                                              *
                      100  ****************************************************
                                                             ******************
 0040                 101  WRITE_SPI       DS      3                           
                                                ;To write to CR[2:0] in Romeo2.
 0043                 102  BUFFER          DS      3                           


Main.asm               Assembled with CASM08Z  3/12/2003  10:12:03 AM  PAGE 3



                                               ;To temporarily hold write data.
 0046                 103  READ_SPI        DS      3                           
                                               ;To read from CR[2:0] in Romeo2.
 0049                 104  DATA            DS      NB_DATA                     
                                   ;Received data sent by Romeo2.  See SPI.asm.
 0051                 105  LFCNTH          DS      1                           
                                                            ;Tire time counters
 0052                 106  LFCNTL          DS      1
 0053                 107  RFCNTH          DS      1
 0054                 108  RFCNTL          DS      1
 0055                 109  LRCNTH          DS      1
 0056                 110  LRCNTL          DS      1
 0057                 111  RRCNTH          DS      1
 0058                 112  RRCNTL          DS      1
 0059                 113  SWITCH          DS      1                           
                                                     ;Switch debounce register.
 005A                 114  LAST_SWITCH     DS      1                           
                                           ;Holds the previous value of SWITCH.
 005B                 115  FAST_MODE       DS      1                           
                                                    ;Holds the fast mode flags.
 005C                 116  MEMSP           DS      2                           
                                          ;Preserves the stack pointer location
 005E                 117  TEMP            DS      1                           
                                                  ;Temporary for counters, etc.
 005F                 118  TEMPTIME        DS      2                           
                                                            ;Used for timestamp
 0061                 119  TIMESTAMP       DS      1                           
                                                 ;Timestamp added to data frame
                      120  
                      121   ; The following RAM variables must be kept in this 
                                                                         order.
 0062                 122  THRESHOLD       DS      1                           
                                        ;Pressure threshold for low indication.
 0063                 123  LFID            DS      4
 0067                 124  RFID            DS      4
 006B                 125  LRID            DS      4
 006F                 126  RRID            DS      4                           
                                                                ;Tire ID bytes.
                      127  
 0073                 128  RAMFREE         DS      $70                         
                                      ;Spot for the FLASH r/w program to reside
                      129  
 E000                 130                  ORG     FLASHVARS
                      131  
 E000      2A         132                  DB      $2A                         
                                          ;Default pressure threshold (ambient)
 E001      01223344   133                  DB      $01,$22,$33,$44             
                                                            ;Default LF tire ID
 E005      45667788   134                  DB      $45,$66,$77,$88             
                                                            ;Default RF tire ID
 E009      89AABBCC   135                  DB      $89,$aa,$bb,$cc             
                                                            ;Default LR tire ID
 E00D      CDEEFF00   136                  DB      $cd,$ee,$ff,$00             
                                                            ;Default RR tire ID
                      137  
 E040                 138                  ORG     RomStart+$40                
                                           ;Leave some room for FLASH page r/w.
 E040                 139  $Include        'Init.asm'


Main.asm               Assembled with CASM08Z  3/12/2003  10:12:03 AM  PAGE 4



                      140  * Init.asm
                      141  
                      142  ****************************************************
                                                             ******************
                      143  * Initialize the I/O, ICG, KBD, IRQ                 
                                                                              *
                      144  ****************************************************
                                                             ******************
                      145  
                      146  ****************************************************

⌨️ 快捷键说明

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