1.6" LCD SSD1283A colour display - which library?

Jean-marc,

I just test SSD1283A with V1.0.1 ssd1283A library and drawRGBBitmap(), it's fine, like that, I don't see any difference beetwin setwindowsAdress/pushColor and drawRGBBitmap option.

Congratulation. :smiley:

Mike

@Mike and Jean-Marc,

Teensy is a pain. It has hacked various libraries to run on Teensy boards. And then added these hacked libraries to its System Library folder.

Meanwhile, Adafruit and other authors add Teensy support and upgrade their libraries in the normal course of events.

The punter finds that you are forced to use the obsolete Teensy-hack even though the Library Manager has upgraded your User Libraries.

In other words. Always inspect the library version numbers and locations when you build a sketch e.g. with Verbose Compile.

It would be more appropriate for PJRC to offer Pull Requests to the appropriate Library Authors. Then you just have one Library that is kept up to date.

David.

@Yes David,

a few days ago at the beginning of my tests, you warned me about the libraries managed by teensy, so I took the opportunity to remove from the Arduino IDE (hardware/avr/teensy/libraries) all Adafruit libraries, and to install the latest versions in standard arduino/libraries for an up-to-date compilation.

Mike

My Teensy 3.2 has arrived. It works with my libraries.

Canvas draw to screen through drawRGBBitmap() with library SSD1283A takes 16ms.

Canvas draw to screen through drawRGBBitmap() with library SSD1283A_SPITFT takes 27ms.

Jean-Marc

@Jean-Marc,

My apologies. I can't get RL bit in reg(0x0001) to work. Which means LANDSCAPE and PORTRAIT_REV are wrong.
The datasheet says:

Note 2 : Register bits REV, CAD, BGR, TB, RL, CM will override the corresponding hardware pins settings.

REV, BGR, TB work fine. RL seems to be ignored whatever you do.
Likewise, the Porch settings in reg(0x0016) seem to be ignored.

This is driving me crazy. I am sure that there will be a magic bullet somewhere.
Regs 0x2A-0x2F "Test commands" might hold the key. Of course there is no documentation.

I would do some detective work if this screen was readable.

Anyway, I can always perform RL is software but it annoys me.

You can display pushColors() in any direction you want. ID bits in reg(0x0003)
This is the same as the ILI9325 that you are already familiar with.

David.

p.s. the transreflective works really well

@David

Page 20:

RL: Selects the output shift direction of the source driver. When RL = “1”, S0 shifts to S395 and
color is assigned from S0. When RL = “0”, S395 shifts to S0 and color is assigned from S395.
Set RL bit and BGR bit when changing the dot order of R, G and B. RL setting will be ignored when display
with RAM (Dmode[1:0] = 00).

You can display pushColors() in any direction you want.

Yes, but in rotation 1 the leftmost column is cut and placed rightmost. For rotation 2 likewise.
I am not sure if this occurs always. I didn't notice it every time, and got confused.

Did you try my src.ino example?

This is the same as the ILI9325 that you are already familiar with.

I am not really familiar with most of the displays I added to GxTFT, as I often just copied and modified existing driver code. And I never tried pushColors with bitmap data for GxTFT, so I wouldn't have noticed. But I will dig out an early post of mine concerning most likely the same or a similar issue when I tried to create a BufferedWindow template class for 3 famous TFT libraries.

Maybe this one:
Displays / TFT_HX8357_Due pushColor after setRotation issue?

Ok, I should have checked/read first; this wasn't an issue, but an error of mine.

That's why I like the idea of using canvas:
Displays / Buffered_GFX: template class for Arduino Due to reduce flicker

Jean-Marc

RL setting will be ignored when display
with RAM (Dmode[1:0] = 00).

Yes, I had seen that. However, SSD1289, SSD1297 have the same caveat. And RL works fine on those controllers.

No, I have not tried src.ino yet.
I have only tried GxTFT_graphicstest.ino with my_1.6_transflective_SSD1283A_Uno.h and my_2.8_blue_ili9341_UNO.h

All the other examples are too big for a Uno. They don't build on M0 or STM32.
I can dig out an ESP32. Plenty of SRAM, speed etc. No way to use JTAG or SWD.
I could dig out Teensy3.2. No way to use SWD.

There is nothing unusual with a datasheet that has "feature(s)"
It is often worth trying an undocumented bit. Or just to check whether the chip does actually do what the datasheet says.

David.

@David

with Version 1.0.2 of library SSD1283A the issue with rotation 1 and 2 can also be shown on UNO using:

It uses (part of) a bitmap image of the canvas, rendered through optimized drawRGBBitmap() for PROGMEM bitmaps (pushing colors to one window set with setWindowAddress).

Jean-Marc

What am I supposed to see?

