stm32_ota/OLED显示屏资料/03中景园电子1.3英寸OLED显示屏测试程序/02中景园电子1.3英寸OLED显示屏_C51系列_IIC_例程推荐使用/main.LST
2024-12-17 20:03:43 +08:00

112 lines
4.5 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

C51 COMPILER V9.52.0.0 MAIN 05/03/2018 10:37:07 PAGE 1
C51 COMPILER V9.52.0.0, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: D:\KEIL_51\C51\BIN\C51.EXE main.c BROWSE INCDIR(.\SRC) DEBUG OBJECTEXTEND TABS(2)
line level source
1 //////////////////////////////////////////////////////////////////////////////////
2 //本程序只供学习使用,未经作者许可,不得用于其它任何用途
3 //中景园电子
4 //店铺地址http://shop73023976.taobao.com/?spm=2013.1.0.0.M4PqC2
5 //
6 // 文 件 名 : main.c
7 // 版 本 号 : v2.0
8 // 作 者 : HuangKai
9 // 生成日期 : 2014-0101
10 // 最近修改 :
11 // 功能描述 : OLED 4接口演示例程(51系列)
12 // 说明:
13 // ----------------------------------------------------------------
14 // GND 电源地
15 // VCC 接5V或3.3v电源
16 // D0 P1^0SCL
17 // D1 P1^1SDA
18 // RES 接P12
19 // DC 接P13
20 // CS 接P14
21 // ----------------------------------------------------------------
22 // 修改历史 :
23 // 日 期 :
24 // 作 者 : HuangKai
25 // 修改内容 : 创建文件
26 //版权所有,盗版必究。
27 //Copyright(C) 中景园电子2014/3/16
28 //All rights reserved
29 //******************************************************************************/
30 #include "REG51.h"
31 #include "oled.h"
32 #include "bmp.h"
33
34 int main(void)
35 { u8 t;
36 1 OLED_Init(); //初始化OLED
37 1 OLED_Clear() ;
38 1
39 1 t=' ';
40 1 OLED_ShowCHinese(0,0,0);//中
41 1 OLED_ShowCHinese(18,0,1);//景
42 1 OLED_ShowCHinese(36,0,2);//园
43 1 OLED_ShowCHinese(54,0,3);//电
44 1 OLED_ShowCHinese(72,0,4);//子
45 1 OLED_ShowCHinese(90,0,5);//科
46 1 OLED_ShowCHinese(108,0,6);//技
47 1 while(1)
48 1 {
49 2 OLED_Clear();
50 2 OLED_ShowCHinese(0,0,0);//中
51 2 OLED_ShowCHinese(18,0,1);//景
52 2 OLED_ShowCHinese(36,0,2);//园
53 2 OLED_ShowCHinese(54,0,3);//电
54 2 OLED_ShowCHinese(72,0,4);//子
55 2 OLED_ShowCHinese(90,0,5);//科
C51 COMPILER V9.52.0.0 MAIN 05/03/2018 10:37:07 PAGE 2
56 2 OLED_ShowCHinese(108,0,6);//技
57 2 OLED_ShowString(6,3,"0.96' OLED TEST",16);
58 2 //OLED_ShowString(8,2,"ZHONGJINGYUAN");
59 2 // OLED_ShowString(20,4,"2014/05/01");
60 2 OLED_ShowString(0,6,"ASCII:",16);
61 2 OLED_ShowString(63,6,"CODE:",16);
62 2 OLED_ShowChar(48,6,t,16);//显示ASCII字符
63 2 t++;
64 2 if(t>'~')t=' ';
65 2 OLED_ShowNum(103,6,t,3,16);//显示ASCII字符的码值
66 2 delay_ms(8000);
67 2 delay_ms(8000);
68 2
69 2 delay_ms(8000);
70 2 delay_ms(8000);
71 2 delay_ms(8000);
72 2 OLED_DrawBMP(0,0,128,8,BMP1); //图片显示(图片显示慎用生成的字表较大会占用较多空间FLASH空间8K以下<E4BBA5>
-饔<>)
73 2 delay_ms(8000);
74 2 delay_ms(8000);
75 2 delay_ms(8000);
76 2 delay_ms(8000);
77 2 OLED_DrawBMP(0,0,128,8,BMP1);
78 2 delay_ms(8000);
79 2 delay_ms(8000);
80 2 delay_ms(8000);
81 2 delay_ms(8000);
82 2 }
83 1
84 1 }
85
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 358 ----
CONSTANT SIZE = 2077 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 1
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)