|
這個(gè)款OLED是IIC的,程序比較簡(jiǎn)單,代碼比較好移植,51單片機(jī)應(yīng)該都可以用,還上傳了一個(gè)取模軟件
0.png (48.87 KB, 下載次數(shù): 93)
下載附件
2017-8-22 15:58 上傳
單片機(jī)源程序如下:
- /********************************************
- OLED屏測(cè)試程序-STC&89C52
- *********************************************************/
- #include "stc15f2k60s2.h"
- #include "intrins.h"
- #include "codetab.h"
- #include "LQ12864.h"
- /********************(STC12C5608AD 11MHZ z=1時(shí)精確延時(shí)1ms)*******************/
- void delayms(unsigned int z)
- {
- unsigned int x,y;
- for(x=z; x>0; x--)
- for(y=1848; y>0; y--);
- }
- /*********************主函數(shù)************************************/
- void main(void)
- {
- unsigned char i;
- P1M0=0x00;
- P1M1=0x00;
- P2M0=0x00;
- P2M1=0x00;
-
- LCD_Init(); //oled 初始化
- while(1)
- {
- //LCD_Fill(0xff); //屏全亮
- //LCD_Fill(0x00); //屏全滅
- for(i=0; i<8; i++)
- {LCD_P16x16Ch(i*16,0,i); //點(diǎn)陣顯示
- LCD_P16x16Ch(i*16,2,i+8);
- LCD_P16x16Ch(i*16,4,i+16);
- LCD_P16x16Ch(i*16,6,i+24);
- }
- delayms(4000);
- LCD_CLS();
- LCD_P8x16Str(44,0,"SALER");
- LCD_P8x16Str(20,2,"OLEDDISPLAY");
- LCD_P8x16Str(8,4,"TEL:13882007987");
- LCD_P6x8Str(16,6,"445022363@qq.com");
- LCD_P6x8Str(34,7,"2012-06-19");
- ……………………
- …………限于本文篇幅 余下代碼請(qǐng)從51黑下載附件…………
復(fù)制代碼
所有資料51hei提供下載:
STC51 驅(qū)動(dòng)0.91OLED.zip
(63.9 KB, 下載次數(shù): 444)
2017-8-22 11:52 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
取模軟件.rar
(702.4 KB, 下載次數(shù): 305)
2017-8-22 11:52 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
|
評(píng)分
-
查看全部評(píng)分
|