today I want to show you how I set up my Tontec 3.5″ Screen on my Raspberry Pi B. I thought I should write about this in my blog since it took quite some research to get this screen up and running. Ok. Let´s start 🙂
- Raspberry Pi B
- Tontec 3.5″ Screen (I bought it from here.)
- Raspbian Wheezy (You can download it from here.)
The first step is simple. Build the case and attach the screen to your Raspberry Pi. When you are done it should look like this:
Now we will update the Raspbian Wheezy Operating System:
sudo apt-get update
sudo apt-get upgrade
Now we will download and install a firmware update. To do this simply run the following commands and wait a few minutes:
sudo apt-get install rpi-update
The next step is to adjust the SPI and Overlay settings to our Tontec MZ61581 display:
sudo nano /boot/config.txt
Add the following code to the end of the file and hit save:
Your config.txt file should now look like this:
# uncomment if you get no picture on HDMI for a default "safe" mode
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
# uncomment to force a console size. By default it will be display's size minus
# uncomment if hdmi display is not detected and composite is being output
# uncomment to force a specific HDMI mode (this will force VGA)
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
# uncomment for composite PAL
#uncomment to overclock the arm. 700 MHz is the default.
# for more options see http://elinux.org/RPi_config.txt
Now we will install the necessary dependencies to set our Default Display to our Tontec Screen:
sudo apt-get install xserver-xorg-video-fbturbo
After you have successfully installed the dependencies you need to alter the following file:
sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
All you need to do is to alter the following line:
Option "fbdev" "/dev/fb0"
To look like this:
Option "fbdev" "/dev/fb1"
This will switch the Default Display from HDMI to the Tontec Screen.
Here you can see how your 99-fbturbo.conf file should look like:
# This is a minimal sample config file, which can be copied to
# /etc/X11/xorg.conf in order to make the Xorg server pick up
# and load xf86-video-fbturbo driver installed in the system.
# When troubleshooting, check /var/log/Xorg.0.log for the debugging
# output and error messages.
# Run "man fbturbo" to get additional information about the extra
# configuration options for tuning the driver.
Identifier "Allwinner A10/A13 FBDEV"
Option "fbdev" "/dev/fb1"
Option "SwapbuffersWait" "true"
The last step is to tell your Raspberry Pi to display the boot screen on your Tontec Screen. To do so edit the following file:
sudo nano /boot/cmdline.txt
Now add the below code before “rootwait“:
Your cmdline.txt file should now look like this:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fbcon=map:10 rootwait
Now reboot your Raspberry Pi one last time:
Now when your Raspberry Pi boots your screen should switch on and you should be able to see the boot screen on it.
Well, that´s it. Your Tontec screen is now ready to use 🙂
If you want to have a look at my config files or the documentation of the screen I found online you can find them here.
I hope you liked my post and I hope to see you again next time 🙂