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

📄 main.lst

📁 完成数据的采集
💻 LST
📖 第 1 页 / 共 3 页
字号:
###############################################################################
#                                                                             #
#                                                       04/Dec/2008  16:07:55 #
# IAR ARM ANSI C/C++ Compiler V5.11.0.20622/W32 EVALUATION                    #
# Copyright 1999-2007 IAR Systems. All rights reserved.                       #
#                                                                             #
#    Cpu mode     =  thumb                                                    #
#    Endian       =  little                                                   #
#    Source file  =  E:\ELE\yten\pro\app\main.c                               #
#    Command line =  E:\ELE\yten\pro\app\main.c -D EMB_FLASH -lcN             #
#                    E:\ELE\yten\pro\Release\List\ -o                         #
#                    E:\ELE\yten\pro\Release\Obj\ --no_cse --no_unroll        #
#                    --no_inline --no_code_motion --no_tbaa --no_clustering   #
#                    --no_scheduling --debug --endian little --cpu Cortex-M3  #
#                    -e --fpu None --dlib_config "C:\Program Files\IAR        #
#                    Systems\Embedded Workbench 5.0                           #
#                    Evaluation\ARM\INC\DLib_Config_Normal.h" -I              #
#                    E:\ELE\yten\pro\ -I E:\ELE\yten\pro\..\LIBRARY\INC\ -I   #
#                    "C:\Program Files\IAR Systems\Embedded Workbench 5.0     #
#                    Evaluation\ARM\INC\" -On                                 #
#    List file    =  E:\ELE\yten\pro\Release\List\main.lst                    #
#    Object file  =  E:\ELE\yten\pro\Release\Obj\main.o                       #
#                                                                             #
#                                                                             #
###############################################################################

