?? lcd.lst
字號:
C51 COMPILER V7.06 LCD 08/18/2005 15:30:29 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE LCD
OBJECT MODULE PLACED IN LCD.OBJ
COMPILER INVOKED BY: d:\Keil777\C51\BIN\C51.EXE LCD.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include <unistd.h>
*** WARNING C318 IN LINE 1 OF LCD.c: can't open file 'unistd.h'
2 #include <string.h>
3 #include <io.h>
*** WARNING C318 IN LINE 3 OF LCD.c: can't open file 'io.h'
4 #include "system.h"
5 #include "LCD.h"
6 //-------------------------------------------------------------------------
7 void LCD_Init()
8 {
9 1 lcd_write_cmd(LCD_16207_0_BASE,0x38);
*** WARNING C206 IN LINE 9 OF LCD.C: 'IOWR': missing function-prototype
*** ERROR C267 IN LINE 9 OF LCD.C: 'IOWR': requires ANSI-style prototype
10 1 usleep(2000);
11 1 lcd_write_cmd(LCD_16207_0_BASE,0x0C);
12 1 usleep(2000);
13 1 lcd_write_cmd(LCD_16207_0_BASE,0x01);
14 1 usleep(2000);
15 1 lcd_write_cmd(LCD_16207_0_BASE,0x06);
16 1 usleep(2000);
17 1 lcd_write_cmd(LCD_16207_0_BASE,0x80);
18 1 usleep(2000);
19 1 }
20 //-------------------------------------------------------------------------
21 void LCD_Show_Text(char* Text)
22 {
23 1 int i;
24 1 for(i=0;i<strlen(Text);i++)
25 1 {
26 2 lcd_write_data(LCD_16207_0_BASE,Text[i]);
27 2 usleep(2000);
28 2 }
29 1 }
30 //-------------------------------------------------------------------------
31 void LCD_Line2()
32 {
33 1 lcd_write_cmd(LCD_16207_0_BASE,0xC0);
34 1 usleep(2000);
35 1 }
36 //-------------------------------------------------------------------------
37 void LCD_Test()
38 {
39 1 char Text1[16] = "<NIOS II on UP4>";
40 1 char Text2[16] = "Nice to See You!";
41 1 // Initial LCD
42 1 LCD_Init();
43 1 // Show Text to LCD
44 1 LCD_Show_Text(Text1);
45 1 // Change Line2
46 1 LCD_Line2();
47 1 // Show Text to LCD
48 1 LCD_Show_Text(Text2);
49 1 }
50 //-------------------------------------------------------------------------
C51 COMPILATION COMPLETE. 3 WARNING(S), 1 ERROR(S)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -