CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

LCD TFT 320QVT_9341 driver

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
huynhhai



Joined: 04 Apr 2015
Posts: 39

View user's profile Send private message

LCD TFT 320QVT_9341 driver
PostPosted: Thu Mar 24, 2016 6:37 am     Reply with quote

Hi every one,

I have got a TFT 320QVT-9341, i found driver to interface to it with PIC18F4620 but is not successful, someone had experience with it , please show me, (i tried with 16bit, 8 bit, spi already).

http://barth.pl/pictures/TFT_320GVT_9341_top.jpg
http://barth.pl/pictures/TFT_320GVT_9341_bottom.jpg

Thanks & regards,
huynhhai
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Mar 24, 2016 6:42 am     Reply with quote

When posting requests like this, please add a 'link' to the driver as well as the datasheet for the LCD module.

I can't begin to 'guess' what is wrong though my first idea is that the PIC is 5 volts and the LCD is 3 volts ?

edit:

As I suspected, after a 5 minute Googling, 5 volt PIC, 3 volt LCD

More information is needed to properly help

Jay
huynhhai



Joined: 04 Apr 2015
Posts: 39

View user's profile Send private message

PostPosted: Thu Mar 24, 2016 7:36 am     Reply with quote

My schematic connect to lcd as below:

my use PIC18F4620

PIN D0 ---> LCD RS
PIN D1 ---> LCD RW
PIN D2 ---> LCD RD
PIN D3 ---> LCD CS
PIN D4 ---> LCD RESET

PORTB ---> LCD DB0--DB7
PORTC ---> LCD DB8 -- DB15

LCD LED_A ---> 3.3V
LCD VCC ---> 3.3V
LCD GND ---> 0V

to convert voltage 5v to 3.3v to interface with LCD i using 74HC573 with 3.3V supply, at pin 1 ( enable output --> 0V) , pin11(latch ---> 3.3v), at the input i use resister 1K to connect from PIC PIN to LCD PIN,

I dont know i missing thing for hw,
can link to file manual ili9341:
http://www.newhavendisplay.com/app_notes/ILI9341.pdf

datasheet of LCD i dont find out
huynhhai



Joined: 04 Apr 2015
Posts: 39

View user's profile Send private message

PostPosted: Thu Mar 24, 2016 11:29 pm     Reply with quote

Hi everyone,

I found the datasheet of LCD TFT 320QVT_9341 as link below, but this IC control driver LCD using SSD1289 not use ILI9341 as my LCD

http://i0.wp.com/ozzmaker.com/wp-content/uploads/2013/10/sainsmartschematicV2.png

http://www.elecfreaks.com/wiki/index.php?title=3.2%22_TFT_LCD_Screen_Module

http://www.okaphone.com/artikel.asp?id=478883&id=478883

Thanks & best regards,
huynhhai
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

PostPosted: Fri Mar 25, 2016 8:56 am     Reply with quote

Seriously, the big question is what you actually want to 'do' with this.

Understand that the PIC is very badly suited for things like graphics on LCD's. This is not a text mode LCD, where you can just write a character. Writing something like a line, is going to involve writing pixels, and to write a specific pixel, without changing the others in the same byte, you are going to need to read the byte the controller currently has 'at' the required location.
This then implies that you need to be able to do read/write operations.
Problem immediately then is that the unit will not directly drive the inputs you have on the PIC. The ones on the data lines are ST inputs. This implies they require the input voltage to go to 4v to see a '1' (with the chip running at 5v). A 3.3v chip will not do this.
So you need bidirectional level shifter on these lines, or change your thinking.
Honestly use a 3.3v PIC, and you have a 'chance'. Otherwise the interface is going to be a real problem.....
huynhhai



Joined: 04 Apr 2015
Posts: 39

View user's profile Send private message

PostPosted: Fri Mar 25, 2016 1:15 pm     Reply with quote

Dear Ttelmah,

Thanks you very much for your guiding,

Now, I will change power supply to PIC as 3.3V. I will connect my LCD again, check config LCD command step by step. First only display text, after display image. But I don't understand PIC output pin 5V (to see 1) connect to LCD input pin ( LCD no feedback signal to PIC, because i using parallel 16 bit, no using SPI mode there for no input).


Thanks & regards,
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

