Recently bought a Generic 5″ touchscreen from AliExpress.
Model number ZC37200
XPT2046 touch controller.
Excellent quality, but getting it working was a bit of a trial.
Many of the tutorials out there are misleading, outdated, or just plain wrong.
This is what I did:
First (easy part), connect it all up, and install Raspbian from NOOBS 1.8.
Either open a terminal or from another PC:
ssh pi@<IP address of your pi>
First the easy part, we get the screen working with a full display.
Because these small screens will only display at native resolution, you may get a partial screen display, or a distorted one.
You need to force native resolution, in the case of the 5” display, that is 800×480.
sudo nano /boot/config.txt
edit these lines as follows:
# uncomment if hdmi display is not detected and composite is being output hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (here we are forcing 800x480) hdmi_group=2 hdmi_mode=1 hdmi_mode=87 hdmi_cvt 800 480 60 6 0 0 0
The next step is to enable the touchscreen.
In the same file, remove the # from this line:
and add this line:
save and reboot, everything worked!
Next we need to calibrate it, but I need more time to work that one out, will post in the next few days.