KEMBAR78
LCD Display Orientation Guide | PDF | Software Development | Software Engineering
0% found this document useful (0 votes)
53 views4 pages

LCD Display Orientation Guide

This document describes how to modify the display orientation of LCD screens connected to a Raspberry Pi by GPIO or HDMI interface. It provides instructions for rotating the screen by 0, 90, 180, or 270 degrees by editing the /boot/config.txt file and changing overlay parameters. It also explains that the touchscreen calibration settings need to be modified in the /etc/X11/xorg.conf.d/99-calibration.conf file to match the new display orientation.

Uploaded by

tomas rocano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views4 pages

LCD Display Orientation Guide

This document describes how to modify the display orientation of LCD screens connected to a Raspberry Pi by GPIO or HDMI interface. It provides instructions for rotating the screen by 0, 90, 180, or 270 degrees by editing the /boot/config.txt file and changing overlay parameters. It also explains that the touchscreen calibration settings need to be modified in the /etc/X11/xorg.conf.d/99-calibration.conf file to match the new display orientation.

Uploaded by

tomas rocano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

How to modify the display orientation 2016-08-31

How to modify the display orientation


1. GPIO interface type LCD rotating display method:
Suitable for GPIO interface type LCD (2.4” 2.8”3.2” 3.5”).

Run command at Terminal:

sudonano /boot/config.txt

if you are using 2.4”, 2.8”or 3.2”, then find line “dtoverlay=tft9341”and add

rotate parameter value as format following:

dtoverlay=tft9341:rotate=value

if it is LCD 3.5”, then find line “dtoverlay=tft35a” and add rotate parameter value as

format following:

dtoverlay=tft35a:rotate=value

Take LCD 3.5”as example:

To rotate 0 degrees (vertical screen display), the corresponding parameter value:

dtoverlay=tft35a:rotate=0

To rotate 90degrees (horizontal screen display), the corresponding parameter

value:

dtoverlay=tft35a:rotate=90

To rotate 180degrees (vertical screen display), the corresponding parameter value:

dtoverlay=tft35a:rotate=180

To rotate 270degrees (horizontal screen display), the corresponding parameter

value:

dtoverlay=tft35a:rotate=270

Press Ctrl + X, choose Y, save and exit; and re-start to achieve..


How to modify the display orientation 2016-08-31

2, HDMI Interface type LCD rotating display method:


Suitable for HDMI Interface type LCD (such as a 3.97”, 4.3”, 5”, 7” versoion B, 7” version C, 10.1”)

Run command at Terminal:

sudonano /boot/config.txt
Find "display rotate" parameter; if not have it, then add it.
Meanings of the parameters for display_rotate show as in the table
below
display_rotate result
0 no rotation
1 rotate 90 degrees clockwise
2 rotate 180 degrees clockwise
3 rotate 270 degrees clockwise
0x10000 horizontal flip
0x20000 vertical flip
To rotate 0 degrees, the corresponding parameter value:

display_rotate=0

To rotate 90 degrees, the corresponding parameter value:

display_rotate=1

To rotate 180 degrees, the corresponding parameter value:

display_rotate=2

To rotate 270 degrees, the corresponding parameter value:

display_rotate=3

To flip the display horizontally, the corresponding parameter value:

display_rotate=0x10000

To flip the display vertically, the corresponding parameter value:

display_rotate=0x20000

Press the key Ctrl + X, choose Y, save and exit.


How to modify the display orientation 2016-08-31

3, modify the touch parameters


After display direction changes, still need to do the touch settings by modifying the

“99-calibration.conf” file. Execute command:

sudonano/etc/X11/xorg.conf.d/99-calibration.conf

Take 5”HDMI LCD as example:

The default parameter is 0 degrees, that is “display_rotate = 0”, correspondingly

the touch calibration parameters are:

Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "140 3951261 3998 "
Option "SwapAxes" "0"
EndSection

To rotate the display 90degrees, that is “display_rotate = 1”, the touch parameters

should be revised correspondingly as follows:

Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "2613998 3951 140"
Option "SwapAxes" "1"
EndSection
How to modify the display orientation 2016-08-31

To rotate the display 180degrees, that is “display_rotate = 2”, the touch

parameters should be revised correspondingly as follows:

Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3951140 3998261"
Option "SwapAxes" "0"
EndSection

To rotate the display 270degrees, that is “display_rotate = 3”, the touch

parameters should be revised correspondingly as follows:

Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3998261 1403951"
Option "SwapAxes" "1"
EndSection/

After the modification, re-start to see the effect of the

modification
sudo reboot

You might also like