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 support@ccsinfo.com

LCD 320x240 color... help!!
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
lucasromeiro



Joined: 27 Mar 2010
Posts: 167

View user's profile Send private message

LCD 320x240 color... help!!
PostPosted: Fri May 28, 2010 7:05 pm     Reply with quote

Hello everybody. I bought a color graphic LCD and I do not know how it works. I use a PIC18F4550, lcd disposal at the entrance of the SD card, the LCD is 320x240. 3.5 ". This is the LCD:

http://cgi.ebay.com/3-5-TFT-LCD-Module-Display-Touch-Panel-PCB-adapter-/200414904304?cmd=ViewItem&pt=AU_CashRegisterAccessories&hash=item2ea9a8bff0

I would like some help because I am having great difficulty, mainly because it is colorful. If someone have some program that converts pictures and coigüe, I thank you, or any thing that is useful. I need to know much about how to control this lcd. I will not know how to program it or if a library already exists for that.

Any help is very welcome, thank you all.
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sat May 29, 2010 5:55 am     Reply with quote

To understand more on the LCD module, there's a link supplied right on the auction page where the seller asks you do download all the datasheets.


You'll want to do that and then start reading.. the display is based off the SSD2119 controller.

If CCS doesn't have a driver, you'll want to write a driver based on that information.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
lucasromeiro



Joined: 27 Mar 2010
Posts: 167

View user's profile Send private message

PostPosted: Sat May 29, 2010 8:20 am     Reply with quote

Where can I find information? I do not know what driver to search him ... I am searching to find programs to convert color images into code .. more the biggest challenge is finding a library. As can help me, I shall be very grateful.
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sat May 29, 2010 10:52 am     Reply with quote

You need to READ the information in the auction, the link YOU provided had a link below the images for the item saying to download the data sheets from there.

It says:

Quote:

Please download (and "download points to http://www.egochina.net.cn/e-shop/ebay/TFT/035PCB/035PCB.rar ) all the datasheet for this item.

Brand new 3.5" real color TFT LCD with touch screen, 320 * 240 pixels, 26W color, i8080 16-bit parallel interface, can support 8080 8-bit mode via modify the board, 3-wire/4-wire SPI mode. Build-in SSD2119 Controller, with adapter plate and touch Panel Controller, can be used in Driving the following MCU directly. AVR, 51, PIC, ARM7, STM32, etc.



It's really important to pay attention.

-ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
lucasromeiro



Joined: 27 Mar 2010
Posts: 167

View user's profile Send private message

PostPosted: Tue Jun 01, 2010 3:49 pm     Reply with quote

How Can I write a driver based on this information?
Have something to tell me?
information?
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Jun 01, 2010 4:02 pm     Reply with quote

You should be able to.

CCS comes with a graphics library. So does Microchip C.

I know for Microchip, you can use all the upper level functions provided you write the low-level interface to the graphics controller.

For CCS, the examples directory has drivers for various graphics controllers like the SED1335, and so forth. You can use one of these as a template to use with you LCD... you'll need to look around the files though, I haven't done so quite yet. My applications have been using different output methods.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
lucasromeiro



Joined: 27 Mar 2010
Posts: 167

View user's profile Send private message

PostPosted: Tue Jun 01, 2010 10:14 pm     Reply with quote

Hello Ben!

Thanks for your support.
I saw that the CCS comes with a library, but it is LCD or have other monochromatic? Microchip has some stuff?
I did not understand what he said from Microchip.
The lcd is this, the link that I bought that is adapted to PCBs:
http://www.crystalfontz.com/product/CFAF320240F-T-TS.html
Has more information, more as I am beginner and I'm struggling to draw up the code because I have no idea.
Could you help me?
I need much help,
I understand that I can use something as a model, most have no idea, because until I have some code for color LCD, all non-monochromatic
That looks interesting:
http://rossum.posterous.com/avr-homebrew-device-with-iphone-aspirations
I would like to do something, to be able to command ... interesting!
As I am Brazilian, it becomes more difficult for me, the more I ask you to help me in possible directions thanks.
lucasromeiro



Joined: 27 Mar 2010
Posts: 167

View user's profile Send private message

PostPosted: Tue Jun 01, 2010 10:31 pm     Reply with quote

Ben
Look this. help?

http://www.crystalfontz.com/forum/showthread.php?p=25575

??
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 10:56 am     Reply with quote

lucasromeiro wrote:
Hello Ben!

Thanks for your support.
I saw that the CCS comes with a library, but it is LCD or have other monochromatic? Microchip has some stuff?
I did not understand what he said from Microchip.
The lcd is this, the link that I bought that is adapted to PCBs:
http://www.crystalfontz.com/product/CFAF320240F-T-TS.html
Has more information, more as I am beginner and I'm struggling to draw up the code because I have no idea.
Could you help me?
I need much help,
I understand that I can use something as a model, most have no idea, because until I have some code for color LCD, all non-monochromatic


That's the learning process. If I write your code for you, (and this is what I do for a living) you would learn little or nothing.

Only when you really hit the books and roast your brain a little does this stuff sink in.

A long time ago, I wrote my own LCD driver.. from scratch... because I wanted to learn. And it was hard. Learning all this stuff is hard.

Quote:

That looks interesting:
http://rossum.posterous.com/avr-homebrew-device-with-iphone-aspirations


I looked at that. He did a nice job. I hope you realize at your current level of experience the trip you're in for. That project looks easy and nice, but it is work and effort.

Why not email that author for his LCD driver? Maybe learning to adapt it rather than write one from scratch might

Quote:

I would like to do something, to be able to command ... interesting!
As I am Brazilian, it becomes more difficult for me, the more I ask you to help me in possible directions thanks.



You need to get a book on C.
You need to closely study one of the LCD drivers.

Take a look at the SSD1339 drivers included with Microchip's free graphics library. Not only is there libraries to do stuff like draw shapes and such, but there's color LCD drivers and all sorts of other goodies to look at it.

You have a lot of learning to do. A quick fix will not happen.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
lucasromeiro



Joined: 27 Mar 2010
Posts: 167

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 3:17 pm     Reply with quote

Hello Ben,

I understood what you told me.
I agree with you!
I need to burn your head a little to learn!
The bad thing is that here I have very little material about it, for example being, I do not know what to do for the lcd work, the theory.
What more really need is to know how it works very well in theory, an example of any other color lcd to do and I understand how some hint that for a beginner like me is hard to find, especially in Portuguese or in books here.
Could you please tell me the link for these drivers from Microchip? not found.
If you can pass me some other references for me to study, be very grateful!

Thanks Ben
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 3:32 pm     Reply with quote

Download this:

Display Graphics (QVGA) dsPIC30F, dsPIC33F, PIC18, PIC24F, PIC24H, PIC32 Microchip Applications Library 06/01/2010
Available at: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784

Install and look through the examples.

Download this:

http://www.crystalfontz.com/controllers/SSD2119.pdf

Pay special attention to Chapter 7 - Function Block Descriptions, Chapter 8 - COMMAND TABLE (TBC), Chapter 9 - COMMAND DESCRIPTION (TBC) (this one is long) and then Chapter 13 for the timing characteristics (which depending on the interface you use, show you in what order transactions should be handled to the LCD).

Really, you should read the WHOLE datasheet. Because it's good to know where a piece of information you might need is located (like the cable pinout)

If your PIC doesn't need speed for the moment, this controller will use SPI which is a breeze to hook to a PIC controller. (I did it with an SSD1339 and had it working in less than 1hr), but if you want speed, you can write the driver (because the commands are the same, just the transfer method is different) using parallel output (through a PMP or just raw port control).

Hooking up an LCD is not an easy thing. Writing drivers can be a challenge too. Then adding this x3 for color and then all the neat things the LCD can do... Takes time and patience.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
lucasromeiro



Joined: 27 Mar 2010
Posts: 167

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 4:15 pm     Reply with quote

Hello Ben, once again thanks for the support ..
Now I downloaded this file:
Microchip Application Libraries 04-28 v2010-Installer.exe

what was meant?

As for the PIC18 (18F4550) was deselected the option to display graphics on the table ..
it would be possible to use
I understand your advice and explanations, do that ...

Should I use something, because the lcd works at 3.3v ... problem?


However I have one question, you told me to look at this datasheet.:
http://www.crystalfontz.com/controllers/SSD2119.pdf
But the problem is that I bought this LCD:
http://cgi.ebay.com/3-5-TFT-LCD-Module-Display-Touch-Panel-PCB-adapter-/200414904304?cmd=ViewItem&pt=AU_CashRegisterAccessories&hash=item2ea9a8bff0

and the seller said that this is simply modullo LCDhttp: / / www.crystalfontz.com/product/CFAF320240F-T-TS.html
But with PCBs.

Got it?

Look at my conversation with him:

(13:09) Luke Pilgrim: hello, what model and manufacturer (specifications) of the lcd, so I Perform searches.
http://cgi.ebay.com/3-5-TFT-LCD-Module-Display-Touch-Panel-PCB-adapter-/200414904304?cmd=ViewItem&pt=AU_CashRegisterAccessories&hash=item2ea9a8bff0
(13:10) Potter: what search?
(13:10) Potter: Spec Should downlaod in the item
(13:11) Potter: http://www.egochina.net.cn/e-shop/ebay/TFT/035PCB/035PCB.rar
We Can Give You the USA Website link
(13:12) Potter: http://www.crystalfontz.com/product/CFAF320240F-T-TS.html
LCD is the Same with this
(13:12) Potter: made in the PCB Desing, not a company
(13:13) Luke Pilgrim: search programs, codes, circuits, That Can anything help me control it ..
(13:14) Potter: http://www.crystalfontz.com/product/CFAF320240F-T-TS.html
(13:15) Luke Pilgrim: good
Also more?
(13:16) Potter: http://cgi.ebay.com/STM32F103RBT6-Development-Board-2-8-TFT-LCD-Module-/190369034236?cmd=ViewItem&pt=LH_DefaultDomain_0&hash=item2c52e0effc
(13:16) Potter: Can Develop use this board directly drive


In that case I would follow what Datasheet?

From a look at the announcement of the product (Modulo EBAY), he offers this information: http://www.egochina.net.cn/e-shop/ebay/TFT/035PCB/035PCB.rar
Some information that do not know what is the correct Datasheet to be followed.


Thanks Ben
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 4:57 pm     Reply with quote

lucasromeiro wrote:
Hello Ben, once again thanks for the support ..
Now I downloaded this file:
Microchip Application Libraries 04-28 v2010-Installer.exe

what was meant?

As for the PIC18 (18F4550) was deselected the option to display graphics on the table ..
it would be possible to use
I understand your advice and explanations, do that ...

Should I use something, because the lcd works at 3.3v ... problem?


Unless you use some form of voltage translation from a buffer (like a 74125 or some such), working your PIC at 3.3V makes hooking the 2 a lot easier.

Quote:

However I have one question, you told me to look at this datasheet.:
http://www.crystalfontz.com/controllers/SSD2119.pdf
But the problem is that I bought this LCD:
http://cgi.ebay.com/3-5-TFT-LCD-Module-Display-Touch-Panel-PCB-adapter-/200414904304?cmd=ViewItem&pt=AU_CashRegisterAccessories&hash=item2ea9a8bff0

and the seller said that this is simply modullo LCDhttp: / / www.crystalfontz.com/product/CFAF320240F-T-TS.html
But with PCBs.

Got it?


And again, the information from the ebay sale is right in that .RAR file. You need to download that and see what in it.

Ultimately, the thing you bought has a nice breakout board with power and even an SD card add on for convenience.

Hooking it to a PIC will be nice and easy. From there, you have to realize you're talking to the SSD2119 LCD controller. So where you get the datasheet for that doesn't matter as long as it's the datasheet for the SSD2119.

Quote:

In that case I would follow what Datasheet?

From a look at the announcement of the product (Modulo EBAY), he offers this information: http://www.egochina.net.cn/e-shop/ebay/TFT/035PCB/035PCB.rar
Some information that do not know what is the correct Datasheet to be followed.


Any original SSD2119 datasheet will work fine to explain how you want to talk to the LCD (Parallel, SPI, etc) and what you need to tell it (commands, data... as shown in the SSD2119 datasheet)

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
lucasromeiro



Joined: 27 Mar 2010
Posts: 167

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 5:29 pm     Reply with quote

Hello Ben,
What I said I understood, thanks ..
So it was not clear to me the question whether it is possible to use the PIC 18F4550. because the link in the microchip that passed me says do not have online library for PIC18.

and to question his work with 3.3v. not understood what I said. The translation was bad. I could use a voltage divider with two resistors? tennho no experience with 3.3v.
As I understand it, told me to put the pic to work with 3.3v. correct?

Thanks
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 6:00 pm     Reply with quote

lucasromeiro wrote:
Hello Ben,
What I said I understood, thanks ..
So it was not clear to me the question whether it is possible to use the PIC 18F4550. because the link in the microchip that passed me says do not have online library for PIC18.


Well, it doesn't matter from the example standpoint.

You are looking at how MCHP writes it's low level driver to a graphics display for other types of controllers.

Their examples tend to be big because they are fitting the LCD into a bigger picture of being a solution rather than just "get it working for now".

But it's easy to take what they have and copy it to your own project.

Same with CCS's drivers. They are meant to link up to a larger library that draws stuff for you like boxes and circles and buttons.

Start small -- just get the driver to show "hello world" on the LCD.

Quote:

and to question his work with 3.3v. not understood what I said. The translation was bad. I could use a voltage divider with two resistors? tennho no experience with 3.3v.
As I understand it, told me to put the pic to work with 3.3v. correct?


No. A divider is not a power supply.

It looks like the LCD you bought might have a 3.3V supply onboard already that might be able to shed a little extra power for the PIC. You can always check --- OR, just go out and get a 3.3V regulator or use a PIC demo board that's operating at 3.3V.

Most PIC's will run at 3.3V - but ALWAYS CHECK THE DATASHEET to see if there are any special circumstances or limitations to that operating voltage.
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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