我现在用的是三星的2410 ARM9芯片点一块液晶屏,液晶屏的背光接口是并行的五颗灯,所以我选择使用CAT3636来点亮它,但是当我按着芯片文档的时序例子跑程序时,液晶只是闪了就又恢复了漆黑一片,我怀疑是我的时序有问题,下面是我的程序片断:
#define LCDBL_0 rGPBDAT&=~(0x1<<1) //set IO low
#define LCDBL_1 rGPBDAT |=(0x1<<1) //set IO high
LCDBL_0; //Shutdown
DelayN(BL_DelayValue*1000);
LCDBL_1; //Tsetup
DelayN(BL_DelayValue*100);
LCDBL_0; //address
DelayN(BL_DelayValue);
LCDBL_1;
DelayN(BL_DelayValue);//while(1);
LCDBL_0;
DelayN(BL_DelayValue);
LCDBL_1; //Tdatadelay
DelayN(BL_DelayValue*3500);
LCDBL_0; //data
DelayN(BL_DelayValue);
LCDBL_1; //Tresetdelay
DelayN(BL_DelayValue*10000);
LCDBL_0; //address
DelayN(BL_DelayValue);
LCDBL_1; //Tdatadelay
DelayN(BL_DelayValue*3000);
LCDBL_0; //data
DelayN(BL_DelayValue);
LCDBL_1; //hgih
DelayN(BL_DelayValue*100);
按着这个时序灯只是闪了一下,如果我按着以下的时序点的话屏就能亮,但是非常暗,而且芯片还会有类似电感的声响
#define LCDBL_0 rGPBDAT&=~(0x1<<1) //set IO low
#define LCDBL_1 rGPBDAT |=(0x1<<1) //set IO high
LCDBL_0; //Shutdown
DelayN(BL_DelayValue*1000);
LCDBL_1; //Tsetup
DelayN(BL_DelayValue*100);
LCDBL_0; //address
DelayN(BL_DelayValue);
LCDBL_1;
DelayN(BL_DelayValue);//while(1);
LCDBL_0;
DelayN(BL_DelayValue);
LCDBL_1; //Tdatadelay
DelayN(BL_DelayValue*3500);
/*
LCDBL_0; //data
DelayN(BL_DelayValue);
LCDBL_1; //Tresetdelay
DelayN(BL_DelayValue*10000);
LCDBL_0; //address
DelayN(BL_DelayValue);
LCDBL_1; //Tdatadelay
DelayN(BL_DelayValue*3000);
LCDBL_0; //data
DelayN(BL_DelayValue);
*/
LCDBL_1; //hgih
DelayN(BL_DelayValue*100);
两段程序只是区别在我注释了那一部分
现在的时序肯定是有问题的,所以希望有用过此芯片或类似芯片的朋友能帮个忙,在此先行谢过 |