stm32_ota/OLED显示屏资料/03中景园电子1.3英寸OLED显示屏测试程序/19中景园电子1.3英寸OLED显示屏_C8051F340系列_IIC_例程/main.LST

122 lines
4.8 KiB
Plaintext
Raw Normal View History

2024-12-17 20:03:43 +08:00
C51 COMPILER V9.52.0.0 MAIN 05/03/2018 10:42:33 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 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>ѧϰʹ<CFB0>ã<EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><CEBA><EFBFBD>;
3 //<2F>о<EFBFBD>԰<EFBFBD><D4B0><EFBFBD><EFBFBD>
4 //<2F><><EFBFBD>̵<EFBFBD>ַ<EFBFBD><D6B7>http://shop73023976.taobao.com/?spm=2013.1.0.0.M4PqC2
5 //
6 // <20><> <20><> <20><> : main.c
7 // <20><> <20><> <20><> : v2.0
8 // <20><> <20><> : HuangKai
9 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : 2017-0101
10 // <20><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD> :
11 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : OLED 4<>ӿ<EFBFBD><D3BF><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>(C8051F020ϵ<30><CFB5>)
12 // ˵<><CBB5>:
13 // ----------------------------------------------------------------
14 // GND <20><>Դ<EFBFBD><D4B4>
15 // VCC <20><>5V<35><56>3.3v<EFBFBD><EFBFBD>Դ
16 // D0 <20><>P22<32><32>SCL<43><4C>
17 // D1 <20><>P23<32><33>SDA<44><41>
18
19 // ----------------------------------------------------------------
20 // <20>޸<EFBFBD><DEB8><EFBFBD>ʷ :
21 // <20><> <20><> :
22 // <20><> <20><> : HuangKai
23 // <20>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD> : <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
24 //<2F><>Ȩ<EFBFBD><C8A8><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD><D8BE><EFBFBD>
25 //All rights reserved
26 //******************************************************************************/
27 #include <c8051f340.h>
28 #include "oled.h"
29 #include "bmp.h"
30 void PORT_Init (void)
31 {
32 1 XBR1 = 0x40; /*ʹ<>ܽ<EFBFBD><DCBD><EFBFBD><E6BFAA>*/
33 1 P3MDOUT =0xff;
34 1 }
35 sbit LED=P3^3;
36 int main(void)
37 { u8 t;
38 1 PCA0MD &= ~0x40; // WDTE = 0 (clear watchdog timer
39 1 // enable)
40 1
41 1 PORT_Init ();
42 1 OLED_Init(); //<2F><>ʼ<EFBFBD><CABC>OLED
43 1 OLED_Clear() ;
44 1 /*
45 1 OLED_ShowString(30,0,"OLED TEST");
46 1 OLED_ShowString(8,2,"ZHONGJINGYUAN");
47 1 OLED_ShowString(20,4,"2014/05/01");
48 1 OLED_ShowString(0,6,"ASCII:");
49 1 OLED_ShowString(63,6,"CODE:");
50 1 t=' ';
51 1 OLED_ShowCHinese(0,0,0);//<2F><>
52 1 OLED_ShowCHinese(18,0,1);//<2F><>
53 1 OLED_ShowCHinese(36,0,2);//԰
54 1 OLED_ShowCHinese(54,0,3);//<2F><>
55 1 OLED_ShowCHinese(72,0,4);//<2F><>
C51 COMPILER V9.52.0.0 MAIN 05/03/2018 10:42:33 PAGE 2
56 1 OLED_ShowCHinese(90,0,5);//<2F><>
57 1 OLED_ShowCHinese(108,0,6);//<2F><>
58 1 */
59 1 t=' ';
60 1 while(1)
61 1 {
62 2 OLED_Clear();
63 2 LED=0;
64 2 delay_ms(50);
65 2 LED=1;
66 2 delay_ms(50);
67 2 OLED_ShowCHinese(0,0,0);//<2F><>
68 2 OLED_ShowCHinese(18,0,1);//<2F><>
69 2 OLED_ShowCHinese(36,0,2);//԰
70 2 OLED_ShowCHinese(54,0,3);//<2F><>
71 2 OLED_ShowCHinese(72,0,4);//<2F><>
72 2 OLED_ShowCHinese(90,0,5);//<2F><>
73 2 OLED_ShowCHinese(108,0,6);//<2F><>
74 2 OLED_ShowString(0,2,"1.3' OLED TEST");
75 2 // OLED_ShowString(8,2,"ZHONGJINGYUAN");
76 2 OLED_ShowString(20,4,"2014/05/01");
77 2 OLED_ShowString(0,6,"ASCII:");
78 2 OLED_ShowString(63,6,"CODE:");
79 2 OLED_ShowChar(48,6,t);//<2F><>ʾASCII<49>ַ<EFBFBD>
80 2 t++;
81 2 if(t>'~')t=' ';
82 2 OLED_ShowNum(103,6,t,3,16);//<2F><>ʾASCII<49>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>ֵ
83 2
84 2
85 2 delay_ms(50);
86 2 OLED_Clear();
87 2 delay_ms(50);
88 2 OLED_DrawBMP(0,0,128,8,BMP1); //ͼƬ<CDBC><C6AC>ʾ(ͼƬ<CDBC><C6AC>ʾ<EFBFBD><CABE><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD>ɵ<EFBFBD><C9B5>ֱ<EFBFBD><D6B1>ϴ󣬻<CFB4>ռ<EFBFBD>ý϶<C3BD><CFB6>ռ䣬FLASH<53>ռ<EFBFBD>8K<38><4B><EFBFBD><EFBFBD><EFBFBD>
-<2D><><EFBFBD>)
89 2 delay_ms(50);
90 2 OLED_DrawBMP(0,0,128,8,BMP2);
91 2 delay_ms(50);
92 2 }
93 1
94 1 }
95
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 269 ----
CONSTANT SIZE = 2087 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 1
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)