Andy's Workshop Forums

General Category => stm32plus C++ library => Topic started by: Isaya on March 01, 2015, 01:46:44 am

Title: Landscape problem with ssd1289
Post by: Isaya on March 01, 2015, 01:46:44 am
Hello, first thank you and congratulations for your library you made a very nice job.

I have a problem with the ssd1289 driver in landscape mode, I start with ads7843 example that I modified to work with ssd1289 (i use this "typedef SSD1289_Landscape_262K<LcdAccessMode> LcdPanel;" to set the panel in landscape and "typedef SSD1289_Portrait_262K<LcdAccessMode> LcdPanel;" to set in portrait .
In portrait mode all works perfectly but in landscape mode  everything is "rightside left". It's not a big problem for the box but the text is writing from right to left. I have not found how to solve this ...
I also have one other quick question, I have an SD card reader that uses SPI not SDIO there is there a way to use your library?

Sorry for my poor english, i'm french lol

Thrank's in advance.
Title: Re: Landscape problem with ssd1289
Post by: Andy Brown on March 01, 2015, 06:24:49 am
Hi Isaya,

This is likely to be because of the way your panel has been configured at the factory. We should be able to compensate for that by adjusting the value of the 'Entry Mode' register (R11H).

After the panel object has been created you should be able to call the 'writeCommand' method on the access mode object to change the value of R11H, e.g. this might be a good start:


_accessMode->writeCommand(0x11,0x08);


The possible values for R11H are documented in the SSD1289 datasheet. Look for the documentation for the ID[1..0] and AM bits. These control the screen output direction.
Title: Re: Landscape problem with ssd1289
Post by: Isaya on March 05, 2015, 10:18:57 pm
Thanks for your answer it was a good start for me. For solve my problem I change also the "Driver Output Control" and disable TB, and then I set the "Entry Mode" to 0x38 and all work fine. Thanks angain.
Title: Re: Landscape problem with ssd1289
Post by: flano on March 06, 2015, 02:53:15 am
Guys,

Thanks for this I was struggling with exactly the same problem, and your suggestion worked.

I used these lines to get it working.

_accessMode->writeCommand(0x01,0x293F);
_accessMode->writeCommand(0x11,0x6838);

Regards Mike