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

📄 i2cm_io.lst

📁 TI 281x DSP 各种通信接口驱动源代码
💻 LST
📖 第 1 页 / 共 3 页
字号:
     149 00000053 5609          TCLR    *+XAR5[0],#(SDA_BIT)      ; Set the SDA pin as input
         00000054 01C5 
     150 00000055 4195          TBIT    *+XAR5[AR0],#SDA_BIT    
     151 00000056 56BD          MOVB    *+XAR4[0],#IDLE_INDEX,TC         
         00000057 00C4 
     152 00000058 761A          EDIS   
     153 00000059 0006          LRETR
     154              
     155              ;=========================================================================
     156              ; Issue Sr condition (Repeated Start)
     157              ; STATE 1: Drive SCL pin LOW
     158              ;=========================================================================
     159 0000005a       RSTART_S1:
     160 0000005a 560D          TSET    *+XAR6[0],#(SCL_BIT)      ; Set the SCL pin as output
         0000005b 02C6 
     161 0000005c 5609          TCLR    *+XAR6[AR0],#SCL_BIT        ; Drive the SCL pin LOW 
         0000005d 0296 
     162 0000005e 28C4          MOV     *+XAR4[0],#RSTART_S2_INDEX  ; Update the Task to next state  
         0000005f 0012 
     163 00000060 761A          EDIS   
     164 00000061 0006          LRETR
     165              
     166              ;=========================================================================
     167              ; Issue Sr condition (Repeated Start)
     168              ; STATE 2: De-assert SDA pin, move to next state if it is sampled HIGH
     169              ;=========================================================================
     170 00000062       RSTART_S2:
     171 00000062 5609          TCLR    *+XAR5[0],#(SDA_BIT)      ; Set the SDA pin as input
         00000063 01C5 
     172 00000064 4195          TBIT    *+XAR5[AR0],#SDA_BIT    
     173 00000065 56BD          MOVB    *+XAR4[0],#RSTART_S3_INDEX,TC        
         00000066 14C4 
     174 00000067 761A          EDIS   
     175 00000068 0006          LRETR
     176              
     177              ;=========================================================================
     178              ; Issue Sr condition (Repeated Start)
     179              ; STATE 3: De-assert SCL pin, move to STATE2 if it is sampled HIGH
     180              ;=========================================================================
     181 00000069       RSTART_S3:
     182 00000069 5609          TCLR    *+XAR6[0],#(SCL_BIT)      ; Set the SCL pin as input
         0000006a 02C6 
     183 0000006b 4296          TBIT    *+XAR6[AR0],#SCL_BIT    
     184 0000006c 56BD          MOVB    *+XAR4[0],#START_S3_INDEX,TC         
TMS320C2000 COFF Assembler PC Version 3.06 Fri Aug 01 12:16:13 2003

Tools Copyright (c) 1996-2002 Texas Instruments Incorporated
i2cm_io.asm                                                          PAGE    5

         0000006d 06C4 
     185 0000006e 761A          EDIS   
     186 0000006f 0006          LRETR
     187              
     188              ;=========================================================================
     189              ; Issue Acknowledge
     190              ; STATE 1: Drive SCL LOW and then Drive SDA pin using ACKDT
     191              ;=========================================================================
     192 00000070       ACK_S1:
     193 00000070 560D          TSET    *+XAR6[0],#(SCL_BIT)      ; Set the SCL pin as output
         00000071 02C6 
     194 00000072 5609          TCLR    *+XAR6[AR0],#SCL_BIT        ; Drive the SCL pin LOW 
         00000073 0296 
     195                      
     196 00000074 41CC          TBIT    *+XAR4[1],#ACKDT_BIT
     197 00000075 EE09          SBF     SEND_ACK_HI,TC
     198                      
     199 00000076 28C4          MOV    *+XAR4[0],#ACK_S2_INDEX 
         00000077 0018 
     200 00000078 560D          TSET    *+XAR5[0],#(SDA_BIT)      ; Set the SDA pin as output
         00000079 01C5 
     201 0000007a 5609          TCLR    *+XAR5[AR0],#SDA_BIT        ; Drive the SDA pin LOW             
         0000007b 0195 
     202 0000007c 761A          EDIS   
     203 0000007d 0006          LRETR
     204              
     205 0000007e       SEND_ACK_HI:
     206 0000007e 5609          TCLR    *+XAR5[0],#(SDA_BIT)      ; Set the SDA pin as input
         0000007f 01C5 
     207 00000080 4195          TBIT    *+XAR5[AR0],#SDA_BIT    
     208 00000081 56BD          MOVB    *+XAR4[0],#ACK_S2_INDEX,TC          
         00000082 18C4 
     209 00000083 761A          EDIS   
     210 00000084 0006          LRETR
     211              
     212              ;=========================================================================
     213              ; Issue Acknowledge
     214              ; STATE 2: De-assert SCL
     215              ;=========================================================================
     216 00000085       ACK_S2:
     217 00000085 5609          TCLR    *+XAR6[0],#(SCL_BIT)      ; Set the SCL pin as input
         00000086 02C6 
     218 00000087 4296          TBIT    *+XAR6[AR0],#SCL_BIT    
     219 00000088 56BD          MOVB    *+XAR4[0],#ACK_S3_INDEX,TC       
         00000089 1AC4 
     220 0000008a 761A          EDIS   
     221 0000008b 0006          LRETR
     222              
     223              ;=========================================================================
     224              ; Issue Acknowledge
     225              ; STATE 3: Drive the SCL to LOW & Release the SDA line
     226              ;=========================================================================
     227 0000008c       ACK_S3
     228 0000008c 560D          TSET    *+XAR6[0],#(SCL_BIT)      ; Set the SCL pin as output
         0000008d 02C6 
TMS320C2000 COFF Assembler PC Version 3.06 Fri Aug 01 12:16:13 2003

Tools Copyright (c) 1996-2002 Texas Instruments Incorporated
i2cm_io.asm                                                          PAGE    6

     229 0000008e 5609          TCLR    *+XAR6[AR0],#SCL_BIT        ; Drive the SCL pin LOW 
         0000008f 0296 
     230              
     231 00000090 5609          TCLR    *+XAR5[0],#(SDA_BIT)      ; Set the SDA pin as input  
         00000091 01C5 
     232 00000092 2BC4          MOV     *+XAR4[0],#IDLE_INDEX        
     233 00000093 761A          EDIS   
     234 00000094 0006          LRETR
     235              
     236              ;======================================================================
     237              ;  Data Receive State Machine
     238              ;  RSTATE1: Initialize the bit counter
     239              ;=====================================================================
     240 00000095       RECV_S1:
     241 00000095 28DC          MOV     *+XAR4[3],#8            ; bitCntr=8
         00000096 0008 
     242 00000097 56BF          MOVB    *XAR4,#RECV_S2_INDEX,UNC
         00000098 1EC4 
     243 00000099 2BD4          MOV     *+XAR4[2],#0
     244 0000009a 761A          EDIS   
     245 0000009b 0006          LRETR     
     246              
     247              ;======================================================================
     248              ;  Data Receive State Machine
     249              ;  RSTATE2: De-assert SCL, Shift in SDA if SCL is sampled HIGH
     250              ;=====================================================================
     251 0000009c       RECV_S2:
     252 0000009c 5609          TCLR    *+XAR6[0],#(SCL_BIT)      ; Set the SCL pin as input
         0000009d 02C6 
     253 0000009e 4296          TBIT    *+XAR6[AR0],#SCL_BIT    
     254 0000009f EF0A          SBF     RECV_S2_EXIT,NTC
     255                      
     256 000000a0 28C4          MOV     *+XAR4[0],#RECV_S3_INDEX
         000000a1 0020 
     257 000000a2 4195          TBIT    *+XAR5[AR0],#SDA_BIT         
     258 000000a3 5603          MOV     ACC,*+XAR4[2]<<1
         000000a4 01D4 
     259 000000a5 EF03          SBF     SDAIN_LO,NTC
     260                      
     261 000000a6 3E10          OR      ACC,#1
         000000a7 0001 
     262              
     263 000000a8       SDAIN_LO:
     264 000000a8 96D4          MOV     *+XAR4[2],AL        
     265              
     266 000000a9       RECV_S2_EXIT:
     267 000000a9 761A          EDIS   
     268 000000aa 0006          LRETR
     269              
     270              ;======================================================================
     271              ; Data Receive State Machine       
     272              ; RSTATE 3: Drive SCL pin LOW
     273              ;=========================================================================
     274 000000ab       RECV_S3:
     275 000000ab 560D          TSET    *+XAR6[0],#(SCL_BIT)      ; Set the SCL pin as output
TMS320C2000 COFF Assembler PC Version 3.06 Fri Aug 01 12:16:13 2003

Tools Copyright (c) 1996-2002 Texas Instruments Incorporated
i2cm_io.asm                                                          PAGE    7

         000000ac 02C6 
     276 000000ad 5609          TCLR    *+XAR6[AR0],#SCL_BIT        ; Drive the SCL pin LOW 
         000000ae 0296 
     277 000000af 28C4          MOV     *+XAR4[0],#RECV_S2_INDEX
         000000b0 001E 
     278              
     279 000000b1 0BDC          DEC     *+XAR4[3]
     280 000000b2 ED04          SBF     RECV_S3_EXIT,NEQ
     281              
     282 000000b3 2BC4          MOV     *+XAR4[0],#IDLE_INDEX
     283 000000b4 18D4          AND     *+XAR4[2],#0ffh
         000000b5 00FF 
     284              
     285 000000b6       RECV_S3_EXIT:
     286 000000b6 761A          EDIS   
     287 000000b7 0006          LRETR
     288              
     289              
     290              ;======================================================================
     291              ;  Data Transmit State Machine
     292              ;  TSTATE1: Initialize the bit counter
     293              ;=====================================================================
     294 000000b8       TXMIT_S1:
     295 000000b8 28DC          MOV     *+XAR4[3],#8                ; bitCntr=8
         000000b9 0008 
     296 000000ba 56BF          MOVB    *XAR4,#TXMIT_S2_INDEX,UNC
         000000bb 24C4 

⌨️ 快捷键说明

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