经过评测,407将OV2640配置输出为800x400的YCBCR,利用双DMA,存放在SRAM后,读出数据转换成RGB显示在7寸屏,无论使用何种算法包括查表法,都不能达到或者超过15帧。
现在想用429替换407,429比407的优势有两个,一个是自带LCD控制器,省了SSD1963.第二个是内置了Chrom-ART Accelerator和ART Accelerator?存取加速技术,新产品可提升图形处理性能、实时处理速度以及内核对程序存储器的存取速度。
现在不太清楚这个加速技术能对2D显示提升多少……
而且貌似429这片子不太好买,也有点贵。
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
typedef struct
{
vu16 LCD_REG;
vu16 LCD_RAM;
}LCD_TypeDef;
/* LCD is connected to the FSMC_Bank1_NOR/SRAM2 and NE2 is used as ship select signal */
#define LCD_BASE ((u32)(0x64000000 | 0x0000007E))//fsmc_A6作为RS
#define LCD ((LCD_TypeDef *) LCD_BASE)
void LCD_Init(void)
{
其他引脚都是复用推挽输出,当开启PA10的复用功能后,屏就会亮,不开启复用功能,屏不会亮
GPIO_PinAFConfig(GPIOA,GPIO_PinSource10,GPIO_AF_USART1); //pwm复用配置,LCD背光
Timing_Read.FSMC_AddressSetupTime = 10; //一开始为,f103这里是3
Timing_Read.FSMC_AddressHoldTime = 0;
Timing_Read.FSMC_DataSetupTime = 8; //一开始为12,f103这里是4
Timing_Read.FSMC_CLKDivision = 0;
Timing_Read.FSMC_BusTurnAroundDuration = 0;
Timing_Read.FSMC_DataLatency = 0;
Timing_Read.FSMC_AccessMode = FSMC_AccessMode_A;
FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2;
FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable;
FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_SRAM;
FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b;
FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable;
FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low;
FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable;
FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState;
FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable;
FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable;
FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable;
FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;
FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &Timing_Read;
FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &Timing_Read;
FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure);
FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM2, ENABLE);
然后依次写E2,E0,01,E6,B0,B4,B6寄存器,写完之后这是接下来的寄存器的配置
LCD_WR_REG(0x00BA); //字是正着的
LCD_WR_DATA(0x0005); //GPIO[3:0] out 1
LCD_WR_REG(0x00B8);
LCD_WR_DATA(0x0007);
// LCD_WR_DATA(0x000f); //GPIO3=input, GPIO[2:0]=output
LCD_WR_DATA(0x0001); //GPIO0 normal
LCD_WR_REG(0x0036); //rotation of color
LCD_WR_DATA(0x0008); //显示为从上到下,从左到右,帧缓存里为RGB,显示为BGR
LCD_WR_REG(0x00F0); //pixel data interface
LCD_WR_DATA(0x0003); //设置像素为16位(565)模式
delay_ms(100);
LCD_WR_REG(0x0029); //display on
LCD_WR_REG(0x00BE); //set WM for B/L
LCD_WR_DATA(0x0006);
LCD_WR_DATA(0x0080);
LCD_WR_DATA(0x0001);
LCD_WR_DATA(0x00f0);
LCD_WR_DATA(0x0000);
LCD_WR_DATA(0x0000);
LCD_WR_REG(0x00d0);//设置动态背光控制配置
LCD_WR_DATA(0x000d);
LCD_Clear(BLACK)
一周热门 更多>