PostPosted: Fri Mar 25, 2016 1:51 pm     Reply with quote

If (for instance), you are prepared to start with a blank screen and just draw particular patterns 'to' it, then bidirectional is not needed. However if you want to do any form of 'graphic' application (drawing lines, circles graphic text etc.), then to write any pixel, you have to know what is already in all the other pixels in the same memory cell. Hence you have to read.

You do understand just how much data this screen involves?. at least 20* more than your PIC actually has. So you do not have enough data storage to actually just draw patterns, unless you are storing these in something like an external memory. Without this, the only way to use this display on the PIC, is by using something like the graphics library, to draw the shapes, which then implies reads are needed.

Your PIC will not run at 3.3v (probably will, but not reliably).

You need the LF version to run at 3.3v, and this is only specified to 25MHz at 3.3v.

Seriously, if you must have a display like this, and want to do anything at all useful with it, you need to think again.
huynhhai



Joined: 04 Apr 2015
Posts: 39

View user's profile Send private message

PostPosted: Fri Mar 25, 2016 4:23 pm     Reply with quote

Dear Ttelmah,

Maybe, my PIC can not connect good to TFT LCD by PIC18F4620 only using voltage 4.2-5.5V. About store data i don't care so much because i will use external ROM, RAM (but not reliably, need to design HW). The PIC is using for application only control, not strong in graphic LCD TFT. I will think about this and choose a microcontroller to connect this LCD, such as STM32F, Arduino, ...

I lost many time to study connect & display to TFT LCD but unsuccessful, They're more difficult than LCD 128x64 (Black+white).

Thanks & regards,
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

PostPosted: Sat Mar 26, 2016 1:39 am     Reply with quote

Lots more data.

B+W = 1 bit per pixel.

Colour = up to perhaps 24bits per pixel.

Everything immediately involves moving 24* as much data.

Honestly the PIC is a great chip for interfacing, sampling, control etc.. But it is not good for graphics. Keep it simple and use a smaller display, or get one of the smart displays.
10+ years ago, I did a project that needed a complex colour display, so I wrote this as a completely separate entity. It had it's own processor, with an SPI interface to the PIC, graphic RAM for the whole display, and I wrote an emulation of an HPGL plotter for it. You sent it commands to draw a line from x1,y1 to x2,y2, or draw curves, circles, squares etc.. Had commands to fill areas, do plotter text at any orientation or size. Could even scroll screen areas, and prepare a second window, while displaying another. The PIC sat merrily sampling, handled the keypad etc., but when it wanted to do a display could just draw the graph in lines etc., without having to handle 1/2MB of display data.....
This was the ancestor of the 'smart graphic controller' modules that are now available, and one of these would be a much better way of doing things with a PIC.
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Mar 26, 2016 5:44 am     Reply with quote

re: Now, I will change power supply to PIC as 3.3V.

That will not work, as that PIC is not designed to run at 3 volts. You NEED the 'L' version. Just read the datasheet, electrical specification chapter, there are figure/charts that show this.

Jay
huynhhai



Joined: 04 Apr 2015
Posts: 39

View user's profile Send private message

PostPosted: Sun Mar 27, 2016 11:18 am     Reply with quote

Thanks for your help,

I worked with PIC with small application, it's very good & prevent noise, my PIC is using 16F628A, i was assembly to motobike it work better.

Maybe, i will use other microcontroller with good support for TFT LCD and use PIC to control, sample, measure, interface... ( they will connect together by SPI, RS232 interface). But i'm not sure, with two type of microcontroller different, do they work good together?

Thanks & best regards,
Cronos



Joined: 17 Oct 2013
Posts: 1
Location: Oz

View user's profile Send private message

PostPosted: Wed Aug 31, 2016 4:45 am     Reply with quote

A driver for SSD1289 was done already in mikroc and may be easy to port it to CCS. I am playing with a 3.2' TFT_320QVT from eBay I think SSD1289 has config pins for 16 bit mode and PIC18LF4620. It appears to be configured for 16 bit. Might need to measure PS0-PS3 pins to clearly see what interface mode is selected. Will post code if I make it work.

Found mikroc driver on:
http://www.hmsprojects.com/projects/tft-lcd/
and
http://forum.mikroe.com/viewtopic.php?f=160&t=46901
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group