I put all the local files into sketch tabs.
It builds on Teens3.2 or Uno.

The loop() code renders fine in all 4 rotations.

The drawRGBBitmap() code is one pixel wrong in 2 rotations.

If you want to test windows, canvas, ... it is wise to use better test data. e.g. coloured rectangles.

But most importantly, don't mix Adafruit_GFX methods with the revolting LCDWIKI_gui methods.
It seems sensible to inherit from Adafruit_GFX and hence make programs that are understood by the civilised world.

If you use Adafruit_SPITFT class, it will use an optimised drawRGBBitmap() if it can.
Otherwise it falls back on the base Adafruit_GFX drawRGBBitmap() which plots one pixel at a time.

LCDWIKI_xxx is broken in several ways apart from its appalling method calls.

David.

You get the same effect if you use the native LCDWIKI_gui method:

    //mylcd.drawRGBBitmap(0, 0, test_canvas, 130, h);
    int w = 130;
    uint16_t pixbuf[w];
    for (int row = 0; row < h; row++) {
        memcpy_P(pixbuf, test_canvas + row * w, w * 2); //works in bytes
        mylcd.Draw_Bit_Map(0, row, w, 1, pixbuf, 1); //buf must be in SRAM
    }

Incidentally, I have concluded that the SSD1283A has an "RL feature". As documented, RL does not work with DMode=0
I suspect that the "feature" was fixed in later chips. But the caveat was copy-pasted to the later SSD1289, SSD1297 datasheets.

It would also account for why these SSD1283A screens have appeared on the Ebay market.

David.

David

The drawRGBBitmap() code is one pixel wrong in 2 rotations.

That is the issue I have. I think it is caused by the controller. I found no workaround except avoiding these 2 rotations with general pushColor kind of use.

Yes, but in rotation 1 the leftmost column is cut and placed rightmost. For rotation 2 likewise.

Jean-Marc

Added:

I looked at the pixels through a magnifying glass, and saw that that rightmost column is shifted 1 pixel in height. Maybe I just need to set a different starting address in setWindowAddress for these rotations. I will try later. Maybe some post-increment but pre-decrement effect.

Since the RL bit is "stuck", you are actually displaying SS=131 -> SS=2.
setAddrWindow() uses start and end e.g. 2,131 not 2,132

David.

@David

With the changed entry mode I also need to change the starting address to the new starting corner.
This is a topological consideration. I tend to forget that for topological issues a bit of thinking is better than just experimenting.

Thank you.

Jean-Marc

Version 1.0.3 of library SSD1283A is available.

  • fixed rotation (rendering canvas ok for all 4 rotations)

For installing this library use the download as zip-file method and install using Library Manager method Add .ZIP Library... .

Jean-Marc

Hello Jean-Marc,

Old thread, I know.
I've got the SSD1283A library working on my Mega and also nano-clone, using the display_string and graphicstest examples.
In the header of this graphicstest example is something mentioned about fonts from the HX8357 library, but I can't see how to get a different font working with the SSD1283A library.
The LCDWIKI library also has examples with (chinese) fonts in them.

I do not have enough coding skills to embed fonts into the SSD1283A library, can you explain how to do this?
Thanks in advance!

@cabriobob,

This library supports SSD1283A to use with Adafruit_GFX and/or LCDWIKI_GUI

Hi,

I had already forgotten the details of this library. But as it uses Adafruit_GFX, you can use all fonts available with Adafruit_GFX with it, and Adafruit_GFX even has a font creation tool (I don't know).

If you want to add fonts compatible to Adafruit_GFX, you add the font files to the Fonts directory of Adafruit_GFX, or to a Fonts directory added to the src directory of the SSD1283A library.

And you could use U8g2_for_Adafruit_GFX with it.

Please forget the header of the example. I had used a copy of an example from Bodmer, which is a copy of an Adafruit_GFX example, which obliged me to keep this header note.

I like to play with some special TFTs, but I am neither an expert for TFTs, nor for fonts usage. But I am learning from day to day.

Jean-Marc

Jean-marc, thanks!

I'll have a go with it.

If someone has some interest, links to a working SSD1283A:

cabriobob:
Jean-marc, thanks!

I'll have a go with it.

Managed to incorporate a custom font, and using a custom logo (bitmap) with this library, based on the "draw through_canvas" and the ESP32.

The custom font was made by converting the TTF to a .BDF file using "Fony",
and convert that to a .c file using "bdfconv"

This really makes a difference compared to using a Nano and no canvas drawing, I'm very happy :slight_smile:

See attachment for complete code.

see my project "OBD2 display in ashtray" in forum:
...150-33/obd2-display-ashtray-location...

esp32_speed_font_test.zip (22.7 KB)

found the driver IC datasheet here, from Topway Display