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

Touch Screen LCD interface with dsPIC30F4013

 
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

Touch Screen LCD interface with dsPIC30F4013
PostPosted: Sun Aug 16, 2015 3:24 am     Reply with quote

Hi Every one,

I had one LCD touch screen 4.3inch 480x272 Touch LCD (A) of Waveshare manufacturer. I try to write code to interface LCD to display one red point on the center LCD, Please send me sample code if any one used to work with this LCD, Every one can refer the LCD as link below
http://www.wvshare.com/product/4.3inch-480x272-Touch-LCD-B.htm

Thanks & with regards,
huynhhai
Ttelmah



Joined: 11 Mar 2010
Posts: 19337

View user's profile Send private message

PostPosted: Mon Aug 17, 2015 2:46 am     Reply with quote

You are not even close to a starting point.....

Key is the line in the product description, telling you what this unit is for:
"MCU with LCD controller and ADC"

Note _with LCD controller_.

This unit needs a _separate_ graphic LCD controller. The PIC won't control this directly, it needs a hardware board to generate the LCD timings.
huynhhai



Joined: 04 Apr 2015
Posts: 39

View user's profile Send private message

PostPosted: Mon Aug 17, 2015 3:29 am     Reply with quote

Dear Ttelmah,

I use three 74HC595 to control Red, Blue, Green data, LCD pin remain i control direct by pin of dsPIC30F4013. I will interface this LCD with two step
Step1: display text or any image to LCD
Step2: Touch one button on the LCD to change information display of LCD (using touch function on LCD)

Thanks,
Ttelmah



Joined: 11 Mar 2010
Posts: 19337

View user's profile Send private message

PostPosted: Mon Aug 17, 2015 7:40 am     Reply with quote

You are fundamentally missing the point.

You can't feed RGB data from the PIC. This data needs to change for every single clock cycle across the screen, and the controller feeding this needs to generate the horizontal and vertical clocks, at a fast enough rate to prevent flicker on the display.

These screens are rather akin to an old analog TV display, requiring the data clocked out for every dot. It is (vaguely) possible to generate data into such a display (look at some of the old projects for putting PIC data onto a VGA), but these will generally rely on hardware to actually generate the clocks. To try to control everything, is unlikely to succeed, and if it did, leave you not able to do anything else. You _need_ a graphic LCD controller, otherwise your PIC is not going to be able to do anything else except generate the clocks.

This is why the reference for the display wants a microprocessor _with LCD controller_. Three latches, are not an LCD controller.....
huynhhai



Joined: 04 Apr 2015
Posts: 39

View user's profile Send private message

PostPosted: Mon Aug 17, 2015 11:30 pm     Reply with quote

Dear Ttelmah,

This LCD control look like LCD TV?, i though to display it look like matrix RGB led, i need order one driver to control this LCD, how about when i use Graphic LCD12864 with spec:
Type: 12864ZB
Controller: ST7920
Display color: blue white

Do i need to driver for it?
Regards,
Ttelmah



Joined: 11 Mar 2010
Posts: 19337

View user's profile Send private message

PostPosted: Tue Aug 18, 2015 2:56 am     Reply with quote

A lot easier. Smile

Every LCD, above a very few dozen pixels, is a 'multiplexed' device, with rows and columns being clocked and the data output at each point.
The original unit was designed to be driven by what is effectively a PC display controller outputting VGA type signals, but with the data as digital instead of analog. It's not a 'static' matrix, where you can just set a value, and it stays there (this display has no memory included), it needs a continuous picture being fed to it line by line from an external memory.
It's this feeding that the LCD controller handles.
On the new unit, the ST7920, does the work of generating the actual picture for you, and handling the memory. Smile

Look in the code library here:

<https://www.ccsinfo.com/forum/viewtopic.php?p=169706>

Driver for this controller (the original example has a few problems, but these are fixed further down the thread).
huynhhai



Joined: 04 Apr 2015
Posts: 39

View user's profile Send private message

PostPosted: Sun Aug 23, 2015 11:59 am     Reply with quote

Dear Ttelmah,

Thanks for your guiding,
I had one more question. How do I do to display image to touch screen 4.3inch 480x272 Touch LCD (B) when I had one LCD driver as manufacturing require ? Because I want to display information on this LCD, no using Analog (AV signal), only use digital.

Thanks,
Confused
Ttelmah



Joined: 11 Mar 2010
Posts: 19337

View user's profile Send private message

PostPosted: Sun Aug 23, 2015 1:53 pm     Reply with quote

You need to add a compatible display controller.

Quote directly from the Waveshare manual:

"When applying HX8257-A, a MCU with LCD controller is required, since the LCD controller is not included in this LCD."

The Microchip demo board driving a similar display, uses an SSD1926:

<http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=AC164127-5>

They have demo code for this, that would translate fairly easily.
huynhhai



Joined: 04 Apr 2015
Posts: 39

View user's profile Send private message

PostPosted: Thu Aug 27, 2015 11:00 am     Reply with quote

Dear Ttelmah,

Thanks you so much your help,
I will try to connect & display this LCD, if i have any for more in info, pls show me how to solve it,

Regards,
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