• AVR Freaks

Hot!pic24 interface ili9341 tft help

Author
gatocap
Starting Member
  • Total Posts : 38
  • Reward points : 0
  • Joined: 2016/02/11 09:33:13
  • Location: 0
  • Status: offline
2020/12/23 20:15:23 (permalink)
0

pic24 interface ili9341 tft help

HI all, I have my proto working well and would like to get knowledge about interfacing my pic24hj128gp502 chip which I am happy with to get a tft display for the proto. I have a Adafruit 3.2" which is to work on 3.3v.
I have studied the initializing commands and have tried both PMP and bit setting for my control pulses but when I do a simple fill screen function I get no response. I flash the backlite in a while loop after the fill screen to confirm the osc. freq which works fine. I use the uart to print to a console pertinent info which also works fine. If someone could help I would be very grateful or if anyone knows of training info for tft's it would help greatly. Thank you for your time,  
#1

6 Replies Related Threads

    ric
    Super Member
    • Total Posts : 29919
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: pic24 interface ili9341 tft help 2020/12/24 01:17:34 (permalink)
    5 (1)
    Can you show us your schematic?
    You have made no mention about exactly HOW you have connected the PIC to the TFT, or shown any of the code you are using to send data to it.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    dan1138
    Super Member
    • Total Posts : 4243
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: pic24 interface ili9341 tft help 2020/12/24 12:14:14 (permalink)
    3.67 (3)
    ric
    Can you show us your schematic?
    You have made no mention about exactly HOW you have connected the PIC to the TFT, or shown any of the code you are using to send data to it.

    Ric, Your post count is approaching 30000, just wondering how may of those posts are like this one. :)
     
    Happy Christmas and New Year.
     
    <EDIT>
    I've been troll down voted :)

    Thank you Santa Cinzia, and Merry Christmas too.
    post edited by dan1138 - 2020/12/24 14:26:09

    Attached Image(s)

    #3
    ric
    Super Member
    • Total Posts : 29919
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: pic24 interface ili9341 tft help 2020/12/24 13:55:43 (permalink)
    5 (1)
    Too often it is necessary to remind users they have not supplied the information necessary to deduce their problem.
    I guess they assume these unstated details are obvious.
    Merry Christmas, I hope santa left something nice.

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #4
    ric
    Super Member
    • Total Posts : 29919
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: pic24 interface ili9341 tft help 2020/12/24 15:37:10 (permalink)
    1 (1)
    dan1138
    I've been troll down voted :)

    G for Grinch. I gave you some back :)
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #5
    Mysil
    Super Member
    • Total Posts : 4123
    • Reward points : 0
    • Joined: 2012/07/01 04:19:50
    • Location: Norway
    • Status: offline
    Re: pic24 interface ili9341 tft help 2020/12/25 07:54:35 (permalink)
    5 (1)
    Hi,
    The most important tutorial resource for ILI9341, and any other TFT display is the Datasheet for the controller.
    Eventually together with circuit diagram for the display module, and the board assembly.
     
    Even if you use a ready-made development board with integrated display,
    do not assume that members that may be willing and able to help,
    have the same board, or remember the connection diagram without reference.
    Please be specific, and identify the precise board design with circuit diagram,
    or link to the product webpage for the board design, not just 'some Adafruit board'.
     
    Unlike Display controllers for Alphanumeric Character LCD display, Display controllers for TFT displays are different!
    Display controllers for Character LCD displays are all clones of the same Controller Hitachi HD44780,
    and have the same Command set, and are generally software compatible.
    They may be different in some timing specifications, or in the character set that is builtin.
     
    Display controllers for TFT display, have different Command set, even when they may be able to perform the same functions, or use the same communication interfaces.
    Also, there are many more commands and options, so getting it to work by random experimentation is usually hopeless.
    Although many display controller types may have Reset default settings that may work, 
    there are many more control registers, which may have settings for Display Clocking and format,
    Oscillator or PLL configurations, Color representation, LCD Voltage settings and adjustment,
    and Gamma correction settings
     
    Although the ILI9341 display controller may support 8 bit, 16 bit, or 18 bit Parallell interface, in several different ways, and also SPI interface. It have 4 Mode bits that may be hardwired in the display module,
    or on the development board. You have to know how this is configured on the board you are using.
     
    Establishing communication between Microcontroller and Display Controller, is some times the biggest challenge in getting the controller to work.
    When you are able to display One pixel, there is feedback telling wether you are doing right or wrong. 
     
    Rather than trying to embark on a long sequence of display commands, that may, or may not succeed in displaying something,
    I prefer to try to Read a single Control register, to confirm whether communication is possible.
    I try to Read the Device Identification register, before anything else.
    Then try to Read, Write, and Read a single control register to verify communication.
     
    As far as I can remember, all Command codes to ILI9341, is transferred as 8 bit commands,
    even if 16 bit parallel transfer is used for Color Data.
    8 bit Commands may be transferred using PORTE , by writing directly to LATE register,
    and toggling the PMRD -> RD,  PMWR -> WR, LCD_RS -> D/C, and LCD_CS# ->  /CS   signal lines,
    even without setting up and Enabling PMP peripheral.  If hardware is connected in any sensible way,
    and Port SFR registers are is set up correctly.
     
     
    There is driver code for ILI9341 Display Controller with PIC24 or dsPIC33 microcontrollers in:
    MLA v2017_03_06, and probably in any later versions, and possibly in some earlier versions also.
    See:
    https://www.microchip.com...aries-for-applications
    the latest version is v2018-11-26
    Or the archive webpage: https://www.microchip.com...pplications/mla-legacy
     
    Regards,
        Mysil
     
    post edited by Mysil - 2020/12/26 01:46:45
    #6
    Mysil
    Super Member
    • Total Posts : 4123
    • Reward points : 0
    • Joined: 2012/07/01 04:19:50
    • Location: Norway
    • Status: offline
    Re: pic24 interface ili9341 tft help 2020/12/26 03:34:59 (permalink)
    0
    Hi,
    It seem from ADAfruit webpage, that both boards:
    Adafruit 2.8" and 3.2" Color TFT Touchscreen Breakout v2 8-Bit Wiring and Test.
    have all 4: IM0, IM1, IM2 and IM3 inputs brought out to the connector at one end of the board, 
    such that it might be wired to select any of the communication modes that the display controller may support.
     
    The 4 IM pins on SPI end of the Adafruit board, must be wired according to table in datasheet for the ILI9341 display controller, for the communication mode to be used by software in PIC24.
    This is not mentioned in the Adafruit hookup description.
     
        Mysil
    post edited by Mysil - 2020/12/26 04:07:13
    #7
    Jump to:
    © 2021 APG vNext Commercial Version 4.5