View previous topic :: View next topic |
Author |
Message |
Zek_De
Joined: 13 Aug 2016 Posts: 100
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Wed Sep 05, 2018 4:16 am |
|
|
You can't.
That is a parallel interface LCD, not an SPI LCD, which the defines you are showing are for. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Wed Sep 05, 2018 5:18 am |
|
|
I got curious, waiting for the coffee to be made....so...
I downloaded the datasheet and it actually has an SPI interface! Pins 35-38 are the '3/4 wire' option. It's interesting that the module also has a memory card slot...
Provided it's configured correctly it should be possible to use the SPI interface. That would save a LOT of I/O pins !!
However it is a 3 volt device so it'd be best to use a 3 volt PIC to avoid having any 'logic level conversion' problems.
There are drivers written for other micros in other languages so they could be used as a 'template'. I didn't look very hard or long to see if there's an SPI (aka serial ) driver though. You'll need to read the datasheet to get the correct SPI mode and start small. Cut code to read/write a few registers, confirm that works THEN try simple text based display THEN graphics...
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Wed Sep 05, 2018 5:41 am |
|
|
Beware though that if it does have SPI, graphics could become quite slow by the time you have read a byte changed the bits required, and written this back for hundreds of bytes...
Looking at it the marked SPI lines connect across directly to the SD card. I assumed these lines are actually the SD card interface not the display. They are labelled as SD_CS SD_DIN, SD_DO, and SD_CLK (note the SD...). The chipset supports an SPI interface, but requires jumpering to select this. I can't see any sign on the board that this option is actually selectable. I think it is wired as parallel only.
Last edited by Ttelmah on Wed Sep 05, 2018 6:44 am; edited 1 time in total |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Wed Sep 05, 2018 6:43 am |
|
|
It's kind of a shame to not bring out the SPI option..though there is a pin labelled f_cs, on the PCB but says N/C in the pinout chart.
sigh..could have saved a lot of I/O pins.
Really mfrs should supply ALL the data about their product
It'd be interesting to compare the parallel vs serial speeds since parallel requires 2 1/2 ports.
Jay |
|
|
MikeW
Joined: 15 Sep 2003 Posts: 184 Location: Warrington UK
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Wed Sep 05, 2018 7:02 am |
|
|
With the SPI option available, makes more sense...
That potentially could be connected to the driver involved.
I must admit it is fabulous value. Think what a display like that would have cost a few years ago.... |
|
|
MikeW
Joined: 15 Sep 2003 Posts: 184 Location: Warrington UK
|
|
|
Zek_De
Joined: 13 Aug 2016 Posts: 100
|
|
Posted: Wed Sep 05, 2018 12:17 pm |
|
|
Guys ,Thank all of you,I will examine,but there is a CS pin on it to select LCD,in this case I suppose ,SPI connect paralell with LCD and SD Card,right? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Wed Sep 05, 2018 12:41 pm |
|
|
Not necessarily... the SPI SD card appears to be an 'addon' to the module... the touchpad also would be an 'addon' as it's not part of the LCD device itself.
The designer of the module may not have brought out the SPI pins for the LCD module, though maybe, just maybe the touchpad SPI pins are the same ?
The only one who KNOWS will be the mfr. try googling the 'part number' on the PCB, that may point to who made it and a proper datasheet. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Wed Sep 05, 2018 1:02 pm |
|
|
Some of the SPI signals are shared with the existing interface (just two extra
connections needed). The problem is there are four configuration pins that
have to have different logic levels on them to selet the interface to use. There
does not seem to be any option to jumper these to select the interface. So the
original module is parallel only. It is silly. Would have been very easy to just
have board pads that could be cut to allow the levels to be selected.... |
|
|
Zek_De
Joined: 13 Aug 2016 Posts: 100
|
|
Posted: Thu Sep 06, 2018 9:01 am |
|
|
Ok guys, also I will buy new one. I couldn't find any information about it. What I did it didn't work. |
|
|
Zek_De
Joined: 13 Aug 2016 Posts: 100
|
|
Posted: Thu Sep 06, 2018 9:40 am |
|
|
Guys, how about these? They have different integrated circuit, I am sorry I have less information about LCDs, one has XPT2046, other one has I suppose different integrated circuit. There is an information about Spfd5408 ,what is it excatly, I examined datasheet, but very long maybe you guys mention about briefly. If I control these LCDs, I will follow same way or different solution. I am little confused.
--> https://tr.aliexpress.com/item/2-4-Inch-TFT-LCD-Shield-ILI9341-240x320-Touch-Board-65K-RGB-Color-Display-Module-With/32823261914.html?spm=a2g0s.13010208.99999999.259.777d3c00VXxLA3
-->https://tr.aliexpress.com/item/240x320-2-4-SPI-TFT-LCD-Touch-Panel-Serial-Port-Module-With-PBC-ILI9341-3-3V/32832952750.html?spm=a2g10.search0104.3.30.6abb15246oUtEn&ws_ab_test=searchweb0_0,searchweb201602_3_10065_10068_5015215_10059_5015315_10696_100031_10084_10083_10103_451_452_10618_10307_5015915_5016015-normal#cfs,searchweb201603_54,ppcSwitch_5&algo_expid=ba1a2b9b-189a-48ef-a4e6-60a9f045b301-4&algo_pvid=ba1a2b9b-189a-48ef-a4e6-60a9f045b301&transAbTest=ae803_2&priceBeautifyAB=0 |
|
|
Zek_De
Joined: 13 Aug 2016 Posts: 100
|
|
Posted: Thu Sep 06, 2018 9:55 am |
|
|
For example, I have two LCDs and one has xyz integrated circuit (to touch) and other one abc (to touch), in this case, can I control them with same way, I mean this integrated circuits always are similar, special for touch panel. Am I right? and also for this LCD --> https://tr.aliexpress.com/item/240x320-2-4-SPI-TFT-LCD-Touch-Panel-Serial-Port-Module-With-PBC-ILI9341-3-3V/32832952750.html?spm=a2g10.search0104.3.30.6abb15246oUtEn&ws_ab_test=searchweb0_0,searchweb201602_3_10065_10068_5015215_10059_5015315_10696_100031_10084_10083_10103_451_452_10618_10307_5015915_5016015-normal#cfs,searchweb201603_54,ppcSwitch_5&algo_expid=ba1a2b9b-189a-48ef-a4e6-60a9f045b301-4&algo_pvid=ba1a2b9b-189a-48ef-a4e6-60a9f045b301&transAbTest=ae803_2&priceBeautifyAB=0
I couldn't find any integrated circuit for SD Card, is it embedded under the screen or it is not necessary to drive SD Card ? It will be my first experience with SD Card and LCD this why I am sorry guys, I asked a lot of question but it will be a lot of benefit for me. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Fri Sep 07, 2018 5:27 am |
|
|
Your last 'link', if you scroll down there's a good picture of the bottom that shows the SD interface is J4 located on the opposite end from teh main connector. So that module has 3 SPI interfaces, LCD, TPAD, SD card. So you'd need a PIC with 3 hardware SPI to get best performance. One alternate would be to have LCD and SD using HW SPI and connect TPAD to a SW SPI. Still a lot of pins to connect !
It would be nice to find a module with ALL the I/O pins on ONE connector. |
|
|
|