【200分】R61509或者SPFD5420A MPU屏驱动问题咨询
[复制链接]
其实我用的是R61509,在这里发现SPFD5420A可以替代,我现在调试的状态是,显示是出来了,系统进入的是触摸屏校正,应该是白色的底色黑字,但是颜色要不是蓝色要不是红色,通过R003H寄存器修订RGB的方向来取得,颜色始终不对。
一下附上初始化数据。麻烦高手指点!
const WORD init_cmdset[][2] = {
//(1).reset first
/*
{0x0600,0x0001},
{DELAY_FLAG, 110},
{0x0600,0x0000},
{DELAY_FLAG, 110},
*/
//(2).init normal reg
{0x0001,0x0000},
{0x0002,0x0700},
//{0x0003,0x8008},//here we modify @ 09111617:15
//{0x0003,0x1008},//here we modify @ 09111715:38
{0x0003,0x8008},//here we modify @ 09111715:38
{0x0006,0x0000},
//{0x0008,0x0503},here we modify @ 09111713:40 by mx
{0x0008,0x0505},
//{0x0009,0x0001},,here we modify @ 09111713:40 by mx
{0x0009,0x0000},
{0x000b,0x0010},
{0x000C,0x0000},//here we modify @ 09111617:15
{0x000F,0x0000},
{0x0010,0x0012},
{0x0011,0x0202},
{0x0012,0x0300},
{0x0020,0x001E},
//{0x0021,0x0202},
//{0x0022,0x0100},
{0x0021,0x0010},//modify by mx xu 20091117 10:30
{0x0022,0x0000},//modify by mx xu 20091117 10:30
{0x0090,0x0000},
{DELAY_FLAG, 110},
//################# void Gamma_Set(void) ####################//
//(3).init gamma reg
{0x0300, 0x0101}, //γ Control
{0x0301, 0x0000}, //γ Control
{0x0302, 0x0016}, //γ Control
{0x0303, 0x2913}, //γ Control
{0x0304, 0x260B}, //γ Control
{0x0305, 0x0101}, //γ Control
{0x0306, 0x1204}, //γ Control
{0x0307, 0x0415}, //γ Control
{0x0308, 0x0205}, //γ Control
{0x0309, 0x0303}, //γ Control
{0x030a, 0x0E05}, //γ Control
{0x030b, 0x0D01}, //γ Control
{0x030c, 0x010D}, //γ Control
{0x030d, 0x050E}, //γ Control
{0x030e, 0x0303}, //γ Control
{0x030f, 0x0502}, //γ Control
{DELAY_FLAG, 200},
{0x0400,0x3100},
{0x0401,0x0001},
{0x0404,0x0000},
{0x0606,0x0101},//modify by mx xu set it I80 2nd to 1st 3rd to 1st 20091117:19:07
{0x06F0,0x0001},
{DELAY_FLAG, 110},
//**************secorrect gamma2 *********
{0x0400,0x3500},
{0x0401,0x0001},
{0x0404,0x0000},
{0x0500,0x0000},
{0x0501,0x0000},
{0x0502,0x0000},
{0x0503,0x0000}, //
{0x0504,0x0000}, //
{0x0505,0x0000},
{0x0600,0x0000},
{0x0606,0x0000},
{0x06f0,0x0000},
{0x07f0,0x5420}, //
{0x07f3,0x288a},//
{0x07f4,0x0022}, //
{0x07f5,0x0001}, //
{0x07f0,0x0000}, //
{0x0007,0x0173},
{DELAY_FLAG, 110},
//(4).init base image reg
{0x0400,0x3100},
{0x0401,0x0001},
{0x0404,0x0000},
{0x0606,0x0000},
{0x06F0,0x0001},
{DELAY_FLAG, 110},
{0x0007,0x0021},//here we modify @ 09111717:40 by mx
{0x0007,0x0061},//here we modify @ 09111717:40 by mx
{0x0007,0x0173},//here we modify @ 09111717:40 by mx
//{0x0007,0x0133},
{DELAY_FLAG, 110},
//(5).set a base address reg
/*
{0x0210,0x0000},
{0x0211,0x00EF},
{0x0212,0x0000},
{0x0213,0x018F},
*/
{END_FLAG, END_FLAG}
};
const WORD turnoff_cmdset[][2] = {
{0x0100, 0x0000}, // SAP, BT[3:0], AP, DSTB, SLP, STB
{0x0101, 0x0000}, // DC1[2:0], DC0[2:0], VC[2:0]
{0x0102, 0x0000}, // VREG1OUT voltage
{0x0103, 0x0000}, // VDV[4:0] for VCOM amplitude
{DELAY_FLAG, 200}, // Dis-charge capacitor power voltage
{0x0107, 0x0000}, // Set VCM[5:0] for VCOMH
{DELAY_FLAG, 100},
{0x0110, 0x0000}, // Set VCM[5:0] for VCOMH
{0x0112, 0x0000}, // Set VCM[5:0] for VCOMH
{END_FLAG, END_FLAG}
};
const WORD turnon_cmdset[][2] = {
//(1)Display ON step1 R606h: TCREV
//(2)Power supply user setting Initial instruction setting
//(3)Display ON step3 When registers are set
//(4)Display ON step4 Other mode setting instruction
{0x0007,0x0001},
{0x0110,0x0001},
{0x0112,0x0060},
{0x0100,0x17B0},
{DELAY_FLAG, 100},
{0x0101,0x0006},
{DELAY_FLAG, 100},
{0x0102,0x0118},
{0x0103,0x3600},
{0x0282,0x0000},
{DELAY_FLAG, 100},
{0x0281,0x0006},
{0x0110,0x0001},
{DELAY_FLAG, 100},
{0x0102,0x0138},
{DELAY_FLAG, 100},
{0x0007,0x0021},
{DELAY_FLAG, 100},
{0x0100,0x17B0},
{0x0101,0x0007},
{0x0007,0x0061},
{DELAY_FLAG, 100},
{0x0007,0x0173},
{DELAY_FLAG, 100},
{END_FLAG, END_FLAG}
//-------------power ctrl end---------------
};
复制代码