?? t6963.lst
字號:
C51 COMPILER V7.50 T6963 04/19/2008 15:16:25 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE T6963
OBJECT MODULE PLACED IN T6963.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE T6963.c
line level source
1 #include"T6963.h"
2 #include"regx52.h"
3 #include "absacc.h"
4 #include"math.h"
5
6 unsigned char xdata ins _at_ 0xe000; //命令寫地址
7 unsigned char xdata dat _at_ 0xa000; //數據寫地址
8 unsigned char xdata ins_R _at_ 0xc000; //命令讀地址
9
10 // 外部RAM地址0x800-0xfff
11
12 void stste_check(void) //狀態檢測
13 {
14 1 while((ins_R & 0x03) != 0x03);
15 1 }
16
17 void ins_write(unsigned char s) //寫一個命令
18 {
19 1 stste_check();
20 1 ins=s;
21 1 }
22
23 void dat_write(unsigned char d) //寫一個數據
24 {
25 1 stste_check();
26 1 dat=d;
27 1 }
28
29 void set_gra_pos(unsigned char x,unsigned char y) //x:0-16 y:0-127 設置圖形區坐標
30 {
31 1 unsigned int temp=x+16*y;
32 1 dat_write((unsigned char)(temp&0xff));
33 1 dat_write((unsigned char)(temp>>8)+0x08);
34 1 ins_write(0x24);
35 1 }
36
37 void set_text_pos(unsigned char x,unsigned char y) //x:0-16 y:0-16 設置文本區坐標
38 {
39 1 unsigned int temp=x+16*y;
40 1 dat_write((unsigned char)(temp&0xff));
41 1 dat_write((unsigned char)(temp>>8));
42 1 ins_write(0x24);
43 1 }
44 void lcd_init(void) //初始化LCD
45 {
46 1 dat_write(0);//設置文本顯示區域首地址
47 1 dat_write(0);
48 1 ins_write(0x40);
49 1
50 1 dat_write(0x10);//設置文本顯示區域寬度
51 1 dat_write(0); //即一行顯示所占的字節數
52 1 ins_write(0x41);
53 1
54 1 dat_write(0x0);//設置圖形顯示區域首地址
55 1 dat_write(0x08);
C51 COMPILER V7.50 T6963 04/19/2008 15:16:25 PAGE 2
56 1 ins_write(0x42);
57 1
58 1 dat_write(0x10);//設置圖形顯示區域寬度
59 1 dat_write(0);
60 1 ins_write(0x43);
61 1
62 1 ins_write(0xa1);//光標形狀設置
63 1
64 1 ins_write(0x80);//顯示或合成
65 1
66 1 ins_write(0x9c);//顯示開關設置
67 1
68 1 dat_write(0);//設置顯示RAM首地址
69 1 dat_write(0x08);
70 1 ins_write(0x24);
71 1 }
72
73 void lcd_char(unsigned char c)
74 {
75 1 dat_write(c-32);
76 1 ins_write(0xc0);
77 1 }
78
79 void pixel(unsigned char x,unsigned char y) //x:0-127 y:0-127 顯示一個點
80 {
81 1 unsigned char temp;
82 1 temp=x>>3;
83 1 set_gra_pos(temp,y);
84 1 temp=(7-(x % 8))&(0x07);
85 1
86 1 temp = 0xF0 | temp | 0x08; // 字節內位置計算
87 1 ins_write(temp);
88 1 }
89
90 void gracls(void)
91 {
92 1 unsigned char i,j;
93 1 set_gra_pos(0,0);
94 1 ins_write(0xb0);
95 1 for(i=0;i<=33;i++)
96 1 {
97 2 for(j=0;j<=15;j++)
98 2 {
99 3 dat_write(0);
100 3 }
101 2 }
102 1 ins_write(0xb2);
103 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 244 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -