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

📄 tb.lst

📁 基于MSP430的电表终端上的CT检测程序
💻 LST
字号:
##############################################################################
#                                                                            #
# IAR MSP430 C/C++ Compiler V3.21A/W32  [Kickstart]    19/Sep/2005  17:10:34 #
# Copyright 1996-2004 IAR Systems. All rights reserved.                      #
#                                                                            #
#    __rt_version  =  2                                                      #
#    __double_size =  64                                                     #
#    __reg_r4      =  free                                                   #
#    __reg_r5      =  free                                                   #
#    __pic         =  no                                                     #
#    __core        =  64kb                                                   #
#    Source file   =  D:\WILLFARwork\CT项目\CT开短路MSP430\程序\1A_Check_200 #
#                     50906\TB.c                                             #
#    Command line  =  -I "D:\Program Files\IAR Systems\Embedded Workbench    #
#                     4.0\430\INC\" -I "D:\Program Files\IAR                 #
#                     Systems\Embedded Workbench 4.0\430\INC\DLIB\" -lC      #
#                     D:\WILLFARwork\CT项目\CT开短路MSP430\程序\1A_Check_200 #
#                     50906\Debug\List\ -la D:\WILLFARwork\CT项目\CT开短路MS #
#                     P430\程序\1A_Check_20050906\Debug\List\ -o             #
#                     D:\WILLFARwork\CT项目\CT开短路MSP430\程序\1A_Check_200 #
#                     50906\Debug\Obj\ -z3 --no_cse --no_unroll --no_inline  #
#                     --no_code_motion --no_tbaa --library_module            #
#                     --module_name= --debug -e --double=64 --dlib_config    #
#                     "D:\Program Files\IAR Systems\Embedded Workbench       #
#                     4.0\430\LIB\DLIB\dl430dn.h"                            #
#                     D:\WILLFARwork\CT项目\CT开短路MSP430\程序\1A_Check_200 #
#                     50906\TB.c                                             #
#    List file     =  D:\WILLFARwork\CT项目\CT开短路MSP430\程序\1A_Check_200 #
#                     50906\Debug\List\TB.lst                                #
#    Object file   =  D:\WILLFARwork\CT项目\CT开短路MSP430\程序\1A_Check_200 #
#                     50906\Debug\Obj\TB.r43                                 #
#                                                                            #
#                                                                            #
##############################################################################

D:\WILLFARwork\CT项目\CT开短路MSP430\程序\1A_Check_20050906\TB.c
      1          //计数器操作
      2          #include "msp430x13x.h"
      3          unsigned int time_b_count;       //TA中断时TB的计时数值
      4          unsigned int TA_int_count;       //TA中断的次数
      5          unsigned char data_chang;        //检测数据更新标志
      6          unsigned char TB_over;           //TB超时标志
      7          unsigned char second_count=0;      //TB的秒中断计数,用于通讯延时保护
      8          
      9          #define TA_count_max  65535;
     10          
     11          void init_time_b (void)
     12          {  TBCTL=TACLR+TASSEL0;;          //选择连接时钟到内部MCLK
     13             TBR=1;
     14             TBCCTL0=CCIE;                  //开启中断
     15             TBCCR0=32768;                  //计时上限
     16             TBCTL|=MC1;                    //处于连续计数模式
     17             _EINT();
     18             TB_over=0;
     19          
     20          }
     21          
     22          void init_time_a (void)
     23          {
     24             P1SEL|=0x01;                      //使能外部时钟输入
     25             TAR=0;
     26             TACTL=TACLR;//+TASSEL0;;          //选择外部TACLK
     27             TACCTL0=CCIE;                       //开启中断
     28             TACCR0=TA_count_max;
     29             TACTL|=MC1;                       //处于连续计数模式
     30             _EINT();
     31          
     32          }
     33          
     34          #pragma vector=TIMERA0_VECTOR
     35          __interrupt void Timer_A (void)
     36          
     37          {
     38            ;
     39          }
     40          
     41          #pragma vector=TIMERB0_VECTOR
     42          __interrupt void Timer_B (void)
     43          
     44          {
     45          if(data_chang==0)                  //外部程序须处理后再更新下一个数据
     46              {
     47               time_b_count=TAR;
     48               data_chang=1;
     49              }
     50               P6OUT^=0x20;
     51               init_time_a();
     52               init_time_b();
     53               TA_int_count++;
     54               second_count++;
     55          }
     56          

Errors: 1
Warnings: none

⌨️ 快捷键说明

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