Below you will find instructions for installing the appropriate drivers for the Tontec 3.5 inch screen on your Raspberry Pi (including Pi 2). This guide was written for Raspbian Jessie and Raspbian Wheezy ONLY

1.Initial Config of New Raspberry Pi Install

After booting your Raspberry Pi for the first time on Raspbian-Wheezy, we will need to perform the normal tasks of setting up our Raspberry Pi. E.g expand filesystem,
Then we need “update” and “upgrade”

sudo apt-get update
sudo apt-get upgrade
sudo reboot

2.Update Firmware (Optional)

We now need to update the dtb file to the newest version to support Tontec screen.

cd /boot/overlays
sudo rm mz61581-overlay.dtb
sudo wget http://www.itontec.com/mz61581-overlay.dtb
sudo reboot

3.Enable SPI and set overlay for Tontec MZ61581 Screen

Open /boot/config.txt

sudo nano /boot/config.txt

And add these lines to the bottom

dtparam=spi=on
dtoverlay=mz61581

Then save and reboot

4.Set Tontec 3.5 Screen as the default display instead of HDMI

Here we will change the default output display from HDMI to Tontec Screen

sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf

Change
Option “fbdev” “/dev/fb0″
To

Option       "fbdev" "/dev/fb1"

– if you want to switch back to the HDMI display, just change it back to fb0

5.Edit cmdline.txt

Here we will enable Tontec Screen to display during the booting process

sudo nano /boot/cmdline.txt

Add fbcon=map:10 at the end of current line. (No need to start a new line)

6.Reboot

sudo reboot

Done!

 

  • Calibrate (optional)

If you need to calibrate the touchscreen for X, Please check the following post according to your OS:

How to Calibrate The Touchscreen for RAS with Raspbian Jessie

How to Calibrate The Touchscreen for RAS with Raspbian Wheezy

Leave a Reply

Your email address will not be published. Required fields are marked *

testjir