NEC 18-bit TFT COLOR LCD

Hi everybody,

does anyone know how to change the orientation of LCD display.

How to change the characters on the display to horizontal position?

regards

If it’s a character display, I don’t know how to help you, not entirely sure it can be done, but if it’s a graphical display, then in your software you simply have to rotate the letters (and everything else) before you blit them to your LCD buffer.

The easiest way to do this is to swap your X and Y coordinates for the elements you’re drawing for a 90d rotation, but if you want more specific rotations (45d, -155d, etc) you can use the formula

dx = xcosT - ysinT; 
dy = xsinT + ycosT

where x,y was the original coordinate, and T(heta) is the angle in which you would like to rotate by, and dx, dy is the new coordinate. Make sure to round to the nearest pixel if using floats (which hopefully you’re not).

Keep in mind that this is only moving the pixels inside your buffer, you’ll need to clip the buffer image to your display in order to draw everything right.

You also might want to think about writing your own simple image routines library for future use, as these kinds of functionalities are very often needed.