|
此前在遇到LCD控制時,都是如下
// 間接控制方式驅(qū)動子程序
#define LCDBUS P0
sbit _WR = P2^4;
sbit _RD = P2^3;
sbit _CS = P2^2;
sbit RS = P2^6; //A0
sbit _RST = P2^5;
sbit _sel = P2^7;
最近遇到一個采用直接控制方式的如下
#define DW_ADD XBYTE[0x0000] /* LCD屏數(shù)據(jù)口寫地址 */
#define CW_ADD XBYTE[0x0100] /* LCD屏指令口寫地址 */
#define DR_ADD XBYTE[0x0100] /* LCD屏數(shù)據(jù)口讀地址 */
#define CR_ADD XBYTE[0x0000] /* LCD屏指令口讀地址 */
那么應(yīng)如何按上述P2口對應(yīng)的關(guān)系,修改下邊方括號里的值呢?如DW_ADD XBYTE[ 0x ????]
|
|