飞凌OK6410芯片,裸机LCD驱动,按照下面代码怎么显示白屏?无论我在LCD_BUFFER1缓冲区里写什么内容,LCD屏的显示内容都是一样的。为什么,我把显示控制器的文档重新看了一遍还是没有找出为什么会这样?
#include "s3c6410.h"
#include "gpio.h"
#include "Lcd.h"
#include "trace.h"
volatile unsigned int LCD_BUFFER1[272][480] ={
0
};
unsigned int addr1 = (unsigned int)LCD_BUFFER1;
void Lcd_Init()
{
rGPJCON = 0xAAAAAA;
rGPICON = 0xAAAAAAAA;
rWINCON0 &= ~0x1;
TRACE("\n rWINCON0:%d, %d", rWINCON0, sizeof(LCD_BUFFER1[0][0]));
//4 特殊功能寄存器,[1:0],选择LCD I/F管脚组态
rSPCON &= ~(0x03);
rSPCON |= 0x01;
rMIFPCON &= _BIT(3); //4 旁路选择正常(LCD正常模式与BY_PASS模式选择)
//4 配置视频输出格式和显示全能/禁止
rVIDCON0 = ((9 << 6) | (1 << 4));//4
rVIDCON0 &= ~0xFF;
rVIDCON1 = ((1 << 6) | (1 << 5) | (0 << 4));
//rVIDCON1 |= (1 << 7);
rVIDTCON0 = (0x03 << 16) | (0x02 << 8) | (0x02 << 0);
rVIDTCON1 = (0x2d << 16) | (0x04 << 8) | (0x06 << 0);
//rVIDTCON0 = (0x02 << 16) | (0x02 << 8) | (0x0a << 0);
//rVIDTCON1 = (0x2 << 16) | (0x02 << 8) | (0x29 << 0);
rVIDTCON2 = (271 << 11) | (479 << 0);
rVIDOSD0A = (0 << 11) | (0);
rVIDOSD0B = (479 << 11) | (271 << 0);
rVIDOSD0C = (480 * 272);
rVIDW00ADD0B0 = addr1 ;
//rVIDW00ADD0B1 = addr2 ;
rVIDW00ADD1B0 = (addr1 + 480 * 272 * 4);
//rVIDW00ADD1B1 = (addr2 + 480 * 272 * 4);
rVIDW00ADD2 = (0 << 13) | (480 * 4);
//4 抖动控制
rDITHMODE = (1 << 5) | (1 << 3) | (1 << 1) | (1 << 0);
TRACE("\n rVIDCON0:0x%x", rVIDCON0);
rWINCON0 |= (11 << 2);
rWINCON0 |= 1;
}
------解决方案--------------------
LCD屏有没有要求要先初始化?
------解决方案--------------------
是不是 LCD 初始化没有完成啊?
查查 LCD 初始化~!