我用的是SMARTARM2200的开发板,在连接LCD(192*64)调试时,按照硬件连接定义地址: #define CWADD1 (*((volatile unsigned short *) 0x83800000)) //写指令代码地址(左) #define CRADD1 (*((volatile unsigned short *) 0x83800002)) //读状态字地址(左) #define DWADD1 (*((volatile unsigned short *) 0x83800004)) //写显示数据地址(左) #define DRADD1 (*((volatile unsigned short *) 0x83800006)) //读显示数据地址(左)
#define CWADD2 (*((volatile unsigned short *) 0x83800008)) //写指令代码地址(中) #define CRADD2 (*((volatile unsigned short *) 0x8380000A)) //读状态字地址(中) #define DWADD2 (*((volatile unsigned short *) 0x8380000C)) //写显示数据地址(中) #define DRADD2 (*((volatile unsigned short *) 0x8380000E)) //读显示数据地址(中)
#define CWADD3 (*((volatile unsigned short *) 0x83800010)) //写指令代码地址(右) #define CRADD3 (*((volatile unsigned short *) 0x83800012)) //读状态字地址(右) #define DWADD3 (*((volatile unsigned short *) 0x83800014)) //写显示数据地址(右) #define DRADD3 (*((volatile unsigned short *) 0x83800016)) //读显示数据地址(右)
#define LCD_WriteCommand1(command) CWADD1 = (uint16)command #define LCD_WriteCommand2(command) CWADD2 = (uint16)command #define LCD_WriteCommand3(command) CWADD3 = (uint16)command #define LCD_WriteData1(dat) DWADD1 = (uint16)dat #define LCD_WriteData2(dat) DWADD2 = (uint16)dat #define LCD_WriteData3(dat) DWADD3 = (uint16)dat
#define LCD_ReadState1() CRADD1 #define LCD_ReadState2() CRADD2 #define LCD_ReadState3() CRADD3
当对LCD进行读写操作时,读写信号有输出,但片选信号 LCM_nCS1输出总是为高电平,而这个片选信号从CPLD译码输出的,按照开发板的资料,应该是输出地址后,片选信号LCM_nCS1输出为低电平,请问这个问题怎样解决? |