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

📄 ex1.lst

📁 can bus application
💻 LST
📖 第 1 页 / 共 5 页
字号:
                                           copy_loop:                                                                       C:\mcc18\src\startup\c018i.c
00116c   e102     BNZ       0x1172         	bnz 2 // copy_one_byte                                                          C:\mcc18\src\startup\c018i.c
00116e   539a     MOVF      0x9a,0x1,0x1   	movf curr_byte + 1, 1, 1                                                        C:\mcc18\src\startup\c018i.c
001170   e007     BZ        0x1180         	bz 7 // done_copying                                                            C:\mcc18\src\startup\c018i.c
                                                                                                                            C:\mcc18\src\startup\c018i.c
                                           copy_one_byte:                                                                   C:\mcc18\src\startup\c018i.c
001172   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
001174   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
001176   6eee     MOVWF     0xee,0x0       	movwf POSTINC0, 0                                                               C:\mcc18\src\startup\c018i.c
                                                                                                                            C:\mcc18\src\startup\c018i.c
                                           	// decrement byte counter                                                       C:\mcc18\src\startup\c018i.c
001178   0799     DECF      0x99,0x1,0x1   	decf curr_byte, 1, 1                                                            C:\mcc18\src\startup\c018i.c
00117a   e2f8     BC        0x116c         	bc -8 // copy_loop                                                              C:\mcc18\src\startup\c018i.c
00117c   079a     DECF      0x9a,0x1,0x1           decf curr_byte + 1, 1, 1                                                 C:\mcc18\src\startup\c018i.c
00117e   d7f9     BRA       0x1172         	bra -7 // copy_one_byte                                                         C:\mcc18\src\startup\c018i.c
                                                                                                                            C:\mcc18\src\startup\c018i.c
                                           done_copying:                                                                    C:\mcc18\src\startup\c018i.c
                                                                                                                            C:\mcc18\src\startup\c018i.c
                                                 _endasm                                                                    C:\mcc18\src\startup\c018i.c
                                                 /* restore the table pointer for the next entry */                         C:\mcc18\src\startup\c018i.c
001180   c09d     MOVFF     0x9d,0xff6           TBLPTR = data_ptr;                                                         C:\mcc18\src\startup\c018i.c
001182   fff6                                                                                                               
001184   c09e     MOVFF     0x9e,0xff7                                                                                      
001186   fff7                                                                                                               
001188   c09f     MOVFF     0x9f,0xff8                                                                                      
00118a   fff8                                                                                                               
                                                 /* next entry... */                                                        C:\mcc18\src\startup\c018i.c
00118c   0100     MOVLB     0x0                  curr_entry--;                                                              C:\mcc18\src\startup\c018i.c
00118e   079b     DECF      0x9b,0x1,0x1                                                                                    
001190   0e00     MOVLW     0x0                                                                                             
001192   5b9c     SUBWFB    0x9c,0x1,0x1                                                                                    
001194   d7bf     BRA       0x1114               goto test;                                                                 C:\mcc18\src\startup\c018i.c
                                           done:                                                                            C:\mcc18\src\startup\c018i.c
                                           ;                                                                                C:\mcc18\src\startup\c018i.c
