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

📄 dac.lst

📁 PIC16F877A RTC1307 LCD 16x2 keypad 4x4 and a windows application connect with PIC on RS232
💻 LST
📖 第 1 页 / 共 5 页
字号:
CCS PCM C Compiler, Version 4.016, 33351               14-12-06 15:36

               Filename: D:\Thanh Toan\Project\DAC\Code\DAC.lst

               ROM used: 7371 words (90%)
                         Largest free fragment is 504
               RAM used: 46 (12%) at main() level
                         218 (59%) worst case
               Stack:    15 worst case (8 in main + 7 for interrupts)

*
0000:  MOVLW  00
0001:  MOVWF  0A
0002:  GOTO   5B2
0003:  NOP
0004:  MOVWF  7F
0005:  SWAPF  03,W
0006:  CLRF   03
0007:  MOVWF  21
0008:  MOVF   0A,W
0009:  MOVWF  20
000A:  CLRF   0A
000B:  MOVF   04,W
000C:  MOVWF  22
000D:  MOVF   77,W
000E:  MOVWF  23
000F:  MOVF   78,W
0010:  MOVWF  24
0011:  MOVF   79,W
0012:  MOVWF  25
0013:  MOVF   7A,W
0014:  MOVWF  26
0015:  MOVF   7B,W
0016:  MOVWF  27
0017:  BCF    03.7
0018:  BCF    03.5
0019:  BTFSS  0B.4
001A:  GOTO   01D
001B:  BTFSC  0B.1
001C:  GOTO   036
001D:  MOVLW  8C
001E:  MOVWF  04
001F:  BTFSS  00.5
0020:  GOTO   023
0021:  BTFSC  0C.5
0022:  GOTO   039
0023:  MOVF   22,W
0024:  MOVWF  04
0025:  MOVF   23,W
0026:  MOVWF  77
0027:  MOVF   24,W
0028:  MOVWF  78
0029:  MOVF   25,W
002A:  MOVWF  79
002B:  MOVF   26,W
002C:  MOVWF  7A
002D:  MOVF   27,W
002E:  MOVWF  7B
002F:  MOVF   20,W
0030:  MOVWF  0A
0031:  SWAPF  21,W
0032:  MOVWF  03
0033:  SWAPF  7F,F
0034:  SWAPF  7F,W
0035:  RETFIE
0036:  BCF    0A.3
0037:  BSF    0A.4
0038:  GOTO   203
0039:  BCF    0A.3
003A:  BCF    0A.4
003B:  GOTO   2EF
.................... #include <16F877A.h> 
.................... //////// Standard Header file for the PIC16F877A device //////////////// 
.................... #device PIC16F877A 
.................... #list 
....................  
.................... #fuses NOLVP, NOWDT, XT 
.................... #use delay(clock=4000000) 
*
0381:  MOVLW  31
0382:  MOVWF  04
0383:  BSF    03.7
0384:  MOVF   00,W
0385:  BTFSC  03.2
0386:  GOTO   395
0387:  MOVLW  01
0388:  MOVWF  78
0389:  CLRF   77
038A:  DECFSZ 77,F
038B:  GOTO   38A
038C:  DECFSZ 78,F
038D:  GOTO   389
038E:  MOVLW  4A
038F:  MOVWF  77
0390:  DECFSZ 77,F
0391:  GOTO   390
0392:  GOTO   393
0393:  DECFSZ 00,F
0394:  GOTO   387
0395:  RETLW  00
....................  
.................... #use i2c(master,Slow,SDA=PIN_C4,SCL=PIN_C3) 
*
02A3:  MOVLW  08
02A4:  MOVWF  78
02A5:  NOP
02A6:  BCF    07.3
02A7:  BCF    29.3
02A8:  MOVF   29,W
02A9:  BSF    03.5
02AA:  MOVWF  07
02AB:  NOP
02AC:  BCF    03.5
02AD:  BSF    03.6
02AE:  RLF    35,F
02AF:  BCF    03.6
02B0:  BCF    07.4
02B1:  BTFSS  03.0
02B2:  GOTO   2B9
02B3:  BSF    29.4
02B4:  MOVF   29,W
02B5:  BSF    03.5
02B6:  MOVWF  07
02B7:  GOTO   2BD
02B8:  BCF    03.5
02B9:  BCF    29.4
02BA:  MOVF   29,W
02BB:  BSF    03.5
02BC:  MOVWF  07
02BD:  NOP
02BE:  BCF    03.5
02BF:  BSF    29.3
02C0:  MOVF   29,W
02C1:  BSF    03.5
02C2:  MOVWF  07
02C3:  BCF    03.5
02C4:  BTFSS  07.3
02C5:  GOTO   2C4
02C6:  DECFSZ 78,F
02C7:  GOTO   2A5
02C8:  NOP
02C9:  BCF    07.3
02CA:  BCF    29.3
02CB:  MOVF   29,W
02CC:  BSF    03.5
02CD:  MOVWF  07
02CE:  NOP
02CF:  BCF    03.5
02D0:  BSF    29.4
02D1:  MOVF   29,W
02D2:  BSF    03.5
02D3:  MOVWF  07
02D4:  NOP
02D5:  NOP
02D6:  BCF    03.5
02D7:  BSF    29.3
02D8:  MOVF   29,W
02D9:  BSF    03.5
02DA:  MOVWF  07
02DB:  BCF    03.5
02DC:  BTFSS  07.3
02DD:  GOTO   2DC
02DE:  CLRF   78
02DF:  NOP
02E0:  BTFSC  07.4
02E1:  BSF    78.0
02E2:  BCF    07.3
02E3:  BCF    29.3
02E4:  MOVF   29,W
02E5:  BSF    03.5
02E6:  MOVWF  07
02E7:  BCF    03.5
02E8:  BCF    07.4
02E9:  BCF    29.4
02EA:  MOVF   29,W
02EB:  BSF    03.5
02EC:  MOVWF  07
02ED:  BCF    03.5
02EE:  RETLW  00
*
0334:  MOVLW  08
0335:  BSF    03.6
0336:  MOVWF  36
0337:  MOVF   77,W
0338:  MOVWF  37
0339:  BCF    03.6
033A:  BSF    29.4
033B:  MOVF   29,W
033C:  BSF    03.5
033D:  MOVWF  07
033E:  NOP
033F:  BCF    03.5
0340:  BSF    29.3
0341:  MOVF   29,W
0342:  BSF    03.5
0343:  MOVWF  07
0344:  BCF    03.5
0345:  BTFSS  07.3
0346:  GOTO   345
0347:  BTFSC  07.4
0348:  BSF    03.0
0349:  BTFSS  07.4
034A:  BCF    03.0
034B:  RLF    78,F
034C:  NOP
034D:  BCF    29.3
034E:  MOVF   29,W
034F:  BSF    03.5
0350:  MOVWF  07
0351:  BCF    03.5
0352:  BCF    07.3
0353:  BSF    03.6
0354:  DECFSZ 36,F
0355:  GOTO   339
0356:  BCF    03.6
0357:  BSF    29.4
0358:  MOVF   29,W
0359:  BSF    03.5
035A:  MOVWF  07
035B:  NOP
035C:  BCF    03.5
035D:  BCF    07.4
035E:  BSF    03.6
035F:  MOVF   37,W
0360:  BTFSC  03.2
0361:  GOTO   369
0362:  BCF    03.6
0363:  BCF    29.4
0364:  MOVF   29,W
0365:  BSF    03.5
0366:  MOVWF  07
0367:  BCF    03.5
0368:  BSF    03.6
0369:  NOP
036A:  BCF    03.6
036B:  BSF    29.3
036C:  MOVF   29,W
036D:  BSF    03.5
036E:  MOVWF  07
036F:  BCF    03.5
0370:  BTFSS  07.3
0371:  GOTO   370
0372:  NOP
0373:  BCF    07.3
0374:  BCF    29.3
0375:  MOVF   29,W
0376:  BSF    03.5
0377:  MOVWF  07
0378:  NOP
0379:  BCF    03.5
037A:  BCF    07.4
037B:  BCF    29.4
037C:  MOVF   29,W
037D:  BSF    03.5
037E:  MOVWF  07
037F:  BCF    03.5
0380:  RETLW  00
*
05F6:  MOVLW  FF
05F7:  BCF    03.5
05F8:  MOVWF  29
.................... #use rs232(baud=2400, xmit=PIN_C6, rcv=PIN_C7,parity=N,bits=8) 
....................  
.................... #include <LCD_VED.c> 
.................... /////////////////////////////////////////////////////////////////////////// 
.................... ////                             LCDD.C                                //// 
.................... ////                 Driver for common LCD modules                     //// 
.................... ////                                                                   //// 
.................... ////  lcd_init()   Must be called before any other function.           //// 
.................... ////                                                                   //// 
.................... ////  lcd_putc(c)  Will display c on the next position of the LCD.     //// 
.................... ////                     The following have special meaning:           //// 
.................... ////                      \f  Clear display                            //// 
.................... ////                      \n  Go to start of second line               //// 
.................... ////                      \b  Move back one position                   //// 
.................... ////                                                                   //// 
.................... ////  lcd_gotoxy(x,y) Set write position on LCD (upper left is 1,1)    //// 
.................... ////                                                                   //// 
.................... ////  lcd_getc(x,y)   Returns character at position x,y on LCD         //// 
.................... ////                                                                   //// 
.................... /////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996,2003 Custom Computer Services           //// 
.................... //// This source code may only be used by licensed users of the CCS C  //// 
.................... //// compiler.  This source code may only be distributed to other      //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction //// 
.................... //// or distribution is permitted without written permission.          //// 
.................... //// Derivative programs created using this software in object code    //// 
.................... //// form are not restricted in any way.                               //// 
.................... /////////////////////////////////////////////////////////////////////////// 
....................  
.................... // As defined in the following structure the pin connection is as follows: 
.................... //     D0  enable 
.................... //     D1  rs 
.................... //     D2  rw 
.................... //     D4  D4 
.................... //     D5  D5 
.................... //     D6  D6 
.................... //     D7  D7 
.................... // 
.................... //   LCD pins D0-D3 are not used and PIC D3 is not used. 
....................  
.................... // Un-comment the following define to use port B 
.................... // #define use_portb_lcd TRUE 
....................  
....................  
.................... struct lcd_pin_map {                 // This structure is overlayed 
....................            BOOLEAN enable;           // on to an I/O port to gain 
....................            BOOLEAN rs;               // access to the LCD pins. 
....................            BOOLEAN rw;               // The bits are allocated from 
....................            BOOLEAN unused;           // low order up.  ENABLE will 
....................            int     data : 4;         // be pin B0. 
....................         } lcd; 
....................  
....................  
.................... //#if defined(__PCH__) 
.................... //#if defined use_portb_lcd 
.................... //   #byte lcd = 0xF81                   // This puts the entire structure 
.................... //#else 
.................... //   #byte lcd = 0xF83                   // This puts the entire structure 
.................... //#endif 
.................... //#else 
.................... //#if defined use_portb_lcd 
.................... //   #byte lcd = 6                  // on to port B (at address 6) 
.................... //#else 
.................... #byte lcd = 8                 // on to port D (at address 8) 
.................... //#endif 
.................... //#endif 
....................  
.................... //#if defined use_portb_lcd 
.................... //   #define set_tris_lcd(x) set_tris_b(x) 
.................... //#else 
.................... //   #define set_tris_lcd(x) set_tris_d(x) 

⌨️ 快捷键说明

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