看不见 发表于 2014-2-21 22:31:20

1788使用AT070TN83屏的问题

老感觉是接触不良是的,手动一下背面就显示,为什么啊,都换了三个屏测试了,是时序的问题吗,,
这是程序代码
LPC_LCD->TIMH   = (HBP << 24) |                                     /*ÉèÖÃˮƽºóÑØ                */
                      (HFP << 16) |                                     /*ÉèÖÃˮƽǰÑØ                */
                      (HSW << 8)|                                     /*ÉèÖÃˮƽͬ²½Âö¿í            */
                      (PPL << 2);                                       /*ÉèÖÃÿÐÐÓÐ800¸öÏñËØµã       */

    LPC_LCD->TIMV   = (VBP << 24) |                                     /*ÉèÖô¹Ö±ºóÑØ                */
                      (VFP << 16) |                                     /*ÉèÖô¹Ö±Ç°ÑØ                */
                      (VSW << 10) |                                     /*ÉèÖô¹Ö±Í¬²½Âö¿í            */
                      (LPP << 0);                                       /*ÿÆÁÓÐ480ÐР              */

    LPC_LCD->POL    = (1 << 26)   |                                     /*ÅÔ·ʱÖÓ·ÖƵÆ÷r             */
                      (CPL << 16) |                                     /*ÿÐÐ800¸öʱÖÓÂö³å         */
                      (0 << 14)   |                                     /*LCDENAB Êä³ö¸ßµçƽÓÐЧ      */
                      (1 << 13)   |                                     /*Êý¾ÝÔÚLCDDCLKµÄϽµÑØÊä³ö   */
                      (1 << 12)   |                                     /*HSYNC µÍµçƽÓÐЧ            */
                      (1 << 11)   |                                     /*VSYNC µÍµçƽÓÐЧ            */
                      (0 << 5);                                       /*Ñ¡Ôñ HCLK                   */

    LPC_LCD->CTRL   = (BGR<<8)    |                                     /*ºìÉ«ºÍÀ¶É«½»»»Î»Öà         */
                     (LcdTFT << 5)|                                     /*Ñ¡Ôñ TFT ÀàÐ͵ÄLCD          */
                     (LcdBpp << 1)|                                     /*select 16bpp                */
                     (LcdEn);                                           /*ʹÄÜLCD¿ØÖÆÐźŠ            */

sea_star 发表于 2014-2-22 10:20:02

我碰到过类似情况,用的是网上买的翻修屏(就是价格便宜的),后来换正品的就好了

sea_star 发表于 2014-2-22 10:21:26



#define PPL                800      // Pixels per line
#define HSW                1       // HSYNC pulse width, can be 1-48
#define HFP                40       // Horizontal front porch, MUST be 40
#define HBP                88       // Horizontal back porch, MUST be 88
#define LPP                480      // Lines per panel
#define VSW                3      // VSYNC pulse width, MSUT be 3
#define VFP                3               // Vertical front porch, 1,3ÊÇ¿ÉÒÔµÄ
#define VBP                3               // Vertical back porch, °´ÕÕdatasheet¸ø³öµÄ32·´¶øÓÐÎÊÌ⣡1,3ÊÇ¿ÉÒÔµÄ
#define ACB                1      // AC bias frequency (not used)
#define IVS                                                          1      // ? Invert VSYNC
#define IHS                1      // ? Invert HSYNC
#define IPC                1      // ? Invert panel clock
#define CPL                PPL      // Clock per line (identical to pixels per line)
#define BPP                6      // Bits per pixel b110 = 16 bpp 5:6:5 mode
#define BGR                1      // Swap red and blue
#define LCDTFT             1      // LCD TFT panel
#define OPT_CLK            28500000 // Optimal clock rate (Hz) between 1-8.22 MHz according to SSD1289 datasheet */



MATRIX_ARB = 0            // Set AHB Matrix priorities with 3 being highest priority
               | (1 <<0)// PRI_ICODE : I-Code bus priority. Should be lower than PRI_DCODE for proper operation.
               | (2 <<2)// PRI_DCODE : D-Code bus priority.
               | (0 <<4)// PRI_SYS   : System bus priority.
               | (0 <<6)// PRI_GPDMA : General Purpose DMA controller priority.
               | (0 <<8)// PRI_ETH   : Ethernet: DMA priority.
               | (3 << 10)// PRI_LCD   : LCD DMA priority.
               | (0 << 12)// PRI_USB   : USB DMA priority.
               ;
//

//
// Init LCDC
//
LPC_SC->PCONP |=(1UL << 0);// Power the LCDC
LPC_LCD->CTRL &= ~(1UL << 0);// Disable the LCDC
LPC_LCD->TIMH= 0             // Configure horizontal axis
                   | (((PPL / 16) - 1) <<2)
                   | ((HSW - 1)      <<8)
                   | ((HFP - 1)      << 16)
                   | ((HBP - 1)      << 24)
                   ;
LPC_LCD->TIMV= 0             // Configure vertical axis
                   | ((LPP - 1) <<0)
                   | ((VSW - 1) << 10)
                   | ((VFP)   << 16)
                   | ((VBP)   << 24)
                   ;                                                                       
LPC_LCD->POL   = 0             // Configure clock and signal polarity
                   | (_FindClockDivisor(OPT_CLK) <<0)
                   | ((ACB - 1)                  <<6)
                   | ((IVS)                      << 11)
                   | ((IHS)                      << 12)
                   | ((IPC)                      << 13)
                   | ((CPL - 1)                  << 16)
                   ;
LPC_LCD->CTRL= 0             // Configure operating mode and panel parameters
                   | (BPP    << 1)
                   | (BGR    << 8)
                   | (LCDTFT << 5)
                   ;

for (i = 0; i < GUI_COUNTOF(LPC_LCD->PAL); i++) {
    LPC_LCD->PAL = 0;// Clear the color palette with black
}
LPC_SC->LCD_CFG = 0x0;// No panel clock prescaler
//
// Enable LCDC
//
LPC_LCD->UPBASE= VRAM_ADDR_PHYS;
LPC_LCD->CTRL   |= (1 <<0);               // Enable LCD signals
LPC_LCD->CTRL   |= (1 << 11);               // Enable LCD power
LPC_GPIO2->SET|= (1 << LCD_BACKLIGHT_BIT);// Set backlight to on
}

看不见 发表于 2014-2-22 10:53:47

sea_star 发表于 2014-2-22 10:21
#define PPL                800      // Pixels per line
#define HSW                1       // HSYN ...

之前买过二个都不行,后期又买了一个,也是这问题,这个屏不是很稳定的吗,方便加个QQ不,好好向你请教一下,707851861

看不见 发表于 2014-2-22 14:33:39

LPC_SC->LCD_CFG = 0x0;// No panel clock prescaler
你这时钟分频为0 LCD时钟频率120????

xi_liang 发表于 2014-5-14 15:17:10

我们的1788驱动AT070TN83,AT070TN94都可以了

suebillt 发表于 2015-1-8 20:55:52

xi_liang 发表于 2014-5-14 15:17
我们的1788驱动AT070TN83,AT070TN94都可以了

你们的RST复位电路画的MAX811,实际用的是812.。。。。。
页: [1]
查看完整版本: 1788使用AT070TN83屏的问题