Go Down

Topic: Fast library for Due and low cost HX8357B/C and ILI9481 480 x 320 displays (Read 13202 times) previous topic - next topic

bodmer

The Mega library variants does not support the 8 bit display, it has been writen specifically for the 16 bit display. I think David's kbv library will drive the 8 bit display and work with an UNO.

The Due version of the library does support the 8 bit display, it is the intent to also add the capability to read back the pixels from the display so I can create good screen shots for a user manual.
Formerly Rowboteer (now a broken user profile!)

Snout

There are two libraries.    One for Mega and one for Due.

You would need to do a lot of changes for a Uno version.   For a start,   you would have to scrap all the 16-bit bus code.

Try your screen with a Mega2560.    I suspect you have a hardware problem with your "blue only".
Since mine is an 8-bit display, and I don't have a Due, for simplicity's sake I've ordered a Mega screen linked from Rowboteer's graphics library page, figuring that will be the best chance of getting the dang thing to work. I'll use the touchscreen part from a bad Sainsmart display I scrapped, where touch worked okay.

Also when contacting the mcufriend seller on ebay about the 'blue screen of death' I have, they said they'll send another. I'm not complaining there, heh, I'm okay with monochrome for my simple usage scenario.

Oh, I asked Rowboteer in his library forum, but may as well ask here, too: These displays (in particular 9481 but kind of in general too), can they be used SPI/I2C-like with the WR/RD/RS pins to transfer data serially, without using the 8 (or 16) bit bus? Very much slower I suspect, but also very much easier to move the display from one platform to another. So it may be a theorhetical-maybe, but still of interest to me. My google-fu has failed me in finding an answer.

bodmer

@Snout

OK the 16 bit displays work very well and are quite quick to update. With a Mega or Due these displays make quite a neat assembly.

Most TFT controllers operate with various parallel/serial interface modes but usually the PCB they are mounted on only maps out one interface type.

PS. I am Rowboteer, but my forum account got broken and is no longer accessible due to a known bug in the forum software.
Formerly Rowboteer (now a broken user profile!)

pe1oxp

Thanks for write this nice library!
I had some problems with some spikes, but after replacing the TFT_HX8357_Due.h and changing my code to the ILI9488 chip it works fine.

I only have some problems with displaying numbers. For Floats I can use the drawFloat function but what can I use for numbers of the Double format?
When using the drawFloat function I get strange results. Probably because the Due uses 8 bytes for a Double and 4 bytes for a Float?
Any solution?

bodmer

@peloxp

I tried the TFT_String_Align example with the test variable being a Double type and I have not been able to see a problem however the function does have some constraints like only handling 7 decimal places.

Can you post an example code segment that shows the problem you are having so I can try it?

If all else fails there are other approaches to printing a double type.


Formerly Rowboteer (now a broken user profile!)

pe1oxp

Thanks for your reply!

I found the problem. It Wasn't in the library but in my own code.
I'm using it to read out the data of a Trimble Thunderbolt GPS with the library found at https://github.com/mgi2212/Thunderbolt

I was forgotten to multiply the latitude with RAD_TO_DEG

Serial.print(s.latitude * RAD_TO_DEG,5); vs tft.drawFloat(s.latitude, 5, 360, 287, 4);

Now it works.


bodmer

OK, great.  Hopefully I will get around to adding the ILI9488 as an option soon, that will save the hassle of pasting in Five33's code.
Formerly Rowboteer (now a broken user profile!)

vagos21

Hello,
i've been trying my way through the TFTs for a couple of weeks now, and i have a question,
will this one work with your library? i so much want to move my project to the mighty DUE! it depends a lot on speed that's why :)
in the page it says it's 8-16bit...

http://www.ebay.com/itm/351686444550?_trksid=p2057872.m2749.l2649&var=620655336676&ssPageName=STRK%3AMEBIDX%3AIT

thank you for your time!

bodmer

