Driver for ILI9341


Today 13:26
Forum: Proton Plus Compiler v3
Starter: gdesantis
Views: 0
Replies: 2
Today 11:23
Forum: The Lounge
Starter: Les
Views: 0
Replies: 12
+ Reply to Thread
Results 1 to 2 of 2

Thread: Driver for ILI934160 days old

  1. #1
    Junior Member flosigud's Avatar
    Join Date
    Oct 2013
    Posts
    49
    Thumbs Up
    Received: 10
    Given: 2
    Total Downloaded
    1.08 GB

    2 Not allowed!

    Default Driver for ILI9341

    This is a simple driver for ILI9341 that prints charactes, lines and boxes. It was originally based on the driver that I extracted from Normnets Pic wav Player v1.0 for Nokia 6100 display which in turn I believe to be based on a driver by James Lynch which I also refered to. I addition to tha I have got some bits and pieces from all over the internet, not the least the Arduino crowd. <br>

    To use this driver you type:
    Include "ILI9341.inc"

    InitILI
    The init routine is in contrast with other inits I have seen very simple, its only starts the display but doesn't tweek any of its settings. My ILI9341 displays starts in BGR mode and mirrored. To fix that you have to set MADCTL register. There are four macros that set screen orientation, size of screen, color order to RGB and printing from left to right.


    SCRorientation0
    SCRorientation90
    SCRorientation180
    SCRorientation270

    There are few "graphic" commands that do what their names imply:

    ClearScreen
    SetPixel(x,y)
    HLine(x,y,w)
    VLine(x,y,h)
    XBlock(x,y,w,h)
    XBox(x,y,w,h)

    Printing of strings

    Fonts used are as defined in AN1182 by Microchip. To make fonts I used Microchip Graphics Resource Converter which is burried deep in Microchip Libraries for Applications. It takes Windows fonts and converts to horizontally arranged bitmaps, which isconvenient for this display. I manually converted these to basic using search and replace in Notepad++. There are several fonts includes in the zip.

    To use a font type for example:

    SetFont

    To print a string you must first set coordinates wXstart and wYstart and then:

    PrintString(string) or PrintString_At(x,y,string) which sets the coordinates first. Both call Sub Print_Chr which increments wXstart by the width of the character. More information on this can be gained by reading the program listing as I believe it to be reasonably commented.

    In the demo program there are some helper routines to set margins and print out whole fonts. It doesn't do much more than that. I will in following days post some more information on this driver and answear questions. I hope there will be some. The driver has some limitations, most notably it's inability to print wery lage fonts. I also hope to do some improvements in the coding.
    Attached Files Attached Files
    Last edited by John Drew; 15th October 2018 at 07:44. Reason: Removed the HTML
    Flosi Guđmundsson
    Reykjavík

  2. #2
    Junior Member flosigud's Avatar
    Join Date
    Oct 2013
    Posts
    49
    Thumbs Up
    Received: 10
    Given: 2
    Total Downloaded
    1.08 GB

    0 Not allowed!

    Default Re: Driver for ILI9312

  3. Few useful links:

    ILI9341 datasheet:
    https://courses.cs.washington.edu/co...l3/ILI9341.pdf

    Nokia 6100 LCD Display Driver:
    https://elecfreaks.com/estore/downlo...lay_Driver.pdf

    AN1182Fonts in the Microchip Graphics Library:
    http://ww1.microchip.com/downloads/e...tes/01182a.pdf

    Microchip Libraries for Applications:
    https://www.microchip.com/mplab/micr...r-applications
    Flosi Guđmundsson
    Reykjavík

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. [SOLVED !] driver for usb18f2550
    By Zeiger08 in forum USB Module
    Replies: 4
    Last Post: 23rd May 2015, 14:45
  2. Stepper driver
    By pic-ignorant in forum The Lounge
    Replies: 11
    Last Post: 25th April 2013, 21:10
  3. 0 to 10 v driver
    By Tim in forum The Lounge
    Replies: 25
    Last Post: 23rd July 2012, 10:29
  4. Bridge Driver
    By fanie in forum The Lounge
    Replies: 0
    Last Post: 27th August 2008, 12:55
  5. LM032LN Driver??
    By Darlington in forum The Lounge
    Replies: 0
    Last Post: 30th March 2008, 16:42

Members who have read this thread : 38

Actions :  (Set Date)

You do not have permission to view the list of names.

Posting Permissions

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