NOTICE توجه: این یک موضوع قدیمی است که آخرین پست ارسالی آن مربوط به 3718 روز قبل است . لطفا فقط پاسخ ها ، سوالات و درخواست های 100 درصد مرتبط را به آن ارسال کنید و برای درخواست ها و سوالات جدید موضوع جدیدی را ایجاد کنید
نمایش نتایج: از 1 به 10 از 10

موضوع: برعکس نمایش دادن lcd

  1. #1
    عضو جدید
    تاریخ عضویت
    May 2010
    نوشته ها
    5
    تشکر
    2
    تشکر شده 0 بار در 0 پست

    پیش فرض برعکس نمایش دادن lcd

    با سلام
    من یه بورد at91sam7x256 v3. بتازگی از فروشگاه خریدم سری اول که روشنش کردم برنامه miniterm روش نصب بود . بعد اون رو پاک کردم حالا دوباره که برنامه رو از داخل سی دی همراه بورد نصب می کنم ال سی دی کلا بر عکس نشون میده . حتی بعضی از برنامه های دیگری رو هم که داخل سی دی همراه بود نصب میکنم به همین صورت است مثل اینکه از داخل آینه ال سی دی رو نگاه کنی. لطفا راهنمایی کنید

  2. # ADS
    Circuit advertisement
    تاریخ عضویت
    Always
    نوشته ها
    Many
     

  3. #2
    همکار علمی sarbaz13 آواتار ها
    تاریخ عضویت
    Mar 2011
    نام
    محمد قاسمی
    نوشته ها
    410
    تشکر
    995
    تشکر شده 425 بار در 230 پست

    پیش فرض

    سوالتون کلی گفتین .
    نوع lcd?
    یک عکسی از نحوه ی نمایش
    شرکت Time Owner

  4. #3
    عضو جدید
    تاریخ عضویت
    May 2010
    نوشته ها
    5
    تشکر
    2
    تشکر شده 0 بار در 0 پست

    پیش فرض

    سلام
    نوع ال سی دی tft 2.8 inch

  5. #4
    کاربر فعال
    تاریخ عضویت
    May 2010
    نوشته ها
    119
    تشکر
    361
    تشکر شده 85 بار در 46 پست

    پیش فرض

    سلام
    مشکل از تنظیم شروع نمایش از سمت چپ یا راست یا بالا یا پایین هست که در init السیدی باید یه ریجستر السیدی رو که الان یادم نیست رو تنظیمش کنی درسته میشه و از اینه در میاد بیرون

  6. #5
    کاربر فعال
    تاریخ عضویت
    May 2010
    نوشته ها
    119
    تشکر
    361
    تشکر شده 85 بار در 46 پست

    پیش فرض

    شما لطف کن کد init السیدی رو بذار تا اصلاح کنیم

  7. #6
    عضو جدید
    تاریخ عضویت
    May 2010
    نوشته ها
    5
    تشکر
    2
    تشکر شده 0 بار در 0 پست

    پیش فرض

    // LCD Initialization
    //-----------------------------------------------------------------------
    void tftlcd_init(void)
    {
    int k;
    *AT91C_PMC_PCER = (1<< AT91C_ID_PIOA) ;
    *AT91C_PMC_PCER = (1<< AT91C_ID_PIOB) ;
    TFT_PORT->PIO_PER =TFT_DATA_MASK;
    TFT_PORT->PIO_OER =TFT_DATA_MASK;
    TFT_PORT->PIO_PPUER =TFT_DATA_MASK;

    TFT_dir_control_out();
    TFTLCD_CS_HIGH ;
    TFTLCD_WR_HIGH ;
    TFTLCD_RS_HIGH ;
    TFTLCD_RD_HIGH ;

    TFTLCD_RST_HIGH ;
    TFT_dataout(0);
    TFTLCD_DATAPORT_OUTPUT();

    // for(i=0;i<8;i++)
    // TFT_dataout(1<<i);

    // Reset LCD Chipset
    TFTLCD_RST_LOW;
    for(k=0;k<0xFFFE;k++);
    TFTLCD_RST_HIGH;
    for(k=0;k<0xFFFE;k++);
    for(k=0;k<0xFFFE;k++);

    tftlcd_write_index_register(0x00);
    DeviceCode = tftlcd_read_rdr();
    DeviceCode = 0x9320;

    if(DeviceCode==0x9325||DeviceCode==0x9328) /*ILI9325 ´???9320 ????9325*/
    {
    tftlcd_write_command(0x00e7,0x0012);
    tftlcd_write_command(0x0000,0x0001);
    tftlcd_write_command(0x0001,0x0100);
    tftlcd_write_command(0x0002,0x0700);
    tftlcd_write_command(0x0003,(TFT_BGR<<12)|(TFT_ROT <<4)|(TFT_PL<<3) );
    tftlcd_write_command(0x0004,0);

    tftlcd_write_command(0x0008,0x0207);
    tftlcd_write_command(0x0009,0x0000);
    tftlcd_write_command(0x000a,0x0000);
    tftlcd_write_command(0x000c,0x0001); // SET COLOR MODE
    tftlcd_write_command(0x000d,0x0000);
    tftlcd_write_command(0x000f,0x0000); // SET COLOR MODE

    tftlcd_write_command(0x0010,0x0000);
    tftlcd_write_command(0x0011,0x0007);
    tftlcd_write_command(0x0012,0x0000);
    tftlcd_write_command(0x0013,0x0000);
    //delay(5);
    tftlcd_write_command(0x0010,0x1590);
    tftlcd_write_command(0x0011,0x0227);
    //delay(5);
    tftlcd_write_command(0x0012,0x009c);
    //delay(5);
    tftlcd_write_command(0x0013,0x1900);
    tftlcd_write_command(0x0029,0x0023);
    tftlcd_write_command(0x002b,0x000e);
    //delay(5);
    tftlcd_write_command(0x0020,0x0000);
    tftlcd_write_command(0x0021,0x013f);
    //delay(5);
    tftlcd_write_command(0x0030,0x0007);
    tftlcd_write_command(0x0031,0x0707);
    tftlcd_write_command(0x0032,0x0006);
    tftlcd_write_command(0x0035,0x0704);
    tftlcd_write_command(0x0036,0x1f04);
    tftlcd_write_command(0x0037,0x0004);
    tftlcd_write_command(0x0038,0x0000);
    tftlcd_write_command(0x0039,0x0706);
    tftlcd_write_command(0x003c,0x0701);
    tftlcd_write_command(0x003d,0x000f);
    //delay(5);

    tftlcd_write_command(0x0050,0x0000);
    tftlcd_write_command(0x0051,0x00ef);
    tftlcd_write_command(0x0052,0x0000);
    tftlcd_write_command(0x0053,0x013f);

    tftlcd_write_command(0x0060,0xa700);
    tftlcd_write_command(0x0061,0x0001);
    tftlcd_write_command(0x006a,0x0000);
    tftlcd_write_command(0x0080,0x0000);
    tftlcd_write_command(0x0081,0x0000);
    tftlcd_write_command(0x0082,0x0000);
    tftlcd_write_command(0x0083,0x0000);
    tftlcd_write_command(0x0084,0x0000);
    tftlcd_write_command(0x0085,0x0000);

    tftlcd_write_command(0x0090,0x0010);
    tftlcd_write_command(0x0092,0x0000);
    tftlcd_write_command(0x0093,0x0003);
    tftlcd_write_command(0x0095,0x0110);
    tftlcd_write_command(0x0097,0x0000);
    tftlcd_write_command(0x0098,0x0000);

    tftlcd_write_command(0x0007,0x0133);
    tftlcd_write_command(0x0020,0x0000);
    tftlcd_write_command(0x0021,0x013f);
    }else if(DeviceCode==0x9320||DeviceCode==0x9300)
    {
    /* Start Initial Sequence --------------------------------------------------*/
    tftlcd_write_command(0x00, 0x0001); /* Start internal OSC */
    tftlcd_write_command(0x01, 0x0100); /* Set SS and SM bit */
    tftlcd_write_command(0x02, 0x0700); /* Set 1 line inversion */
    tftlcd_write_command(0x03, 0x1038); /* Set GRAM write direction and BGR=1 */
    tftlcd_write_command(0x04, 0x0000); /* Resize register */
    tftlcd_write_command(0x08, 0x0202); /* 2 lines each, back and front porch */
    tftlcd_write_command(0x09, 0x0000); /* Set non-disp area refresh cyc ISC */
    tftlcd_write_command(0x0A, 0x0000); /* FMARK function */
    tftlcd_write_command(0x0C, 0x0000); /* RGB interface setting */
    tftlcd_write_command(0x0D, 0x0000); /* Frame marker Position */
    tftlcd_write_command(0x0F, 0x0000); /* RGB interface polarity */

    /* Power On sequence -------------------------------------------------------*/
    tftlcd_write_command(0x10, 0x0000); /* Reset Power Control 1 */
    tftlcd_write_command(0x11, 0x0000); /* Reset Power Control 2 */
    tftlcd_write_command(0x12, 0x0000); /* Reset Power Control 3 */
    tftlcd_write_command(0x13, 0x0000); /* Reset Power Control 4 */
    //delay(20); /* Discharge cap power voltage (200ms)*/
    tftlcd_write_command(0x10, 0x17B0); /* SAP, BT[3:0], AP, DSTB, SLP, STB */
    tftlcd_write_command(0x11, 0x0137); /* DC1[2:0], DC0[2:0], VC[2:0] */
    //delay(5); /* Delay 50 ms */
    tftlcd_write_command(0x12, 0x0139); /* VREG1OUT voltage */
    //delay(5); /* Delay 50 ms */
    tftlcd_write_command(0x13, 0x1D00); /* VDV[4:0] for VCOM amplitude */
    tftlcd_write_command(0x29, 0x0013); /* VCM[4:0] for VCOMH */
    //delay(5); /* Delay 50 ms */
    tftlcd_write_command(0x20, 0x0000); /* GRAM horizontal Address */
    tftlcd_write_command(0x21, 0x0000); /* GRAM Vertical Address */

    /* Adjust the Gamma Curve --------------------------------------------------*/
    tftlcd_write_command(0x30, 0x0006);
    tftlcd_write_command(0x31, 0x0101);
    tftlcd_write_command(0x32, 0x0003);
    tftlcd_write_command(0x35, 0x0106);
    tftlcd_write_command(0x36, 0x0B02);
    tftlcd_write_command(0x37, 0x0302);
    tftlcd_write_command(0x38, 0x0707);
    tftlcd_write_command(0x39, 0x0007);
    tftlcd_write_command(0x3C, 0x0600);
    tftlcd_write_command(0x3D, 0x020B);

    /* Set GRAM area -----------------------------------------------------------*/
    tftlcd_write_command(0x50, 0x0000); /* Horizontal GRAM Start Address */
    tftlcd_write_command(0x51, (HEIGHT-1)); /* Horizontal GRAM End Address */
    tftlcd_write_command(0x52, 0x0000); /* Vertical GRAM Start Address */
    tftlcd_write_command(0x53, (WIDTH-1)); /* Vertical GRAM End Address */
    tftlcd_write_command(0x60, 0x2700); /* Gate Scan Line */
    tftlcd_write_command(0x61, 0x0001); /* NDL,VLE, REV */
    tftlcd_write_command(0x6A, 0x0000); /* Set scrolling line */

    /* Partial Display Control -------------------------------------------------*/
    tftlcd_write_command(0x80, 0x0000);
    tftlcd_write_command(0x81, 0x0000);
    tftlcd_write_command(0x82, 0x0000);
    tftlcd_write_command(0x83, 0x0000);
    tftlcd_write_command(0x84, 0x0000);
    tftlcd_write_command(0x85, 0x0000);

    /* Panel Control -----------------------------------------------------------*/
    tftlcd_write_command(0x90, 0x0010);
    tftlcd_write_command(0x92, 0x0000);
    tftlcd_write_command(0x93, 0x0003);
    tftlcd_write_command(0x95, 0x0110);
    tftlcd_write_command(0x97, 0x0000);
    tftlcd_write_command(0x98, 0x0000);
    tftlcd_write_command(0x07, 0x0137); /* 262K color and display ON */
    }
    else if(DeviceCode==0x8999) //¶??¦µ???¶¯IC??SSD1289
    {
    //************* Start Initial Sequence **********//
    tftlcd_write_command(0x00, 0x0001); // Start internal OSC.
    tftlcd_write_command(0x01, 0x3B3F); // Driver output control, RL=0;REV=1;GD=1;BGR=0;SM=0;TB=1
    tftlcd_write_command(0x02, 0x0600); // set 1 line inversion
    //************* Power control setup ************/
    tftlcd_write_command(0x0C, 0x0007); // Adjust VCIX2 output voltage
    tftlcd_write_command(0x0D, 0x0006); // Set amplitude magnification of VLCD63
    tftlcd_write_command(0x0E, 0x3200); // Set alternating amplitude of VCOM
    tftlcd_write_command(0x1E, 0x00BB); // Set VcomH voltage
    tftlcd_write_command(0x03, 0x6A64); // Step-up factor/cycle setting 7b30
    //************ RAM position control **********/
    tftlcd_write_command(0x0F, 0x0000); // Gate scan position start at G0.
    tftlcd_write_command(0x44, 0xEF00); // Horizontal RAM address position
    tftlcd_write_command(0x45, 0x0000); // Vertical RAM address start position
    tftlcd_write_command(0x46, 0x013F); // Vertical RAM address end position
    // ----------- Adjust the Gamma Curve ----------//
    tftlcd_write_command(0x30, 0x0000);
    tftlcd_write_command(0x31, 0x0706);
    tftlcd_write_command(0x32, 0x0206);
    tftlcd_write_command(0x33, 0x0300);
    tftlcd_write_command(0x34, 0x0002);
    tftlcd_write_command(0x35, 0x0000);
    tftlcd_write_command(0x36, 0x0707);
    tftlcd_write_command(0x37, 0x0200);
    tftlcd_write_command(0x3A, 0x0908);
    tftlcd_write_command(0x3B, 0x0F0D);
    //************* Special command **************/
    tftlcd_write_command(0x28, 0x0006); // Enable test command
    tftlcd_write_command(0x2F, 0x12EB); // RAM speed tuning
    tftlcd_write_command(0x26, 0x7000); // Internal Bandgap strength
    tftlcd_write_command(0x20, 0xB0E3); // Internal Vcom strength
    tftlcd_write_command(0x27, 0x0044); // Internal Vcomh/VcomL timing
    tftlcd_write_command(0x2E, 0x7E45); // VCOM charge sharing time
    //************* Turn On display ******************/
    tftlcd_write_command(0x10, 0x0000); // Sleep mode off.
    //delay(8); // Wait 30mS
    tftlcd_write_command(0x11, 0x6878); // Entry mode setup. 262K type B, take care on the data bus with 16it only
    tftlcd_write_command(0x07, 0x0033); // Display ON */
    }



    tftlcd_clear();
    }
    ویرایش توسط yasser2007 : 18-11-2013 در ساعت 17:29

  8. #7
    کاربر فعال
    تاریخ عضویت
    May 2010
    نوشته ها
    119
    تشکر
    361
    تشکر شده 85 بار در 46 پست

    پیش فرض

    سلام این دستور رو
    [PHP]tftlcd_write_command(0x01, 0x0100); /* Set SS and SM bit */[/PHP]

    به این تغییر بده
    [PHP]tftlcd_write_command(0x01, 0x0700); /* Set SS and SM bit */[/PHP]

  9. کاربران : 2 تشکر کرده اند از شما mahdi8866 برای ارسال این پست سودمند:


  10. #8
    عضو جدید
    تاریخ عضویت
    May 2010
    نوشته ها
    5
    تشکر
    2
    تشکر شده 0 بار در 0 پست

    پیش فرض

    سلام
    اون کد رو عوض کردم فقط فونت ها درشت شدند .
    فایل tftlcd.c رو از یک پروژه دیگه که برعکس نشون نمیداد با این فایل عوض کردم درست شد .
    بازم ممنون

  11. #9
    تازه وارد
    تاریخ عضویت
    Jun 2012
    نوشته ها
    2
    تشکر
    0
    تشکر شده 0 بار در 0 پست

    پیش فرض

    نقل قول نوشته اصلی توسط yasser2007 نمایش پست ها
    سلام
    اون کد رو عوض کردم فقط فونت ها درشت شدند .
    فایل tftlcd.c رو از یک پروژه دیگه که برعکس نشون نمیداد با این فایل عوض کردم درست شد .
    بازم ممنون
    جناب یاسری من هم همین مشکل رو دارم.میشه لطفا اون کد هایی که تغییر دادید اینجا بذارید تا ما هم استفاده کنیم.

    با تشکر

  12. #10
    عضو جدید
    تاریخ عضویت
    May 2010
    نوشته ها
    5
    تشکر
    2
    تشکر شده 0 بار در 0 پست

    پیش فرض

    نقل قول نوشته اصلی توسط tirdad نمایش پست ها
    جناب یاسری من هم همین مشکل رو دارم.میشه لطفا اون کد هایی که تغییر دادید اینجا بذارید تا ما هم استفاده کنیم.

    با تشکر
    سلام
    شما اون فایل رو از پروژهای دیگه که داخل سی دی همراه بورد هست کپی کن و به جای فایل مزبور بزار درست میشه . شرمنده دیر جواب دادم تازه امروز ایمیلمو دیدم

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •