2015-05-15 04:45 AM
Hi there , I'm using this code to display a Bitmap (stored in an array) on a TFT.
int Cnt = 128 * 128;int i = 1;SetAddrWindow(0,0,128,128);while (Cnt--) { writeData16(mainscreen[i]); i++;}
However I get my image rotated , like in landscape mode, and I want to rotate it vertically? Anyone can help me to achieve this ?I'm using a 128*128 Module with SPI interface.Thank you !!!!!!!
2015-05-16 02:36 AM
Hi.
If your using SPI to write to your display then you probably have a display with a built in controller. Adjusting the settings on the controller will allow you to rotate the display between landscape and portrait mode. Many 128x128 colour LCDs use a ILI9163 controller. To set the orientation on this controller you need to modify the contents of register 0x36. Have a look on page 122 of this data sheethttp://www.rockbox.org/wiki/pub/Main/SonyNWZE370/ILI9163.pdf
Typically you would use a sequence like this: LCDWriteCmd(0x36); //Address register 0x36 LCDWriteData(0x60); //90° rotation The methods would need to be changed to suite your library. Hope this is of some help.2015-05-17 09:20 AM
Thank you. That's exactly what I've done. Though I had to modifiy the data to 0x40. thumbs up