@vagos21
It should be compatible with the library, it looks like it has a 16 bit bus connected. The high value 10K series resistors I see on the back of the display are a concern as they might not pass through the high speed logic signals that the Due library generates.

I would try it with the Mega library on a Mega board first as that operates the control lines more slowly.  Even that might be too fast.

The other library to try is UTFT as that it toggles the control/data lines to the display more slowly.

Post back how you get on.
Formerly Rowboteer (now a broken user profile!)

vagos21

thanks for being willing to help bodmer, the problem with this one is, i've tried tons of different UTFT versions, some of them wouldn't even compele, and even the one that the seller sent me doesn't seem to make it work... through the whole UTFT drivers list, the only one that showed traces of life was the ILI9325C, but it was just making the screen flash black/white through the tests on both MEGA and DUE. dgolda library didn't work, screen is stubborn just sitting there being white.
would the pinout diagram help see what's going on in there? could it be different from the rest?
Just tried your library on mega, nothing happens... tried graphicstest_320x480 both with ILI9481 or HX8357B, but i don't get anything...
i'm so desparate with this thing!

any ideas are all welcome to try, i also have some soldering experience too if it needs to be done

bodmer

@vagos21

I had another look at the eBay link you provided.  The vendor has included images of 3 slightly different display boards! That does not bode well...

This is a "suck it and see" approach but try the libraries attached and run the graphicstest_R61581 example. They are for a different controller and 3.6" 400 x 240 pixel 16 bit display, but once we get something displayed we can start to figure out what is happening.
Formerly Rowboteer (now a broken user profile!)

vagos21

Hello again, testing that library too made no difference, here is the lcd i eventually got, if it makes any sense:

front
back

and here are the 3 links i got from the seller as drivers/schematics:
http://osoyoo.com/driver/3.5LCD_ili9481.rar
http://osoyoo.com/driver/3.5LCD_ili9488.rar
http://www.mcufriend.com/down/pdf/3.52560sch.pdf

i couln't get the 9488 to compile, a bunch of "not declared" errors

david_prentice

I never cease to be amazed!

If the item in your hand does not match the photos in your Ebay link,   say so.
Likewise,  if the schematic in your link does not match the pcb.

I am especially concerned about R1, R2, RP7 and their routing to digital #43 pin and 3V3.
But mostly because you don't have an R2 or RP7 on your pcb photo.

I suspect that you might have an 8-bit interface rather than 16-bit.
Follow the pcb traces to digital#22 - 29.    Do you actually have traces from digital #30-37 ?

If we knew your schematic,   I probably already support you.   I suggest you get tracing what you actually have in your hands.    If you do not know how to use a DMM to follow the traces,   just buy a new shield.

David.

bodmer

@vagos21

I suggest you contact the seller and ask for a refund. I have not had any problems getting refunds from Chinese vendors. If you bought with a Mega or Due clone then just ask for a refund for the display.

The schematic does not tie up with what you have and the libraries provided are not much help and are in a bit of a hacked state.

Like David, I think you have an 8 bit display but it also like the control pins do not map to the ones I use in my libraries so that is probably why you just get the white screen. I find that any 16 bit library seems to display something when the control and data pins are mapped correctly even though the images do not look correct.

I don't have any recommendation for a touch screen display to use with a Due. David may be able to suggest one.
Formerly Rowboteer (now a broken user profile!)

david_prentice

Any screen with a Touch Screen Controller chip should work with the Due.   e.g. XPT2046,  ADS7843, ...
There are several libraries available.

A basic Resistive Touch Panel (as on cheap 2.4" Mcufriend shields) is a bit tough for the Due to drive.    The X tends to be about 300R.   That is 11mA from the Due's wimpy GPIO pins.

The Mega shields tend to come with a XPT2046.    The "good value" ILI9481/HX8537  shields do not have a Touch panel.

The 2.4" ILI9341 red SPI "Touch" modules do not always have the XPT2046 mounted.

See if you can guess the schematic and post it here.    i.e. which digital #pins connect to which resistor pack.
Otherwise,  just ask for your money back.

David.

Go Up