LCD SDRAM "VRAM" Requirements

Recently my dad got me a SainSmart LCD, shown here.

Ultimately, my question is:
Taking into account that the color depth is most likely 18 bit (It lists 262K color) and the resolution is 240x320, is there a way to keep an entire frame stored in SRAM at the full color depth? Or is cutting down on resolution and/or depth required to effectively use SRAM as "VRAM", or do I need to get something higher up than a Due (e.g. an Edison.)

Yes, your TFT display has actually got 1382400 bits of RAM.

You could use it to store 172kB of data if you want to. e.g. a bank account, an MP3 song, ...
It would just look like coloured snow.

You have not provided a link to your display. Most Sainsmart (and other) Adapter shields do not allow you read the display. So although you could store data, you will not be able to get it out again!

I think that you are more interested in keeping a copy of the picture data in your Arduino SRAM before sending it to a write-only display.

Clearly, most Arduinos have only got a small amount of SRAM. Even a Due.
With care, you can keep a tiny (30×30) section in SRAM, manipulate it, animate it, ...
You might get something that looks quite smart, but you will never get the whole 240x320 unless you use some external RAM memory.

Of course, with a $5 mcufriend shield and a Uno, you can read, write, manipulate, ... the TFT's internal RAM.

David.

Oops, sorry! Copy/pasted it and forgot to link you. :confused:
Here is the display: SainSmart 2.8" TFT LCD

I am impressed by the ingeniity of Sainsmart marketing.

They do not let you see any documentation and even animate the photos so that you cannot see what chips are on the pcb.

I would guess that you MUST provide 3.3V logic. I can not see any resistors or level shifters. So even if you buy the proper Adapter shield, you will not be able to read the controller.

Of course, a 3.3V Due, Teensy can connect directly to your display, it will also be able to use the RD pin.

Clever, these Sainsmart kiddies. When you have damaged the display with 5V, they can sell you a new display and the proper Adapter.

David.

david_prentice:
I am impressed by the ingeniity of Sainsmart marketing.

They do not let you see any documentation and even animate the photos so that you cannot see what chips are on the pcb.

I would guess that you MUST provide 3.3V logic. I can not see any resistors or level shifters. So even if you buy the proper Adapter shield, you will not be able to read the controller.

Of course, a 3.3V Due, Teensy can connect directly to your display, it will also be able to use the RD pin.

Clever, these Sainsmart kiddies. When you have damaged the display with 5V, they can sell you a new display and the proper Adapter.

David.

Haha.
So it's only strictly compatible with Teensy, Due, RPi, etc. out of the box without an adapter.
And they hide the datasheet.
GG WP, Sainsmart.

SainSmart 2.8" TFT LCD Display is a LCD touch screen module. It has 40pins interface and SD card and Flash reader design. It is a powerful and mutilfunctional module for your project.The Screen include a controller ILI9325, it's a support 8/16bit data interface , easy to drive by many MCU like arduino families,STM32 ,AVR and 8051. It is designed with a touch controller in it . The touch IC is XPT2046 , and touch interface is included in the 40 pins breakout. It is the version of product only with touch screen and touch controller.

http://www.microcenter.com/product/442458/28_inch_TFT_LCD_240x320_for_Arduino_DUE-MEGA2560-R3_and_Raspberry_Pi

I do not have this display. Thankyou for your link. It contains a stationary photo of the pcb. It looks like one XPT2046, one LDO regulator, one SD receptacle, 5 resistors.

I would be very surprised if it is 5V tolerant. IMHO, it is very naughty to describe things as MEGA2560 compatible.

David.

Thank you for telling me the LCD name.
I'll take a look through the XPT's datasheet.
Also, someone told me that the board self-refreshes the LCD and has built-in VRAM sufficient to store 1 frame.
Is it true that I can't read off the VRAM at all?

Which Arduino do you want to use?

As we have explained, a 3.3V board does not need level translation and the RD pin is available.

I suggest that you buy the specific ColdTears adapter. e.g. Adapter shield for Due

The RD pin is not officially available but you can wire it to a spare GPIO pin.

Your initial question was about the memory. Yes, the controller has memory for the whole Frame. Note that the ILI9325 is crap for reading memory. A modern controller like ILI9341 is far better.

Why do you want the whole Frame in SRAM?

David.

My question is whether or not I'm able to access the frame memory of the actual screen.
If I can't, I'm aware I could just get some external memory and use it as SRAM via SPI.
And I know it can be used with the Due or other 3.3V boards directly, and that it needs a logic level converter for 5V boards.

You might know that. This does not mean that the Adapter Shield makers know it.

AFIK, none of the Adapters provide a RD pin. Probably because UTFT has no concept of reading memory.

You can hand-wire the LCD_RD pin to a GPIO pin (shifted to 3.3V).

The Due Adapter has no level shifting. So it is bi-directional if you can access LCD_RD.
The Mega adapters that just use resistors should be bidirectional.
The Mega Adapters with buffers have the wrong sort of level-shifter chips (I believe). So you can not read through them.

As far as I understand, you have a 16-bit ILI9325 display. You can connect all the pins up to the 3.3V Due and both Write and Read the TFT controller. The ILI9325 is slow to read because it does not auto-increment.

Whereas the MEGA2560 works fine as write-only via a level-shifting shield, it is not simple to read. You will have to try it for yourself with a "resistor type" Adapter.

Of course, you can write AND read with a Uno display shield. e.g. the 2.4" Mcufriend displays. Most have modern controllers now.

It is useful to read a display but you do not need to have the whole contents in SRAM to do any manipulation.

If you say what you want to do, it would be easier to give an accurate answer.

David.

david_prentice:
-snip-

All I want to be able to do is to be able to check the frame's memory and also be able to write to the screen using the normal functions.
Although if I can't read it, I guess just clearing the screen and drawing would suffice.
Thank you for all of the answers. I may try messing around with the RD pin and such if I get some time to play around with the display.