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

📄 avrgsm_com.lst

📁 SMS傳送Sourcode,compiler with C,AT command
💻 LST
字号:
##############################################################################
#                                                                            #
#                                                      22/Sep/2005  00:56:53 #
# IAR Atmel AVR C/C++ Compiler V4.10A/W32, Evaluation Version                #
# Copyright 1996-2005 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Source file  =  C:\Documents and Settings\vemund\Desktop\AVRGSM\Files\A #
#                    VRGSM_com.c                                             #
#    Command line =  --cpu=m128 -ms -o "C:\Documents and                     #
#                    Settings\vemund\Desktop\AVRGSM\Debug\Obj\" -lCN         #
#                    "C:\Documents and Settings\vemund\Desktop\AVRGSM\Debug\ #
#                    List\" -lA "C:\Documents and                            #
#                    Settings\vemund\Desktop\AVRGSM\Debug\List\" -y          #
#                    --initializers_in_flash -z3 --no_cse --no_inline        #
#                    --no_code_motion --no_cross_call --no_clustering        #
#                    --no_tbaa --debug -DENABLE_BIT_DEFINITIONS -e -I        #
#                    D:\Programs\iar\avr\INC\ -I                             #
#                    D:\Programs\iar\avr\INC\CLIB\ --eeprom_size 4096        #
#                    "C:\Documents and Settings\vemund\Desktop\AVRGSM\Files\ #
#                    AVRGSM_com.c"                                           #
#    List file    =  C:\Documents and Settings\vemund\Desktop\AVRGSM\Debug\L #
#                    ist\AVRGSM_com.lst                                      #
#    Object file  =  C:\Documents and Settings\vemund\Desktop\AVRGSM\Debug\O #
#                    bj\AVRGSM_com.r90                                       #
#                                                                            #
#                                                                            #
##############################################################################

C:\Documents and Settings\vemund\Desktop\AVRGSM\Files\AVRGSM_com.c
      1          /*! \file ********************************************************************
      2          *
      3          * Atmel Corporation
      4          *
      5          * - File              : AVR_SMS_com.c
      6          * - Compiler          : IAR EWAAVR 3.20C
      7          *
      8          * - Support mail      : avr@atmel.com
      9          *
     10          * - Supported devices : The example is written for ATmega169
     11          *
     12          *
     13          * - AppNote           : AVR323 - Interfacing Cellphones
     14          *
     15          * - Description       : Example of how to use AVR Butterfly as Mobilephone controller
     16          *
     17          * $Revision: 1.1 $
     18          * $Date: Tuesday, November 08, 2005 12:26:18 UTC $
     19          *****************************************************************************/
     20          //Includes
     21          #include"iom169.h"
     22          
     23          
     24          
     25          
     26          /*! \brief USART initialization
     27           *
     28           *  \param    input     Desired baudrate...see datasheet
     29           *
     30           *  \retval             void
     31           *
     32           */

   \                                 In segment CODE, align 2, keep-with-next
     33          void COM_Init( unsigned int baudrate )
   \                     COM_Init:
     34          {
     35              UBRR0H = (unsigned char) (baudrate>>8);                             //Setting baudrate
   \   00000000   0198               MOVW    R19:R18, R17:R16
   \   00000002   2F23               MOV     R18, R19
   \   00000004   9320....           STS     _A_UBRR0H, R18
     36              UBRR0L = (unsigned char) baudrate;                                  //Setting baudrate
   \   00000008   9300....           STS     _A_UBRR0L, R16
     37          	
     38              UCSR0B = ( ( 1 << RXEN0 ) | ( 1 << TXEN0 ) );                       //Enable receiver and transmitter
   \   0000000C   E108               LDI     R16, 24
   \   0000000E   9300....           STS     _A_UCSR0B, R16
     39              UCSR0C = ( 1<<USBS0 )|( 1<<UCSZ01 )|( 1<<UCSZ00 );                  //8N1...see Datasheet for more information
   \   00000012   E00E               LDI     R16, 14
   \   00000014   9300....           STS     _A_UCSR0C, R16
     40          
     41          	
     42          }//end COM_Init
   \   00000018   9508               RET
     43          
     44          
     45                                  // Interrupt handler
     46          
     47          /*! \brief USART Receive interrupt service routine
     48           *
     49           */
     50          #pragma vector=USART0_RXC_vect

   \                                 In segment CODE, align 2, keep-with-next
     51          __interrupt void USART0_RX_interrupt( void )
   \                     USART0_RX_interrupt:
     52          {
   \   00000000   932A               ST      -Y, R18
   \   00000002   931A               ST      -Y, R17
   \   00000004   930A               ST      -Y, R16
   \   00000006   B71F               IN      R17, 0x3F
   \   00000008   B72B               IN      R18, 0x3B
     53          	
     54          }//end rx-isr
   \   0000000A   BF2B               OUT     0x3B, R18
   \   0000000C   BF1F               OUT     0x3F, R17
   \   0000000E   9109               LD      R16, Y+
   \   00000010   9119               LD      R17, Y+
   \   00000012   9129               LD      R18, Y+
   \   00000014   9518               RETI

   \                                 In segment INTVEC, offset 0x34, root
   \                     `??INTVEC 52`:
   \   00000034   ........           JMP     USART0_RX_interrupt

   \                                 In segment ABSOLUTE, at 0xc1
   \   union <unnamed> volatile __near _A_UCSR0B
   \                     _A_UCSR0B:
   \   00000000                      DS 1

   \                                 In segment ABSOLUTE, at 0xc2
   \   union <unnamed> volatile __near _A_UCSR0C
   \                     _A_UCSR0C:
   \   00000000                      DS 1

   \                                 In segment ABSOLUTE, at 0xc4
   \   union <unnamed> volatile __near _A_UBRR0L
   \                     _A_UBRR0L:
   \   00000000                      DS 1

   \                                 In segment ABSOLUTE, at 0xc5
   \   union <unnamed> volatile __near _A_UBRR0H
   \                     _A_UBRR0H:
   \   00000000                      DS 1

   Maximum stack usage in bytes:

     Function            CSTACK RSTACK
     --------            ------ ------
     COM_Init                0      2
     USART0_RX_interrupt     3      2


   Segment part sizes:

     Function/Label      Bytes
     --------------      -----
     COM_Init              26
     USART0_RX_interrupt   22
     ??INTVEC 52            4
     _A_UCSR0B              1
     _A_UCSR0C              1
     _A_UBRR0L              1
     _A_UBRR0H              1

 
  4 bytes in segment ABSOLUTE
 48 bytes in segment CODE
  4 bytes in segment INTVEC
 
 48 bytes of CODE memory (+ 4 bytes shared)
  0 bytes of DATA memory (+ 4 bytes shared)

Errors: none
Warnings: 1

⌨️ 快捷键说明

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