ST7735 Questions

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Sacman
 
Posts: 1
Joined: Wed Feb 22, 2012 2:57 am

ST7735 Questions

Post by Sacman »

I am currently using a 4D systems 1.8" display that uses the same controller but uses what they call a graphics driver to handle all of the function calls. It basically acts like using one of these displays with a uController dedicated to it and using a second controller to send serial commands.

I want to transition to a cheaper alternative like the raw display sold here. I don't need the functionality of the SD card and will be using a 3.3v system anyway so I don't need the breakout. However, I want to buy one of the breakouts to get everything working. I just have a couple of questions.

My setup uses a single image that is drawn as a 'background' to the display. This provides a better look than simply filling with a color. There is some fixed text drawn over the image that is static once loaded but may change on load. The image also has some black 'cutouts' where I print updated data. This data changes on a regular basis.

So my first question: On the 4D display, I have the option of writing text with a transparent or opaque background. Looking at the library for the ST7735, it appears that the text is drawn pixel by pixel so this handles the transparent mode. This will handle all of the text drawn over the image. The opaque method overwrites the existing text string. This is faked in that it draws a filled rectangle the exact size of the new text and then draws the new text. The ST7735 library does not provde this functionality inherently but it seems very easy to implement by simply doing exactly what the 4D does but in two steps. Are there any obvious issues that anyone can see here?

The second question is a little more involved. First, I can't look at the sample draw image sketch at work but looking at the library indicates that it must use the draw pixel function to actually draw the image. My problem is that in the tutorial, it says the image must be stored as a 24bit BMP on the SD card. On the 4D display, the image is stored in a 16bit RAW format. I simply point to the start address and it draws the approriate number of pixels for me based on a few parameters like x,y,H,W. There is an option for drawing pixel by pixel but they have dumbed this down for images stored to the SD. The pixel method is more approriate for images stored on EEPROM. This is exactly what I want to do. I only have a single image which even at 24bit will fit on a single 64K EEPROM chip with a little left over (possibly for additional fonts). Since the image is read off the SD card as a BMP, I assume that the conversion is handled in the sketch. I am not sure how to translate this to storing the image on the EEPROM. I also am not sure I understand why the image is stored at 24BIT which implies an 888 RGB but the color mode as set in the library is 16bit 565 RGB. Maybe the sketch will make this clear but I suspect that I am still going to be confused.

Thanks in advance on this my first post,

Wade

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: ST7735 Questions

Post by adafruit »

1. you can draw a rectangle behind text for now. we may add background color ability to the text in the future but there is no ETA
2. Right now, the only example code is included. it works drawing a 24 raw bit BMP from a microSD card. We dont have an example of drawing from an EEPROM but it should be possible with some work.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”