E:\ELE\yten\pro\app\main.c
      1          /*************************************************************************
      2           *
      3           *    Used with ICCARM and AARM.
      4           *
      5           *    (c) Copyright IAR Systems 2007
      6           *
      7           *    File name   : main.c
      8           *    Description : Define main module
      9           *
     10           *    History :
     11           *    1. Date        : 19, July 2006
     12           *       Author      : Stanimir Bonev
     13           *       Description : Create
     14           *
     15           *  This example project shows how to use the IAR Embedded Workbench
     16           * for ARM to develop code for the IAR STM32-SK board. It shows basic
     17           * use of parallel I/O, timer, interrupt controller, ADC and interface to
     18           * a LCD HD44780 compatible module.
     19           *  It show the position of the potentiometer in percents (ADC Channel 15).
     20           *
     21           *  Jumpers:
     22           *   PWR_SEL - depending of power source
     23           *
     24           *    $Revision: 19278 $
     25           **************************************************************************/
     26          #define   EXT
     27          #define   MCP2515
     28          #define	  FILE_MAIN
     29           
     30          #include"ytep.h"
     31          #include"ytepfunction.h"
     32          const Int16U TEMP_TAB[]={
     33            
     34          	//0x0f2,	// -29.00		190.6521
     35          	//0x0f1,	// -28.00		178.6479
     36          	//0x0f0,	// -27.00		167.4788
     37          	0x0ef,	// -26.00		157.0812
     38          	0x0ee,	// -25.00		147.3972
     39          	0x0ed,	// -24.00		138.3733
     40          	0x0ec,	// -23.00		129.9605
     41          	0x0eb,	// -22.00		122.1136
     42          	0x0ea,	// -21.00		114.7911
     43          	0x0e9,	// -20.00		107.9547
     44          	0x0e8,	// -19.00		101.5693
     45          	0x0e6,	// -18.00		95.6023
     46          	0x0e5,	// -17.00		90.0238
     47          	0x0e4,	// -16.00		84.8062
     48          	0x0e2,	// -15.00		79.9239
     49          	0x0e1,	// -14.00		75.3534
     50          	0x0df,	// -13.00		71.0730
     51          	0x0dd,	// -12.00		67.0625
     52          	0x0dc,	// -11.00		63.3032
     53          	0x0da,	// -10.00		59.7781
     54          	0x0d8,	// -9.00		56.4710
     55          	0x0d6,	// -8.00		53.3673
     56          	0x0d4,	// -7.00		50.4533
     57          	0x0d2,	// -6.00		47.7163
     58          	0x0d0,	// -5.00		45.1444
     59          	0x0ce,	// -4.00		42.7268
     60          	0x0cc,	// -3.00		40.4534
     61          	0x0ca,	// -2.00		38.3146
     62          	0x0c7,	// -1.00		36.3019
     63          	0x0c5,	// 0.00		34.4069
     64          	0x0c3,	// 1.00		32.6223
     65          	0x0c0,	// 2.00		30.9408
     66          	0x0be,	// 3.00		29.3561
     67          	0x0bb,	// 4.00		27.8619
     68          	0x0b9,	// 5.00		26.4525
     69          	0x0b6,	// 6.00		25.1228
     70          	0x0b3,	// 7.00		23.8678
     71          	0x0b0,	// 8.00		22.6828
     72          	0x0ae,	// 9.00		21.5635
     73          	0x0ab,	// 10.00		20.5060
     74          	0x0a8,	// 11.00		19.5065
     75          	0x0a5,	// 12.00		18.5615
     76          	0x0a2,	// 13.00		17.6678
     77          	0x09f,	// 14.00		16.8222
     78          	0x09d,	// 15.00		16.0219
     79          	0x09a,	// 16.00		15.2643
     80          	0x097,	// 17.00		14.5468
     81          	0x094,	// 18.00		13.8672
     82          	0x091,	// 19.00		13.2231
     83          	0x08e,	// 20.00		12.6126
     84          	0x08b,	// 21.00		12.0337
     85          	0x088,	// 22.00		11.4847
     86          	0x085,	// 23.00		10.9637
     87          	0x082,	// 24.00		10.4693
     88          	0x07f,	// 25.00		10.0000
     89          	0x07c,	// 26.00		9.5543
     90          	0x079,	// 27.00		9.1310
     91          	0x076,	// 28.00		8.7287
     92          	0x074,	// 29.00		8.3464
     93          	0x071,	// 30.00		7.9829
     94          	0x06e,	// 31.00		7.6372
     95          	0x06b,	// 32.00		7.3084
     96          	0x068,	// 33.00		6.9956
     97          	0x066,	// 34.00		6.6978
     98          	0x063,	// 35.00		6.4144
     99          	0x061,	// 36.00		6.1444
    100          	0x05e,	// 37.00		5.8873
    101          	0x05b,	// 38.00		5.6423
    102          	0x059,	// 39.00		5.4089
    103          	0x057,	// 40.00		5.1863
    104          	0x054,	// 41.00		4.9741
    105          	0x052,	// 42.00		4.7717
    106          	0x050,	// 43.00		4.5786
    107          	0x04d,	// 44.00		4.3943
    108          	0x04b,	// 45.00		4.2185
    109          	0x049,	// 46.00		4.0506
    110          	0x047,	// 47.00		3.8902
    111          	0x045,	// 48.00		3.7371
    112          	0x043,	// 49.00		3.5908
    113          	0x041,	// 50.00		3.4509
    114          	0x03f,	// 51.00		3.3173
    115          	0x03d,	// 52.00		3.1895
    116          	0x03b,	// 53.00		3.0673
    117          	0x03a,	// 54.00		2.9504
    118          	0x038,	// 55.00		2.8386
    119          	0x036,	// 56.00		2.7316
    120          	0x035,	// 57.00		2.6291
    121          	0x033,	// 58.00		2.5311
    122          	0x031,	// 59.00		2.4372
    123          	0x030,	// 60.00		2.3472
    124          	0x02f,	// 61.00		2.2611
    125          	0x02d,	// 62.00		2.1785
    126          	0x02c,	// 63.00		2.0994
    127          	0x02a,	// 64.00		2.0235
    128          	0x029,	// 65.00		1.9508
    129          	0x028,	// 66.00		1.8810
    130          	0x027,	// 67.00		1.8141
    131          	0x025,	// 68.00		1.7499
    132          	0x024,	// 69.00		1.6883
    133          	0x023,	// 70.00		1.6292
    134          	0x022,	// 71.00		1.5724
    135          	0x021,	// 72.00		1.5179
    136          	0x020,	// 73.00		1.4656
    137          	0x01f,	// 74.00		1.4153
    138          	0x01e,	// 75.00		1.3670
    139          	0x01d,	// 76.00		1.3206
    140          	0x01c,	// 77.00		1.2759
    141          	0x01b,	// 78.00		1.2330
    142          	0x01b,	// 79.00		1.1918
    143          	0x01a,	// 80.00		1.1522
    144          	0x019,	// 81.00		1.1140
    145          	0x018,	// 82.00		1.0773
    146          	0x018,	// 83.00		1.0420
    147          	0x017,	// 84.00		1.0080
    148          	0x016,	// 85.00		0.9753
    149          	0x015,	// 86.00		0.9438
    150          	0x015,	// 87.00		0.9135
    151          	0x014,	// 88.00		0.8843
    152          	0x014,	// 89.00		0.8562
    153          	0x013,	// 90.00		0.8291
    154          	0x012,	// 91.00		0.8030
    155          	0x012,	// 92.00		0.7778
    156          	0x011,	// 93.00		0.7536
    157          	0x011,	// 94.00		0.7302
    158          	0x010,	// 95.00		0.7076
    159          	0x010,	// 96.00		0.6859
    160          	0x0f,	// 97.00		0.6649
    161          	0x0f,	// 98.00		0.6447
    162          	0x0f,	// 99.00		0.6252
    163          	0x0e,	// 100.00		0.6063
    164          	0x0e,	// 101.00		0.5882
    165          	0x0d,	// 102.00		0.5706
    166          	0x0d,	// 103.00		0.5537
    167          	0x0d,	// 104.00		0.5373
    168          	0x0c,	// 105.00		0.5215
    169          	0x0c,	// -30.00		203.5600
    170                  0x0B,	// -30.00		203.5600
    171                  0x0B,	// -30.00		203.5600
    172          };
    173          /*************************************************************************
    174           * Function Name: Timer0IntrHandler
    175           * Parameters: none
    176           *
    177           * Return: none
    178           *
    179           * Description: Timer 0 interrupt handler
    180           *
    181           *************************************************************************/
    182          /*************************************************************************
    183           * Function Name: Clk_Init
    184           * Parameters: Int32U Frequency
    185           * Return: Int32U
    186           *
    187           * Description: Init clock system
    188           *
    189           *************************************************************************/
    190          void Clk_Init (void)
    191          {
    192            // 1. Clocking the controller from internal HSI RC (8 MHz)
    193            RCC_HSICmd(ENABLE);
    194            // wait until the HSI is ready
    195            while(RCC_GetFlagStatus(RCC_FLAG_HSIRDY) == RESET);
    196            RCC_SYSCLKConfig(RCC_SYSCLKSource_HSI);
    197          
    198            // 2. Enable ext. high frequency OSC
    199            RCC_HSEConfig(RCC_HSE_ON);
    200            // wait until the HSE is ready
    201            while(RCC_GetFlagStatus(RCC_FLAG_HSERDY) == RESET);
    202            // 3. Init PLL
    203            RCC_PLLConfig(RCC_PLLSource_HSE_Div1,RCC_PLLMul_9); // 72MHz
    204            RCC_PLLCmd(ENABLE);
    205            // wait until the PLL is ready
    206            while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET);
    207            // 4. Set system clock dividers
    208            RCC_USBCLKConfig(RCC_USBCLKSource_PLLCLK_1Div5);
    209            RCC_ADCCLKConfig(RCC_PCLK2_Div8);

⌨️ 快捷键说明

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