📄 register_lcd_main.lst
字号:
ARM COMPILER V2.42, Register_LCD_Main 06/03/07 11:32:18 PAGE 1
ARM COMPILER V2.42, COMPILATION OF MODULE Register_LCD_Main
OBJECT MODULE PLACED IN Register_LCD_Main.OBJ
COMPILER INVOKED BY: C:\Keil\ARM\BIN\CA.exe Register_LCD_Main.c THUMB DEBUG TABS(4)
stmt level source
1 /*********************************************************************
2
3 Author : ADI - Apps www.analog.com/MicroConverter
4
5 Date : August 2006
6
7 File : Register_LCD_Main.c
8
9 Hardware : Applicable to ADuC702x rev H or I silicon
10
11 Description : This file provides the routines necessary to interface
12 to a Register based LCD display module.
13
14 *********************************************************************/
15
16 #include <ADuC7020.h> // Include ADuC7020 Header File
17 #include <Register_LCD_Driver.h>
18
19
20 volatile unsigned short ucFlag, ucAwaiting_IRQ = 0;
21 void main (void)
22 {
23 1 while (1)
24 1 {
25 2 delay(3000); // KS0070B needs 30mS after power-on
26 2 IRQEN = 0;
27 2 ucAwaiting_IRQ = 0;
28 2 Init_MC08_LCD(); // Init the ADuC7020 interface to the LCD module
29 2 Select_Function_Set(0x38); // Select 8-bit character set, 2 line display
30 2 // Clear_Display_LCD(0x1);
31 2 Clear_Display_LCD(0xE); // Clear Display/Blink off/display on
32 2
33 2 Set_Entry_Mode(0x6); // Increment on/No shifting
34 2 Clear_Display_LCD(0x2);
35 2 Clear_Display_LCD(0x1);
36 2 if (ucFlag == 0)
37 2 {
38 3 Wr_Data_LCD(0x41); //A
39 3 Wr_Data_LCD(0x6E); //n
40 3 Wr_Data_LCD(0x61); //a
41 3 Wr_Data_LCD(0x6C); //l
42 3 Wr_Data_LCD(0x6F); //o
43 3 Wr_Data_LCD(0x67); //g
44 3 Wr_Data_LCD(0x20); //_
45 3 Wr_Data_LCD(0x44); //D
46 3 Wr_Data_LCD(0x65); //e
47 3 Wr_Data_LCD(0x76); //v
48 3 Wr_Data_LCD(0x69); //i
49 3 Wr_Data_LCD(0x63); //c
50 3 Wr_Data_LCD(0x65); //e
51 3 Wr_Data_LCD(0x73); //s
52 3
53 3 Clear_Display_LCD(0x2);
54 3
55 3
56 3
57 3 // Clear_Display_LCD(0x1);
58 3 Clear_Display_LCD(0x40); // Second Line
59 3 Clear_Display_LCD(0xC0); // Second Line
ARM COMPILER V2.42, Register_LCD_Main 06/03/07 11:32:18 PAGE 2
60 3
61 3 Wr_Data_LCD(0x41); //A
62 3 Wr_Data_LCD(0x44); //D
63 3 Wr_Data_LCD(0x75); //u
64 3 Wr_Data_LCD(0x43); //C
65 3 Wr_Data_LCD(0x37); //7
66 3 Wr_Data_LCD(0x30); //0
67 3 Wr_Data_LCD(0x32); //2
68 3 Wr_Data_LCD(0x30); //0
69 3 Wr_Data_LCD(0x20); //_
70 3 Wr_Data_LCD(0x4C); //L
71 3 Wr_Data_LCD(0x43); //C
72 3 Wr_Data_LCD(0x44); //D
73 3 // Wr_Data_LCD(0x20); //_
74 3 Wr_Data_LCD(0x64); //d
75 3 Wr_Data_LCD(0x65); //e
76 3 Wr_Data_LCD(0x6D); //m
77 3 Wr_Data_LCD(0x6F); //o
78 3
79 3 delay(50000);
80 3 delay(50000);
81 3 delay(50000);
82 3 delay(50000);
83 3 }
84 2 else
85 2 {
86 3 Wr_Data_LCD(0x41); //A
87 3 Wr_Data_LCD(0x44); //D
88 3 Wr_Data_LCD(0x75); //u
89 3 Wr_Data_LCD(0x43); //C
90 3 Wr_Data_LCD(0x37); //7
91 3 Wr_Data_LCD(0x30); //0
92 3 Wr_Data_LCD(0x32); //2
93 3 Wr_Data_LCD(0x30); //0
94 3 Wr_Data_LCD(0x20); //_
95 3 Wr_Data_LCD(0x4C); //L
96 3 Wr_Data_LCD(0x43); //C
97 3 Wr_Data_LCD(0x44); //D
98 3 // Wr_Data_LCD(0x20); //_
99 3 Wr_Data_LCD(0x64); //d
100 3 Wr_Data_LCD(0x65); //e
101 3 Wr_Data_LCD(0x6D); //m
102 3 Wr_Data_LCD(0x6F); //o
103 3 while (1)
104 3 {}
105 3 }
106 2
107 2 while (ucAwaiting_IRQ == 0)
108 2 {
109 3 IRQEN = XIRQ0_BIT; // Enable XIRQ0 in IRQEnable
110 3 delay (5000);
111 3 }
112 2 }
113 1 }
114
115
116 /********************************************************************/
117 /* */
118 /* Interrupt Service Rountine */
119 /* */
120 /********************************************************************/
121
122 void IRQ_Handler() __irq
123 {
124 1 GP4DAT ^= 0x00040000; // Complement P4.2
125 1 while(GP0DAT & 0x00010){} // wait for XIRQ to be low again
ARM COMPILER V2.42, Register_LCD_Main 06/03/07 11:32:18 PAGE 3
126 1 ucFlag ^=0x01;
127 1 ucAwaiting_IRQ = 1;
128 1 return ;
129 1 }
ARM COMPILER V2.42, Register_LCD_Main 06/03/07 11:32:18 PAGE 4
ASSEMBLY LISTING OF GENERATED OBJECT CODE
*** EXTERNALS:
EXTERN CODE16 (Init_MC08_LCD?T)
EXTERN CODE16 (Select_Function_Set?T)
EXTERN CODE16 (Clear_Display_LCD?T)
EXTERN CODE16 (Set_Entry_Mode?T)
EXTERN CODE16 (Wr_Data_LCD?T)
EXTERN CODE16 (delay?T)
EXTERN NUMBER (__startup)
*** PUBLICS:
PUBLIC main
PUBLIC IRQ_Handler?A
PUBLIC ucFlag
PUBLIC ucAwaiting_IRQ
*** DATA SEGMENT '?DT0?Register_LCD_Main':
00000000 ucFlag:
00000000 DS 2
00000002 ucAwaiting_IRQ:
00000002 BEGIN_INIT
00000002 0000 DW 0x0
00000004 END_INIT
*** CODE SEGMENT '?PR?main?Register_LCD_Main':
21: void main (void)
00000000 B500 PUSH {LR}
23: while (1)
00000002 L_3:
25: delay(3000); // KS0070B needs 30mS after power-on
00000002 4800 LDR R0,=0xBB8
00000004 F7FF BL delay?T ; T=0x0001 (1)
00000006 FFFC BL delay?T ; T=0x0001 (2)
26: IRQEN = 0;
00000008 2100 MOV R1,#0x0
0000000A 4800 LDR R0,=0xFFFF0008
0000000C 6001 STR R1,[R0,#0x0]
27: ucAwaiting_IRQ = 0;
0000000E 2100 MOV R1,#0x0
00000010 4800 LDR R0,=ucAwaiting_IRQ ; ucAwaiting_IRQ
00000012 8001 STRH R1,[R0,#0x0] ; ucAwaiting_IRQ
28: Init_MC08_LCD(); // Init the ADuC7020 interface to the LCD module
00000014 F7FF BL Init_MC08_LCD?T ; T=0x0001 (1)
00000016 FFF4 BL Init_MC08_LCD?T ; T=0x0001 (2)
29: Select_Function_Set(0x38); // Select 8-bit character set, 2 line display
00000018 2038 MOV R0,#0x38
0000001A F7FF BL Select_Function_Set?T ; T=0x0001 (1)
0000001C FFF1 BL Select_Function_Set?T ; T=0x0001 (2)
31: Clear_Display_LCD(0xE); // Clear Display/Blink off/display on
0000001E 200E MOV R0,#0xE
00000020 F7FF BL Clear_Display_LCD?T ; T=0x0001 (1)
00000022 FFEE BL Clear_Display_LCD?T ; T=0x0001 (2)
33: Set_Entry_Mode(0x6); // Increment on/No shifting
00000024 2006 MOV R0,#0x6
00000026 F7FF BL Set_Entry_Mode?T ; T=0x0001 (1)
00000028 FFEB BL Set_Entry_Mode?T ; T=0x0001 (2)
34: Clear_Display_LCD(0x2);
0000002A 2002 MOV R0,#0x2
0000002C F7FF BL Clear_Display_LCD?T ; T=0x0001 (1)
0000002E FFE8 BL Clear_Display_LCD?T ; T=0x0001 (2)
35: Clear_Display_LCD(0x1);
00000030 2001 MOV R0,#0x1
00000032 F7FF BL Clear_Display_LCD?T ; T=0x0001 (1)
00000034 FFE5 BL Clear_Display_LCD?T ; T=0x0001 (2)
ARM COMPILER V2.42, Register_LCD_Main 06/03/07 11:32:18 PAGE 5
36: if (ucFlag == 0)
00000036 4800 LDR R0,=ucFlag ; ucFlag
00000038 8800 LDRH R0,[R0,#0x0] ; ucFlag
0000003A 2800 CMP R0,#0x0
0000003C D16F BNE L_5 ; T=0x0000011E
38: Wr_Data_LCD(0x41); //A
0000003E 2041 MOV R0,#0x41
00000040 F7FF BL Wr_Data_LCD?T ; T=0x0001 (1)
00000042 FFDE BL Wr_Data_LCD?T ; T=0x0001 (2)
39: Wr_Data_LCD(0x6E); //n
00000044 206E MOV R0,#0x6E
00000046 F7FF BL Wr_Data_LCD?T ; T=0x0001 (1)
00000048 FFDB BL Wr_Data_LCD?T ; T=0x0001 (2)
40: Wr_Data_LCD(0x61); //a
0000004A 2061 MOV R0,#0x61
0000004C F7FF BL Wr_Data_LCD?T ; T=0x0001 (1)
0000004E FFD8 BL Wr_Data_LCD?T ; T=0x0001 (2)
41: Wr_Data_LCD(0x6C); //l
00000050 206C MOV R0,#0x6C
00000052 F7FF BL Wr_Data_LCD?T ; T=0x0001 (1)
00000054 FFD5 BL Wr_Data_LCD?T ; T=0x0001 (2)
42: Wr_Data_LCD(0x6F); //o
00000056 206F MOV R0,#0x6F
00000058 F7FF BL Wr_Data_LCD?T ; T=0x0001 (1)
0000005A FFD2 BL Wr_Data_LCD?T ; T=0x0001 (2)
43: Wr_Data_LCD(0x67); //g
0000005C 2067 MOV R0,#0x67
0000005E F7FF BL Wr_Data_LCD?T ; T=0x0001 (1)
00000060 FFCF BL Wr_Data_LCD?T ; T=0x0001 (2)
44: Wr_Data_LCD(0x20); //_
00000062 2020 MOV R0,#0x20
00000064 F7FF BL Wr_Data_LCD?T ; T=0x0001 (1)
00000066 FFCC BL Wr_Data_LCD?T ; T=0x0001 (2)
45: Wr_Data_LCD(0x44); //D
00000068 2044 MOV R0,#0x44
0000006A F7FF BL Wr_Data_LCD?T ; T=0x0001 (1)
0000006C FFC9 BL Wr_Data_LCD?T ; T=0x0001 (2)
46: Wr_Data_LCD(0x65); //e
0000006E 2065 MOV R0,#0x65
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -