sainsmart 1.8 tft lcd raspberry pi quotation

The 1.8" TFT LCD SPI-bus display modules available from Adafruit and SainSmart are functionally equivalent, except that the SainSmart unit can be driven at a much faster SPI bus rate than the Adafruit (32 MHz vs. 4 MHz in my testing). Fabien Royer has shown that this is due to a slow level shifter in the Adafruit unit.

The original st7735fb kernel driver was by Matt Porter, and was enhanced by Lady Ada, Neil Greatorex, and myself. I started with Neil"s proposed version of Matt"s st7735fb driver, which I extracted from Lady Ada"s raspberrypi kernel repo. I applied Neil"s version to the current raspberrypi 3.2.27+ kernel, then I made multiple enhancements to the st7735fb driver (and fixed a glitch in the bcm2708 SPI driver). I"ve since collaborated with Neil to develop further enhancements, and ported the driver to the upcoming 3.6.y Raspberry Pi kernel.

* My version of the st7735fb_map driver allows either CE0 (SPI 0.0) or CE1 (SPI 0.1) to be configured. ** My version allows the configuration of any GPIO pin for D/C and RESET. *** Since I"m not using the MicroSD card device on the back of the display modules, the remaining pins are left unconnected.

Clone my raspberrypi-linux repo, then select either the 3.2.27-based branch or the 3.6.y-based branch (run "uname -a" on your Pi if you"re not sure which you need):

The board supports multiple different 1.8" panel pinouts including Adafruit and SainSmart, and sports mounting pads for three GPIO buttons. Very nice!

sainsmart 1.8 tft lcd raspberry pi quotation

The TFT isn"t "plug & play" with the Raspberry, a patch has to be applied to the kernel to be able to interface via SPI with the ST7735R controller chip on the TFT. Once working, the display will act as a framebuffer device.

As it takes over three hours to compile the kernel on the PI, I will show how to cross compile from another Linux PC. In my case, it is Ubuntu 12.10 running within VMWare on a Windows 7 Quad core PC. Kernel compile time is 15 mins.

-Copy config from the Raspberry Pi to the Ubuntu box using SCP. Replace "raspberrypi" below with the IP address of your Raspberry Pi if hostname lookup fails.

If you are planning on displaying the console on the TFT, then enabling these options in .config will allow you to change the font size and rotate the display later on.

To enable parallel processing for a faster compile. If you have a dual core processor add -j 3 to the end of the command below. If you have quad core, add -j 6

The last step below is to SCP the files from from Ubuntu to the Raspberry Pi. If you have trouble SCPing into your Ubuntu box you may need to install open SSH on Ubuntu with sudo apt-get install openssh-server. This step also copies the files from my home folder "mark"... yours would be different.

If you build the st7735 driver pair as built-in, add these options to the end of the line in /boot/cmdline.txt. This will display the console on the TFT.

sainsmart 1.8 tft lcd raspberry pi quotation

I just wanted to share that I"ve soldered an Adafruit 1.8" TFT (http://adafruit.com/products/358) onto an Adafruit Proto Pi Plate (http://adafruit.com/products/801) and written code to display some info on it from the Pi. I"ve uploaded a video of it in action to http://www.flickr.com/photos/ngreatorex/7672743302/. I used pygame to produce the simple display show in the video.

It is quite simple to wire up. It"s very similar to the Arduino (see http://learn.adafruit.com/1-8-tft-displ ... spi-wiring). Instead of using the Arduino pin numbers, you use the Raspberry Pi pin numbers as found at http://elinux.org/images/2/2a/GPIOs.png. For the TFT_CS and D/C pins, you should just pick unused GPIOs and ensure they are referenced in the code.

Are you using Kamal"s code? My original code won"t work with fbterm. Kamal has fixed this in his branch at https://github.com/kamalmostafa/raspberrypi-linux.

Been really impressed with the work you lot have been doing. Have an ST7735 based 1.8" LCD from Sainsmart that came as part of an Arduino UNO package.

Over the last few days I"ve been trying to get the 1.8" LCD working with the RPi for a project that I"m working on as it"ll mean I can possibly eliminate the use of an Atmel MCU / Arduino. However I"ve had no such luck with the ST7735 driver.

So far I"ve attempted to compile Kamal"s branch using the Occidentals 0.2 distro aswell as the wheezy-raspbian (2012-10-28). I"ve followed Kamal"s guide from "Configuring the kernel build", which goes through asking questions about configuring the ST7735 driver. I"ve used the same GPIO"s as Kamal for RST/DC, and just hit enter on the others. Even wired up the LCD the same.

Would anybody care to help as it"s about my 3rd-4th compile of the kernel, and I"m doing it directly on the RPi which takes a good part of a day to do.

Would anybody care to help as it"s about my 3rd-4th compile of the kernel, and I"m doing it directly on the RPi which takes a good part of a day to do.

Though you guys would most likely want some dump of my setup. My latest attempt has been with wheezy distro and Kamal"s branch. To setup the config I did as per his guide and used "make bcmrpi_defconfig", followed by the SED command to modify the config file so that the make oldconfig would run through setup questions relating to the ST7735.

This is an issue that I"ve been discussing with Kamal. The problem is that if you build in the ST7735 driver you also have to build in the BCM2708 SPI driver.

This is an issue that I"ve been discussing with Kamal. The problem is that if you build in the ST7735 driver you also have to build in the BCM2708 SPI driver.

This is an issue that I"ve been discussing with Kamal. The problem is that if you build in the ST7735 driver you also have to build in the BCM2708 SPI driver.

Neil, not long been up but read it this morning. Haven"t been able to try it as I"ll have to build the kernel again on the RPi and as yet don"t have any other nix dev platform to work on. Just in the process of grabbing mint and get my laptop setup as I"m sick of 8-11 hour build times

Just an update. Followed Mark"s guide and cross compiled the kernel with the drivers as modules on my laptop and copied them across and now have the hobbit trailer running on the RPi.

Have recompiled so that spi_bcm2708 and st7735 are builtin to the kernel. Have had success with fbterm displaying the login and using mplayer. However still no luck with fbcon, adding the options to cmdline.txt seems to prevent the RPi from booting. Have checked .config and fbcon seems to be builtin:

And, as Neil mentioned, whenever you build the st7735 pair as built-ins you also need SPI_BCM2708 to be built-in... Currently, you must manually set CONFIG_SPI_BCM2708 to "=y". We"re working on determining a proper way to get that bit to happen automatically.

Since following Mark"s guide into building the kernel with the drivers as modules I followed Neil"s initial advice about changing CONFIG_SPI_BCM2708 to "Y" instead of "M" so that it"s a builtin. Did the same for the ST7735 driver aswell and rebuilt the kernel on the laptop. Which is great as the compile times don"t take all day

As for fbcon, I"m using the settings that you posted on your page and did wonder if it was due to the .config settings for font of 8x8 and 8x16 preventing it from booting. I was going to attempt to change the cmdline.txt to 8x8 or 8x16 as an easy fix to test if that was the problem without having to rebuild the kernel. I"m not sure what is happening when I use fbcon, all I know is that when I add the lines to cmdline.txt and restart the RPi it then is unreachable via SSH. I could hook it upto the TV but it would mean rooting around and removing HDMI cables from the XBox, going to see if I can get a cheapy HDMI cable off eBay.

I"ve been getting a bit sidetracked and have been writing some test C/C++ code to display pixels on the framebuffer device. Seems to be working fine. Have noticed with the code that I"m using that the device gets returned as 16bpp in an RGB565 format. I know the LCD is sold as 18bit but I"m guessing the driver makes the fbdev into 16bit for some reason.

With con2fbmap I"ve been using 1 0, 1 1 and a variety of other options to try and get it to to work. After hitting enter the cursor isn"t returned to the CLI and you can"t do anything. FYI, I am trying to run con2fbmap from an SSH session with the RPi. Perhaps having the RPi plugged in via HDMI to a TV and executing con2fbmap directly would work.

darryl wrote:Have noticed with the code that I"m using that the device gets returned as 16bpp in an RGB565 format. I know the LCD is sold as 18bit but I"m guessing the driver makes the fbdev into 16bit for some reason.

No, my suggested map setting (fbcon=map:10) is correct: it maps tty1 to fb1 (the ST7735 panel) and tty2 to fb0 (the Pi"s native GPU framebuffer). See http://www.kernel.org/doc/Documentation/fb/fbcon.txt for more details.

With con2fbmap I"ve been using 1 0, 1 1 and a variety of other options to try and get it to to work. After hitting enter the cursor isn"t returned to the CLI and you can"t do anything. FYI, I am trying to run con2fbmap from an SSH session with the RPi. Perhaps having the RPi plugged in via HDMI to a TV and executing con2fbmap directly would work.

Finally (and most importantly)... Do you have my latest version of the driver source? (I suspect not, since the latest version would have enabled those font configs automatically for you). I updated my github branch with some important fbcon fixes within the past few days. The current latest version is commit 247163d79e... from https://github.com/kamalmostafa/raspberrypi-linux.git.

sainsmart 1.8 tft lcd raspberry pi quotation

Self collection avaliable at Oxley Bizhub, 71 Ubi Rd 1 #10-47 Singapore 408732 (To wait for confirmation before collection - Appointment required). Additional charge of $10 apply for delivery by courier in Singapore, FREE shipping for orders above $60.

We ship internationally too through Air Courier or Registered Mail (select on Checkout), do contact us for larger orders. All shipping taxes after shipment will be borne by customer for overseas orders.

sainsmart 1.8 tft lcd raspberry pi quotation

40 characters by 2 lines text display with font size 5x7 dots or 5x8 dots and cursor line. I2C, SPI or RS232/TTL serial interface. SPLC780D, SPLC782A,S6A0069, S6A0070, KS0066, KS0070B, NT7603H,NT7065, NT7066, ST7032 or equivalence controller driver. Contrast and brightness can be controlled by software. Positive/Neagtive, Transflective/Transmissive, Blue/Grey/Yellow-Green, W/O backlight, color of backlight and other options can be chosen.

sainsmart 1.8 tft lcd raspberry pi quotation

This is a short Application Note about how to use ST7735R Controller based TFT screen with RaspberryPi Universal Expansion Boardand RaspberryPi. More information about the screen can be found in the list of my Peripheral Boards.