TFT 2,2' 240x320 SPI ILI9340 LCD


+ Reply to Thread
Results 1 to 10 of 10

Thread: TFT 2,2' 240x320 SPI ILI9340 LCD2076 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 TFT 2,2' 240x320 SPI ILI9340 LCD

    Hi,<br>I Have this code for normal "LCD's data port" use of display:<br>
    Code:
    Code:
    $define GLCD_CS    PORTC.2   ' LCD's CS pin
    $define GLCD_RS    PORTC.1   ' LCD's RS pin
    $define GLCD_WR    PORTC.3   ' LCD's WR pin
    $define GLCD_RD    PORTC.5   ' LCD's RD pin
    $define GLCD_Data  PORTB     ' LCD's data port
    $define GLCD_RST   PORTC.4   ' LCD's Reset pin
    I ask for help to drive the display using the spi interface (see photo)
    Click image for larger version

Name:	display.jpg
Views:	64
Size:	87.0 KB
ID:	2284

    Thanks
    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
    Prolific Poster normnet's Avatar
    Join Date
    Jul 2004
    Posts
    2,401
    Thumbs Up
    Received: 80
    Given: 48
    Total Downloaded
    1.40 GB

    0 Not allowed!

    Default Re: TFT 2,2' 240x320 SPI ILI9340 LCD

    See MI0283QT-2 TFT 240x320 Driver.
    Updating the example code will be required.
    I have made this work. Thanks Gabi!

    The above example code may be for an ILI9341 driver.

    Norm
    Last edited by normnet; 27th September 2014 at 13:31.

  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
    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: TFT 2,2' 240x320 SPI ILI9340 LCD

    Thanks Norm,

    can you help me to trasform my script from parallel mode to serial ?

    Code:
      ....Declare..............
        Declare Optimiser_Level = 3                ' Maximum optimisation
    
    
      '  Display connections  parallel mode
      
       '' $define Glcd_CS   PORTC.0               ' Connect to LCD's CS pin
      ''  $define Glcd_RD   PORTC.1               ' Connect to LCD's RD pin
      ''  $define Glcd_RS   PORTC.2               ' Connect to LCD's RS pin
       '' $define Glcd_WR   PORTA.3               ' Connect to LCD's WR pin
      ''  $define Glcd_Data PORTB                 ' Connect to LCD's data bus
        
        '==================NEW CODE FOR SERIAL MODE ====================
        $define LCD_RESET_PIN        PORTC.1
        $define LCD_CS_PIN           PORTC.2
        $define LCD_SCL_PIN          PORTC.3
        $define LCD_SDO_PIN          PORTC.4
        $define LCD_SDI_PIN          PORTC.5 
    '===========================================
    
    
        Include "ILI9320.inc"                   ' Load the ILI9320 routines into the program
    
    
        Dim bYaxis As Byte
        Dim bXaxis As Byte
        Dim wColour As Word
    
    
    '-------------------------------------------------------------------------------------------
    Main:
        Glcd_Cls(clWhite)
    
    
        Glcd_SetFont(Syste_B__9o75)
        Glcd_PaperColor(clBrightRed)
        Glcd_PenColor(clBrightBlue)
        Glcd_Cursor(0,0)
        Glcd_Print("Hello World")
    
    
    '
    ' Copy and paste the pixels
    '
        For bYaxis = 0 To 19
            For bXaxis = 0 To 239
                wColour = Glcd_Pixel(bXaxis,bYaxis)
                Glcd_PenColor(wColour)
                Glcd_Plot(bXaxis, bYaxis + 40)
                DelayMS 1
            Next
        Next
       Include "Syste_B__9o75.inc"
     End

  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.

  7. #4
    Prolific Poster normnet's Avatar
    Join Date
    Jul 2004
    Posts
    2,401
    Thumbs Up
    Received: 80
    Given: 48
    Total Downloaded
    1.40 GB

    0 Not allowed!

    Default Re: TFT 2,2' 240x320 SPI ILI9340 LCD

    stefano

    Is the code working OK in parallel mode for now or do you have a restriction on pins available?
    It's easier to make one change at a time.

    At any rate at some point in your code the port is being set with 8 bit data.
    You will wish to change this to serial.
    I would recommend utilizing the Shout and Shin command first as it makes transitioning to hardware SPI easier.


    Norm

  8. 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.

  9. #5
    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: TFT 2,2' 240x320 SPI ILI9340 LCD

    Thanks Norm,
    my problem is the PCB's display. PCB, not have the pins available for parallel driving. (look at the picture below)

    I ask help for this problem.

    Regards

    Stefano

  10. 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.

  11. #6
    Prolific Poster normnet's Avatar
    Join Date
    Jul 2004
    Posts
    2,401
    Thumbs Up
    Received: 80
    Given: 48
    Total Downloaded
    1.40 GB

    0 Not allowed!

    Default Re: TFT 2,2' 240x320 SPI ILI9340 LCD

    My PC is failing.
    Several tries to boot today.
    I may be ordering a new PC.
    Perhaps someone else could help as I may not have time right now.

    Norm

  12. 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.

  13. #7
    Prolific Poster normnet's Avatar
    Join Date
    Jul 2004
    Posts
    2,401
    Thumbs Up
    Received: 80
    Given: 48
    Total Downloaded
    1.40 GB

    0 Not allowed!

    Default Re: TFT 2,2' 240x320 SPI ILI9340 LCD

    Stefano

    Did you try the Shout and Shin serial commands?
    They are explained in the PDS help pdf.

    Norm

  14. 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.

  15. #8
    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: TFT 2,2' 240x320 SPI ILI9340 LCD

    Quote Originally Posted by normnet View Post
    Stefano

    Did you try the Shout and Shin serial commands?
    They are explained in the PDS help pdf.

    Norm
    Hi Norm, unfortunately, I do not know the serial communication. I hope to learn soon :-)

    Regards

    Stefano

  16. 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.

  17. #9
    dima
    Guest dima's Avatar

    0 Not allowed!

    Default Re: TFT 2,2' 240x320 SPI ILI9340 LCD

    on the topic ...

    really need a working example for this topic.

  18. 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.

  19. #10
    proTR
    Guest proTR's Avatar

    0 Not allowed!

    Default Re: TFT 2,2' 240x320 SPI ILI9340 LCD

    Could you add the code sample for ILI9341 SPI here? i did not manage, help mi

  20. 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. MI0283QT-2 TFT 240x320 Driver
    By _Gabi_ in forum The Lounge
    Replies: 24
    Last Post: 9th December 2018, 23:13
  2. [SOLVED !] 2.2" Serial SPI TFT LCD Display
    By JimDrew in forum LCD module
    Replies: 3
    Last Post: 25th December 2017, 10:15
  3. [SOLVED !] 2.2" TFT LCD SPI driver
    By starwars in forum The Lounge
    Replies: 0
    Last Post: 21st July 2017, 16:20
  4. [SOLVED !] TFT LCD ILI9340 controller
    By brown in forum LCD module
    Replies: 6
    Last Post: 30th March 2014, 10:50
  5. Need Help on TFT-proto SPI interface
    By davidsgr in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 22nd February 2012, 20:06

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