打印

NOKIA手机屏闪亮登场

[复制链接]
2850|7
手机看帖
扫描二维码
随时随地手机跟帖
沙发
xieqin| | 2007-6-22 23:32 | 只看该作者

像着手机的UI界面前进吧

使用特权

评论回复
板凳
古道热肠|  楼主 | 2007-6-23 12:02 | 只看该作者

奉上底层驱动程序

nokia3310显示屏的中文说明        3310CN.PDF

/* 3310液晶显示屏C51测试程序 
接脚资料: 
Pin Signal Description Port 
1:VDD 
Power Input. Logic supply voltage range VDD to GND : 2.7 to 3.3 V 
2:SCLK 
Serial clock. Input for the clock signal: 0.0 to 4.0 Mbits/s. 
3:SDIN 
Serial data. Input for the data line. 
4:D/C 
Mode Select. To select either command/address or data input. 
5:SCE 
Chip enable input. The enable pin allows data to be clocked in. The signal is 
active LOW. 
6:GND 
Ground 
7:VOUT 
Ouptut voltage. Add external 1-10 uF electrolytic capacitor from VOUT to GND 
8:RES 
External reset. This signal will reset the device and must be applied to 
properly 
initialize the chip. The signal is active LOW. 
控制芯片: 
PCD8544 
宽×高(像素): 84×48 
*/ 

#include 
#define uchar unsigned char 
#define uint unsigned int 

sbit sclk=P2^0;//时钟 
sbit sdin=P2^1; //数据 
sbit dc=P2^2;//1写数据,0写指令 
sbit sce=P2^3;//片选 
sbit res=P2^4;//复位,0复位 

extern void delayus(uchar us); 
extern void delayms(uchar ms); 

extern void lcm_writebyte(uchar dd,bit a); 

extern unsigned char code bitmap1[]; 


void lcm_init(void) //LCM初始化 

res=0; 
delayus(100); 
res=1; 
sce=1; 
sdin=1; 
sclk=1; 
lcm_writebyte(0x21,0);//初始化Lcd,功能设定使用扩充指令 
lcm_writebyte(0xd5,0);//设定液晶偏置电压(高--低) 
lcm_writebyte(0x20,0);//使用基本指令 
lcm_writebyte(0x0C,0);//设定显示模式,正常显示 



void lcm_writebyte(uchar datatemp,bit mod)//写一字节 mod=0,命令模式 

uchar i=8; 
sce=0; 
dc=mod; 
while (i--){ 
if (datatemp&0x80){sdin=1;} 
else {sdin=0;} 
sclk=0; 
sclk=1; 
datatemp<<=1; 

dc=1; 
sce=1; 
sdin=1; 


void lcm_write(uchar bytes,bit mod)//写一字节 mod=0,命令模式 

uchar i,datatemp; 
sce=0; 
dc=mod; 
while (bytes--){ 
while (i--){ 
if (datatemp&0x80){sdin=1;} 
else {sdin=0;} 
sclk=0; 
sclk=1; 
datatemp<<=1; 


dc=1; 
sce=1; 
sdin=1; 


void lcm_setadd(uchar y,uchar x)//设定地址 y=0~5,x=0~83 

lcm_writebyte((y|0x40),0); 
lcm_writebyte((x|0x80),0); 


void lcm_clr()//清全屏 

uchar m,n; 
lcm_setadd(0,0); 
for (m=0;m<6;m++){ 
for (n=0;n<84;n++){ 
lcm_writebyte(0,1); 





void xp()//写一屏图 

uchar e; 
uchar t; 
uchar k; 
uint d=0; 
for (t=0;t<6;t++){ 
for (k=0;k<84;k++){ 
e=bitmap1[d]; 
d++; 
lcm_writebyte(e,1); 






void main(void)//主程序 

uint t; 

lcm_init(); 
lcm_clr();//清屏 
while (1){ 


xp();//写一屏图 
for(t=0;t<60000;t++);//延时 





uchar code bitmap1[]= 

/*----------------------------------------------------------------------------- 

; 源文件 / 文字 : E:33101qq.bmp模 
; 宽×高(像素): 84×48 
; 字模格式/大小 : 单色点阵液晶字模,纵向取模,字节倒序/504字节 
; 数据转换日期 : 2004-7-30 13:40:24*/ 
0x00,0x00,0x02,0xFA,0x8A,0x8A,0x8A,0xFA,0x02,0x02,0xFE,0x03,0x02,0x00,0x40,0x4F 

0xC9,0x79,0x49,0xCF,0x00,0xFC,0x00,0x00,0xFF,0x00,0x02,0x82,0x02,0xBE,0x22,0x63 

0xA2,0x22,0x22,0xA2,0x02,0x00,0x00,0x01,0x01,0x01,0x01,0xF9,0x09,0x05,0x03,0x01 

0x00,0x00,0x10,0x14,0x14,0x94,0xD4,0xBF,0x94,0x5C,0x54,0x12,0x10,0x00,0x00,0xFF 

0x29,0x29,0xFF,0x00,0xFF,0x29,0x29,0xFF,0x00,0x00,0x04,0x04,0x04,0xC4,0x3F,0xD4 

0x14,0x94,0x74,0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x04,0x04,0x07,0x00 

0x00,0x00,0x04,0x02,0x01,0x04,0x04,0x03,0x00,0x01,0x04,0x04,0x07,0x00,0x02,0x01 

0x00,0x07,0x04,0x04,0x05,0x04,0x06,0x00,0x03,0x00,0x00,0x80,0x40,0x44,0x84,0x07 

0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x92,0x51,0x30,0x37,0x14,0x14,0x14,0x04,0x07 

0x00,0x00,0x26,0x21,0x44,0x84,0x07,0x02,0x01,0x04,0x04,0x07,0x00,0x00,0x04,0x02 

0x05,0x04,0x04,0x02,0x01,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 

0x30,0x48,0x88,0x10,0x60,0x78,0x04,0x04,0xF8,0x00,0x00,0x00,0x00,0x00,0x1C,0xE2 

0x02,0x04,0x08,0x04,0x84,0x84,0x82,0x02,0x02,0x02,0x01,0x81,0x41,0x21,0x21,0x20 

0x00,0x04,0x07,0x18,0x60,0x80,0x00,0x00,0xF0,0x0C,0x03,0x00,0xFC,0x00,0x00,0x04 

0x0E,0x04,0xC0,0x60,0x62,0x37,0x12,0x90,0x16,0x19,0x7A,0xFC,0xF8,0xF0,0x80,0x40 

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 

0x00,0x00,0x00,0x00,0x00,0x07,0x08,0x10,0xE0,0x00,0x00,0x00,0xF8,0x07,0x00,0x00 

0x02,0x12,0x12,0x1F,0xF4,0xA0,0x00,0x00,0x00,0x40,0x80,0x81,0x8C,0x5C,0x3C,0x2C 

0x40,0x40,0x40,0x20,0x00,0x00,0x80,0xC0,0x64,0x5F,0x45,0xC9,0x83,0x04,0x04,0x04 

0x1B,0x20,0x40,0x80,0x80,0x01,0x00,0x00,0x00,0x00,0x10,0x14,0x23,0x21,0xA1,0x51 

0xF1,0x3F,0x12,0xE2,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x10,0x20 

0x21,0x22,0x22,0x22,0x7F,0x41,0x41,0x47,0x49,0xCB,0x0F,0x06,0x06,0x04,0x0C,0x1C 

0x14,0x34,0x24,0x24,0x14,0x14,0x12,0x0A,0x06,0x01,0x00,0x00,0x00,0x00,0xE0,0x20 

0x2F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01 

0x01,0x01,0x00,0x00,0xF8,0x21,0x21,0x40,0x40,0x20,0xD1,0x8A,0x0C,0x10,0x20,0xC0 

0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20 

0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x1F,0x20 

0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20 

0x00,0x20,0x07,0x38,0x00,0x3F,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20 

0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x07,0x38,0x04,0x22,0x01,0x31,0x10,0x28 

0x08,0x24,0x04,0x23,0x00,0x20,0x00,0x20 
}; 

使用特权

评论回复
地板
古道热肠|  楼主 | 2007-6-23 12:04 | 只看该作者

说明一点

  程序非本人原创,未进行测试,有何故障大家测试后提个醒,以免误导后人。

使用特权

评论回复
5
ysf| | 2007-6-25 18:59 | 只看该作者

这玩儿在一般的电子市场肯定是不好找

去手机配件市场,应该有大把,如果是在广州,在文化公园附近的手机配件市场,几乎可以找到任何一款手机的显示屏,你如果有兴趣,自己买配件组装一台手机估计都不成问题

使用特权

评论回复
6
lws| | 2007-6-28 09:06 | 只看该作者

电子市场有买的,很便宜

我正用这块屏,做了个手持仪器,很小巧。需要注意的是第6脚不是接地而是接电源。我有控制器8544的中英文资料,有需要的朋友给我EMAIL(cpm2a@163.com)。上传文件没成功,不知道怎么搞的?
顺便问一下,用做背光的超亮白色LED,是什么型号,我用的屏还没背光。

使用特权

评论回复
7
古道热肠|  楼主 | 2007-6-28 14:14 | 只看该作者

不是我做的,答不上来

  你可去电子市场找找,肯定能找到答案。

使用特权

评论回复
8
谈的元| | 2007-7-5 19:51 | 只看该作者

不错不错

不错不错

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

284

主题

6411

帖子

16

粉丝