001196   0012     RETURN    0x0            }                                                                                C:\mcc18\src\startup\c018i.c
                                                                                                                            C:\CAN202A\WAP_LCD.C
                                           #include "WAP_LCD.h"                                                             C:\CAN202A\WAP_LCD.C
                                           #include <p18F458.h>                                                             C:\CAN202A\WAP_LCD.C
                                           #include <delays.h>                                                              C:\CAN202A\WAP_LCD.C
                                           //                                                                               C:\CAN202A\WAP_LCD.C
                                           // Defines for I/O ports that provide LCD data & control                         C:\CAN202A\WAP_LCD.C
                                           // PORTD[0:3]-->DB[4:7]: Higher order 4 lines data bus with bidirectional        C:\CAN202A\WAP_LCD.C
                                           //					  : DB7 can be used as a BUSY flag                                        C:\CAN202A\WAP_LCD.C
                                           // PORTA,1 --> [E] : LCD operation start signal control                          C:\CAN202A\WAP_LCD.C
                                           // PORTA,2 --> [RW]: LCD Read/Write control                                      C:\CAN202A\WAP_LCD.C
                                           // PORTA,3 --> [RS]: LCD Register Select control                                 C:\CAN202A\WAP_LCD.C
                                           //		      	   : "0" for Instrunction register (Write), Busy Flag (Read)          C:\CAN202A\WAP_LCD.C
                                           //				   : "1" for data register (Read/Write)                                    C:\CAN202A\WAP_LCD.C
                                           //                                                                               C:\CAN202A\WAP_LCD.C
                                           #define CPU_SPEED		16				// CPU speed is 16 Mhz !!                               C:\CAN202A\WAP_LCD.C
                                           #define LCD_RS				LATDbits.LATD4		// The definition of control pins              C:\CAN202A\WAP_LCD.C
                                           #define LCD_RW			LATDbits.LATD5                                                  C:\CAN202A\WAP_LCD.C
                                           #define LCD_E				LATAbits.LATA2                                                  C:\CAN202A\WAP_LCD.C
                                           #define LCD_DATA			LATD			// PORTD[0:3] as LCD DB[4:7]                           C:\CAN202A\WAP_LCD.C
                                           #define DIR_LCD_DATA	TRISD	                                                      C:\CAN202A\WAP_LCD.C
                                                                                                                            C:\CAN202A\WAP_LCD.C
                                                                                                                            C:\CAN202A\WAP_LCD.C
                                           //  LCD Module commands                                                          C:\CAN202A\WAP_LCD.C
                                           #define DISP_2Line_8Bit		0b00111000                                              C:\CAN202A\WAP_LCD.C
                                           #define DISP_2Line_4Bit		0b00101000                                              C:\CAN202A\WAP_LCD.C
                                           #define DISP_ON			0x00C		// Display on                                           C:\CAN202A\WAP_LCD.C
                                           #define DISP_ON_C			0x00E		// Display on, Cursor on                              C:\CAN202A\WAP_LCD.C
                                           #define DISP_ON_B			0x00F		// Display on, Cursor on, Blink cursor                C:\CAN202A\WAP_LCD.C
                                           #define DISP_OFF			0x008		// Display off                                         C:\CAN202A\WAP_LCD.C
                                           #define CLR_DISP			0x001		// Clear the Display                                   C:\CAN202A\WAP_LCD.C
                                           #define ENTRY_INC			0x006		//                                                    C:\CAN202A\WAP_LCD.C
                                           #define ENTRY_INC_S		0x007		//                                                   C:\CAN202A\WAP_LCD.C
                                           #define ENTRY_DEC		0x004		//                                                     C:\CAN202A\WAP_LCD.C
                                           #define ENTRY_DEC_S		0x005		//                                                   C:\CAN202A\WAP_LCD.C
                                           #define DD_RAM_ADDR	0x080		// Least Significant 7-bit are for address            C:\CAN202A\WAP_LCD.C
                                           #define DD_RAM_UL		0x080		// Upper Left coner of the Display	                    C:\CAN202A\WAP_LCD.C
                                           		                                                                               C:\CAN202A\WAP_LCD.C
                                           unsigned char 	Temp_CMD ;                                                        C:\CAN202A\WAP_LCD.C
                                           unsigned char 	Str_Temp ;                                                        C:\CAN202A\WAP_LCD.C
                                           unsigned char	Out_Mask ;	                                                        C:\CAN202A\WAP_LCD.C
                                           unsigned char	Temp_LCD_DATA ;	                                                   C:\CAN202A\WAP_LCD.C
                                                                                                                            C:\CAN202A\WAP_LCD.C
                                                                                                                            C:\CAN202A\WAP_LCD.C
                                           void OpenLCD(void)                                                               C:\CAN202A\WAP_LCD.C
                                                                                                                            C:\CAN202A\WAP_LCD.C
                                           {                                                                                C:\CAN202A\WAP_LCD.C
000d7a   0ef0     MOVLW     0xf0           	ADCON1=(ADCON1 & 0xF0) | 0b00001110;	// Set AN0 for analog input                C:\CAN202A\WAP_LCD.C
000d7c   14c1     ANDWF     0xc1,0x0,0x0                                                                                    
000d7e   090e     IORLW     0xe                                                                                             
000d80   6ec1     MOVWF     0xc1,0x0                                                                                        
000d82   9489     BCF       0x89,0x2,0x0    	LCD_E=0;									                                                              C:\CAN202A\WAP_LCD.C
000d84   cf8c     MOVFF     0xf8c,0xa3     	Temp_LCD_DATA = LCD_DATA ;	                                                     C:\CAN202A\WAP_LCD.C
000d86   f0a3                                                                                                               
                                           	                                                                                C:\CAN202A\WAP_LCD.C
000d88   6a8c     CLRF      0x8c,0x0       	LCD_DATA = 0x00;							// LCD DB[4:7] & RS & R/W --> Low                        C:\CAN202A\WAP_LCD.C
                                                                                                                            C:\CAN202A\WAP_LCD.C
000d8a   6a95     CLRF      0x95,0x0       	DIR_LCD_DATA = 0x00;					// LCD DB[4:7} & RS & R/W are output function          C:\CAN202A\WAP_LCD.C

⌨️ 快捷键说明

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