View previous topic :: View next topic |
Author |
Message |
huynhhai
Joined: 04 Apr 2015 Posts: 39
|
Touch Screen LCD interface with dsPIC30F4013 |
Posted: Sun Aug 16, 2015 3:24 am |
|
|
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: 19510
|
|
Posted: Mon Aug 17, 2015 2:46 am |
|
|
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
|
|
Posted: Mon Aug 17, 2015 3:29 am |
|
|
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: 19510
|
|
Posted: Mon Aug 17, 2015 7:40 am |
|
|
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
|
|
Posted: Mon Aug 17, 2015 11:30 pm |
|
|
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: 19510
|
|
Posted: Tue Aug 18, 2015 2:56 am |
|
|
A lot easier.
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.
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
|
|
Posted: Sun Aug 23, 2015 11:59 am |
|
|
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,
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19510
|
|
Posted: Sun Aug 23, 2015 1:53 pm |
|
|
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
|
|
Posted: Thu Aug 27, 2015 11:00 am |
|
|
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, |
|
|
|