ILI9320 TFT LCD PORTRAIT to LANDSCAPE


+ Reply to Thread
Results 1 to 3 of 3

Thread: ILI9320 TFT LCD PORTRAIT to LANDSCAPE2047 days old

  1. #1
    Junior Member stefano's Avatar
    Join Date
    Dec 2005
    Posts
    51
    Thumbs Up
    Received: 1
    Given: 1
    Total Downloaded
    793.31 MB

    0 Not allowed!

    Default ILI9320 TFT LCD PORTRAIT to LANDSCAPE

    Hi,
    can I get some help to make the driver posted here: http://www.myamicus.co.uk/content.ph...hic-LCD-Shield , from
    PORTRAIT to LANDSCAPE ?

    Best regards

    Stefano

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Junior Member stefano's Avatar
    Join Date
    Dec 2005
    Posts
    51
    Thumbs Up
    Received: 1
    Given: 1
    Total Downloaded
    793.31 MB

    0 Not allowed!

    Default Re: ILI9320 TFT LCD PORTRAIT to LANDSCAPE

    Hi,
    I tried this solution:
    ......
    Include "ILI9320.inc" ' Load the ILI9320 graphic LCD macros into the program
    .......
    tVerticalPrint = True ' VERTICAL PRINT It's OK! but the characters starting from the middle of the display

    I think there is to modify the code to print characters below.

    Thanks to those who help me.

    Regards

    Stefano


    Code:
    ' Place the character on the LCD'
        If tVerticalPrint = False Then                          ' Do we require vertical printing?
            Glcd_WriteReg($03,01000000111000)                ' No. So set scanning mode for Horizontal writes, Horizontal inrement, Vertical increment
            Glcd_SetWindow(Glcd_bCursorX, Glcd_wCursorY, (Glcd_bCursorX + Glcd_bFontWidth) - 1, (Glcd_wCursorY + Glcd_bFontHeight) - 1) ' Create a window for the size of the character
            Clear Glcd_CS                                       ' Enable the LCD
            hSetCGRAM(Glcd_bCursorX, Glcd_wCursorY)             ' Point to CGRAM
            Glcd_bCursorX = Glcd_bCursorX + Glcd_bFontWidth     ' Update the cursor position ready for the next character
        Else                                                    ' Otherwise... Use vertical print
            Glcd_WriteReg($03,01000000010000)                ' Set scanning mode For Horizontal writes, horizontal increment, Vertical decrement
            Glcd_SetWindow(Glcd_bCursorX, Glcd_wCursorY, ((Glcd_bCursorX + Glcd_bFontHeight) - 1), ((Glcd_wCursorY + Glcd_bFontWidth) - 1)) ' Create a window for the size of the character
            Clear Glcd_CS                                       ' Enable the LCD
            hSetCGRAM(Glcd_bCursorX, ((Glcd_wCursorY + Glcd_bFontWidth) - 1)))  ' Point to CGRAM
            Glcd_wCursorY = Glcd_wCursorY - Glcd_bFontWidth     ' Move the cursor position for the next character
        EndIf
    _FontWidthLoop:
            Glcd_bHeightCount = Glcd_bFontHeight                ' Set the character height counter
            Glcd_bCharReadsTemp = Glcd_bFontAmountReads         ' Store the amount of bytes to read for this segment
    _FontBytesLoop:
            Tblrd*+                                             ' Read the byte from code memory
            Glcd_bCharPixelsTemp = 8                            ' Create a loop for the bits to plot
    _CharByteLoop:
                If tTransparent = False Then                    ' Do we require transparent background?
                    ILI_wProd = wPixelColour                    ' No. So save the colour of the pixel
                    If TABLAT.0 = 0 Then                        ' Do we need to set a pixel?
                        wPixelColour = wBackGroundColour        ' No. So use the paper (background) colour
                    EndIf
                    hWriteDataWord(wPixelColour)                ' Place a pixel on the LCD
                    wPixelColour = ILI_wProd                    ' Restore the colour of the pixel
                Else                                            ' Otherwise...
                    If TABLAT.0 = 1 Then                        ' Do we need to set a pixel?
                        hWriteDataWord(wPixelColour)            ' Yes. So place a pixel on the LCD
                    EndIf
                EndIf
                Ror TABLAT                                      ' Move each pixel into bit-0
                Dec Glcd_bHeightCount                           ' Decremrnt the character font height counter
                If Glcd_bHeightCount = 0 Then ExitLoop          ' Exit the loop when we reach the correct size of the character
                Djnz Glcd_bCharPixelsTemp,_CharByteLoop         ' Close the loop when all pixels plotted
            Djnz Glcd_bCharReadsTemp,_FontBytesLoop             ' Close the loop when all bytes read
    ExitLoop:
        Djnz Glcd_bFontWidth,_FontWidthLoop                    ' Close the loop when all width pixels are done
        Set Glcd_CS
        Glcd_WriteReg($03,01000000110000)                    ' Set Entry mode for horizontal left to right increments 0001000000110000
        ILI_wTblPtr = Glcd_wSaveTblPtr                          ' Restore the contents of TBLPTRL\H
        WREG = Glcd_bSaveChar                                   ' Restore the original character in WREG before returning
        Return
    #endif

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Bluce
    Guest Bluce's Avatar

    0 Not allowed!

    Default Re: ILI9320 TFT LCD PORTRAIT to LANDSCAPE

    Here is an UART TFT LCD, it supports WYSIWYG editor to build your GUI in PC and download it via USB.
    I think it is easier and very cool for this project
    .
    It can be controlled by Arduino via UART, so just use the Serial.print() you can make it display many images. And you can even build Font by yourself and download to the LCD.


    tutorial and video:http://blog.iteadstudio.com/product-...ino-project-3/

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. TFT 2,2' 240x320 SPI ILI9340 LCD
    By stefano in forum LCD module
    Replies: 9
    Last Post: 25th December 2017, 10:28
  2. [SOLVED !] TFT LCD ILI9340 controller
    By brown in forum LCD module
    Replies: 6
    Last Post: 30th March 2014, 10:50
  3. ILI9320 or 25 TFT Color LCD module with touch panel
    By Cocoloco in forum Proton Plus Compiler v3
    Replies: 0
    Last Post: 19th March 2012, 17:46
  4. Tft Lcd
    By C_Moore in forum The Lounge
    Replies: 3
    Last Post: 5th December 2008, 12:26

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts