看了这个外设的说明,发现没有initialion。。。那就从头介绍吧
一、介绍说明
LCDC有两个独立的控制器,同步Raster Controller 和 异步LCD InterfaceDisplay Driver (LIDD) controller。 同步Raster Controller:It supports
a wide variety of monochrome and full-color displaytypes and sizes by use of programmable timing controls, a built-in palette, and a gray-scale/serializer.Graphics data is processed and stored in frame 异步LIDD controller:The LIDD Controller supports the asynchronous LCD interface. It provides full-timing programmabilityof control
signals and output data.二、clock 1.Pixel Clock 计算如下:where CLKDIV is a field in the LCD_CTRL register and should not be 0 or 1.
Passive (STN:STN的每个点只有点亮和熄灭两种状态,可以通过“抖动算法”来实现灰度或彩 {MOD}显示。STN属于无源Passive型LCD,一般最高能显示65536种 {MOD}彩)
mode.LCD_PCLK only transitions when valid data is available for output. It does nottransition when the horizontal clock is asserted or during wait state insertion.
Active (TFT:液晶为每个像素都设有一个半导体开关,其加工工艺类似于大规模集成电路)
mode.LCD_PCLK continuously toggles as long as the Raster Controller is enabled.
2.Horizontal Clock (LCD_HSYNC) :每行结束clock3.Vertical Clock (LCD_VSYNC) :all lines in a frame have been transmitted
to the LCD 帧结束clock 三、DMAWhen the Raster Controller is used, the DMA engine reads data from a frame buffer and writes it to theinput FIFO (如上第一幅图所示). The Raster Controller
requests data from the FIFO for framerefresh; as a result, the DMA’s job is to ensure that the FIFO is always kept full. When the LIDD Controller is used, the DMA engine accesses the LIDD Controller's address and/or dataregisters. In addition, the
LIDD_CTRL register(for LIDD Controller) or the
RASTER_CTRL register (for RasterController) should also be configured appropriately, along with all the timing registers. To enable DMA transfers, the LIDD_DMA_EN bit (in the LIDD_CTRL register) or the LCDEN bit (in theRASTER_CTRL register) should be written with 1.