texy
Forum Moderator
Forum Moderator
Posts: 5151
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

1.8 TFT LCD add-on shield board v2

Thu May 09, 2013 8:23 pm

Hi,
I,ve updated the 1.8" TFT pcb layout to incorporate a cheaper 16-pin LCD module and moved the 3 switches to stop them fouling the ethernet connector.
Image

The LCD used has a 262k colour range at 160 x 128 resolution, is SPI driven and utilises a white LED background.
To use Notro's excellent image, using the LCD as an alternative framebuffer, the correct sequence, using the image latest from https://github.com/notro/fbtft/wiki is :

Code: Select all

sudo modprobe fbtft_device name=sainsmart18 speed=32000000 fps=50
Then to make it permanent use

Code: Select all

sudo nano /etc/modules
and add this line :

Code: Select all

fbtft_device name=sainsmart18 verbose=0 speed=32000000 fps=50
Reboot the Pi and check fb1 is present in /dev/
...should be good to go!


Sample test code :

Code: Select all

# 1.8" TFT test prog
# v2 18/6/13

import wiringpi2 as wiringpi
from subprocess import call
import pygame, sys, os, time
from pygame.locals import *
os.environ["SDL_FBDEV"] = "/dev/fb1"

IN = OFF = 0
OUT = ON = 1
PUD_DOWN = 1

UP  = 13     # gpio pin 21 = UP
DOWN  = 2    # gpio pin 13 = DOWN
SELECT  = 11 # gpio pin 26 = LEFT

pygame.init()

# set up the window
DISPLAYSURF = pygame.display.set_mode((128, 160), 0, 32)
pygame.mouse.set_visible(0)
pygame.display.set_caption('Drawing')

# set up the colors
BLACK = (  0,   0,   0)
WHITE = (255, 255, 255)
RED   = (255,   0,   0)
GREEN = (  0, 255,   0)
BLUE  = (  0,   0, 255)

# draw on the surface object
DISPLAYSURF.fill(BLACK)
print "black"
time.sleep(.5)
pygame.display.update()

DISPLAYSURF.fill(RED)
print "red"
time.sleep(.5)
pygame.display.update()

DISPLAYSURF.fill(GREEN)
print "green"
time.sleep(.5)
pygame.display.update()

DISPLAYSURF.fill(BLUE)
print "blue"
time.sleep(.5)
pygame.display.update()

DISPLAYSURF.fill(WHITE)
print "white"
time.sleep(.5)
pygame.display.update()

# demo draw some shapes
pygame.draw.polygon(DISPLAYSURF, GREEN, ((16, 0), (111, 106), (36, 277), (56, 27), (0, 106)))
pygame.draw.line(DISPLAYSURF, BLUE, (60, 60), (120, 60), 4)
pygame.draw.line(DISPLAYSURF, BLUE, (120, 60), (60, 120))
pygame.draw.line(DISPLAYSURF, BLUE, (60, 120), (120, 120), 4)
pygame.draw.circle(DISPLAYSURF, BLUE, (40, 50), 20, 0)
pygame.draw.ellipse(DISPLAYSURF, RED, (110, 200, 40, 80), 1)
pygame.draw.rect(DISPLAYSURF, RED, (100, 150, 100, 50))
pygame.display.update()
time.sleep(.5)

#player movie
#sudo mplayer -vo fbdev2:/dev/fb1 -x 128 -y 160 -zoom VfE_html5.mp4
#call(["mplayer", "-vo", "fbdev2:/dev/fb1", "-x", "128", "-y", "160", "-zoom", "VfE_html5.mp4"])

#set up the gpio's for the 3 buttons
wiringpi.wiringPiSetup()
for pin in [UP, DOWN, SELECT]:
  wiringpi.pinMode(pin, IN) # set to input
  wiringpi.pullUpDnControl(pin, PUD_DOWN) # enable pull down resistor

# run the game loop
while True:
    for event in pygame.event.get():
        if event.type == QUIT:
            print "Pygame Exit"
            pygame.quit()
            sys.exit("Quit")
    input_value1 = wiringpi.digitalRead(UP)
    input_value2 = wiringpi.digitalRead(DOWN)
    input_value3 = wiringpi.digitalRead(SELECT)
    if input_value1 == True:
         font = pygame.font.Font(None, 36)
         text = font.render("UP", 1, RED)
         text = pygame.transform.rotate(text, 270)
         textpos = text.get_rect(centery=DISPLAYSURF.get_height()/2,centerx=DISPLAYSURF.get_width()/2)
         DISPLAYSURF.blit(text, textpos)
         pygame.display.update()
    elif input_value2 == True:
         font = pygame.font.Font(None, 36)
         text = font.render("DOWN", 1, GREEN)
         text = pygame.transform.rotate(text, 270)
         textpos = text.get_rect(centery=DISPLAYSURF.get_height()/2,centerx=DISPLAYSURF.get_width()/2)
         DISPLAYSURF.blit(text, textpos)
         pygame.display.update()
    elif input_value3 == True:
         font = pygame.font.Font(None, 36)
         text = font.render("SELECT", 1, BLUE)
         text = pygame.transform.rotate(text, 270)
         textpos = text.get_rect(centery=DISPLAYSURF.get_height()/2,centerx=DISPLAYSURF.get_width()/2)
         DISPLAYSURF.blit(text, textpos)
         pygame.display.update()
    else:
         DISPLAYSURF.fill(WHITE)
         pygame.display.update()

    print "UP = ",input_value1
    print "DOWN = ",input_value2
    print "SELECT = ",input_value3
    time.sleep(.5)

You'll need wiringpi2 installed to run the test program:

Code: Select all

sudo apt-get install -y python-pip git-core python-dev
sudo pip install wiringpi2
Purchase details can be found here :

http://www.raspberrypi.org/phpBB3/viewt ... 59&t=43286
Cheers,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

notro
Posts: 695
Joined: Tue Oct 16, 2012 6:21 pm
Location: Drammen, Norway

Re: 1.8 TFT LCD add-on shield board v2

Thu May 09, 2013 10:53 pm

texy wrote:

Code: Select all

spidevices name=sainsmart18fb verbose=0
sainsmart18fb
A slip here: spidevices has changed name to fbtft_device

Code: Select all

fbtft_device name=sainsmart18fb verbose=0
sainsmart18fb

texy
Forum Moderator
Forum Moderator
Posts: 5151
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 1.8 TFT LCD add-on shield board v2

Fri May 10, 2013 6:23 am

notro wrote:
texy wrote:

Code: Select all

spidevices name=sainsmart18fb verbose=0
sainsmart18fb
A slip here: spidevices has changed name to fbtft_device

Code: Select all

fbtft_device name=sainsmart18fb verbose=0
sainsmart18fb

....thankyou - now corrected ;)

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

texy
Forum Moderator
Forum Moderator
Posts: 5151
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 1.8 TFT LCD add-on shield board v2

Sun May 26, 2013 10:29 am

Thanks for continued work by Notro, here is a method of updating the pi's installed applications without breaking the fb1 drivers :

Update packages except raspberrypi-bootloader :

Code: Select all

sudo apt-mark hold raspberrypi-bootloader
sudo apt-get update
sudo apt-get upgrade
Update bootloader

Code: Select all

sudo apt-get install rpi-update
sudo SKIP_KERNEL=1 rpi-update
This is allow, for example, update to the pi for camera use.

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

MikeLX
Posts: 4
Joined: Sun May 19, 2013 11:49 am

Re: 1.8 TFT LCD add-on shield board v2

Mon May 27, 2013 12:59 am

texy wrote:
This is allow, for example, update to the pi for camera use.

Texy
I tried the above process, but the camera unfortunately still doesn't seem to work together with the TFT display.
The camera on its own, using the standard image fully updated is working fine. So does the TFT display the image from notro, but even when updating that image using the above procedure, the camera is still not working.

Did you manage to get both the display and the camera working at the same time?

Mike

texy
Forum Moderator
Forum Moderator
Posts: 5151
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 1.8 TFT LCD add-on shield board v2

Mon May 27, 2013 7:54 am

Hi Mike,
yes I have both working on the same image. What seems to get broken is the $PATH to the camera commands at /opt/vc/bin
See if the camera is working by typing

Code: Select all

[email protected] ~ $/opt/vc/bin/raspistill -o test.jpg
I had to add the $PATH to that folder permanently by typing

Code: Select all

[email protected] ~ $ echo 'export PATH=$PATH:/opt/vc/bin' >> ~/.bashrc
See if that fixes it.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
guidol
Posts: 65
Joined: Tue Jul 03, 2012 9:21 am
Location: Babenhausen, Germany

Re: 1.8 TFT LCD add-on shield board v2

Mon May 27, 2013 9:46 am

Hi texy
you did wrote:
> "!.8inch TFT LCD + Switch Shield v2" add-on boards for sale here :
> http://www.raspberrypi.org/phpBB3/viewt ... 64&t=43285
>50p goes to the Foundation

But this links belongs to this thread in the forum...so where could I really buy this display+board?
Many thanks for the information in advance :-)

texy
Forum Moderator
Forum Moderator
Posts: 5151
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 1.8 TFT LCD add-on shield board v2

Mon May 27, 2013 10:14 am

Ah yes - I changed my profile yesterday and made an error - it is correct now.
For sale page is here :
http://www.raspberrypi.org/phpBB3/viewt ... 59&t=43286

Thanks,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

MikeLX
Posts: 4
Joined: Sun May 19, 2013 11:49 am

Re: 1.8 TFT LCD add-on shield board v2

Tue May 28, 2013 11:19 pm

Hi texy,

I finally got the camera and the display to work together. Thanks for your help. Although I chose to start from the standard image, fully upgrade it to have the camera working and then compile the necessary kernel to support the display based on the instructions on notros github page (https://github.com/notro/fbtft/wiki/FBT ... ld-process).

BTW, I also quickly designed a case for the Raspberry PI including your display board. It is still very rough and I plan to improve it over the coming weeks, but it works pretty nicely.
Details here for those with access to a 3D printer:
http://www.thingiverse.com/thing:95364

mike

texy
Forum Moderator
Forum Moderator
Posts: 5151
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 1.8 TFT LCD add-on shield board v2

Wed May 29, 2013 3:40 pm

Good stuff.
Explain a bit more about creating the new kernel, etc
Start with a fresh rasbian image (2013-02-09)
write it sd
to bring to latest, including camera support :
apt-get update && upgrade
run raspi-config and set as required, including enabling camera

what about rpi-update for bleeding edge kernel ?

...then continue from Notro's page :
https://github.com/notro/fbtft/wiki/FBT ... ld-process

????
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

MikeLX
Posts: 4
Joined: Sun May 19, 2013 11:49 am

Re: 1.8 TFT LCD add-on shield board v2

Wed May 29, 2013 9:23 pm

texy wrote:Good stuff.
Explain a bit more about creating the new kernel, etc
Start with a fresh rasbian image (2013-02-09)
write it sd
to bring to latest, including camera support :
apt-get update && upgrade
run raspi-config and set as required, including enabling camera

what about rpi-update for bleeding edge kernel ?
Yes, all of the above standard steps, but no need to do the "sudo SKIP_KERNEL=1 rpi-update" steps, as you want the latest one, and in the next step you will then build a new kernel with teh FBTFT modules build in additionally.
texy wrote: ...then continue from Notro's page :
https://github.com/notro/fbtft/wiki/FBT ... ld-process

????
Correct. after you have done the normal update on the default rasbian image as above, you follow Notro's steps on that page up to and including the "Install" step.

But remember, since you are compiling the new kernel (with the FBTFT modules) using this method on the Raspberry itself, it will take a rather long time. It took 5 hours in my case (overclocked the Raspberry before).

Once you have done the install step you will end up with an updated kernel including the FBTFT modules, and all works as expected. No need to add /opt/vc/bin to to the path anymore (which isn't a good idea anyway) etc...

But unless something changes, you would have to do this each time there are major updates which include the kernel and raspiloader etc...

mike

texy
Forum Moderator
Forum Moderator
Posts: 5151
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 1.8 TFT LCD add-on shield board v2

Wed May 29, 2013 10:03 pm

Thanks mike - may well give that method a go. However...
I feel a new official os must be due any time soon.
Also I wouldn't want to use the pi to do the compiling.
I have an old laptop with Ubuntu loaded which dies the job in around 25 minutes.
See this thread for details on how to do it -
http://marks-space.com/2012/11/23/raspberrypi-tft/
Obviously a combination of yours and marks method would be needed.
All I need now us a method of piping the camera preview out to framebuffer1 now.....

Cheers
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2841
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: 1.8 TFT LCD add-on shield board v2

Mon Jun 03, 2013 2:55 pm

texy wrote: All I need now us a method of piping the camera preview out to framebuffer1 now.....
Indeed. Without that, it's a bit moot. I need them both working together as well.
Unfortunately I can't use your shield either as it seems to occupy all the GPIOs and I need some of them available for powering the Pi (reg) and running a bluetooth serial interface.
Alex Eames RasPi.TV, RasP.iO

texy
Forum Moderator
Forum Moderator
Posts: 5151
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 1.8 TFT LCD add-on shield board v2

Mon Jun 03, 2013 5:04 pm

Hi Alex,
the display only uses the following GPIO lines :
TFT Pi
SCLK bcm-11
SDA bcm-10
RS bcm-24
CE0 bcm-8
RESET bcm-25

There are also 3 switches that can be optionally used :
UP bcm-9
DOWN bcm-21/27
SELECT bcm-7

All of the rest of the GPIO lines are brought out on this header :

Image

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2841
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: 1.8 TFT LCD add-on shield board v2

Sat Jun 08, 2013 9:28 pm

Thanks Texy.

I'd love to use one as an aiming and preview screen on my Mk II RasPiCamcorder, but if we can't get the camera talking to framebuffer :cry:
Alex Eames RasPi.TV, RasP.iO

texy
Forum Moderator
Forum Moderator
Posts: 5151
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 1.8 TFT LCD add-on shield board v2

Sat Jun 08, 2013 9:56 pm

Yes, it would be nice if it just came down to correct bash command combination ;)
Hopefully some clever software author type person will take a look at the source code and MAKE IT SO..........


Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

cmegens
Posts: 28
Joined: Fri May 24, 2013 12:23 pm
Location: Netherlands

Re: 1.8 TFT LCD add-on shield board v2

Mon Jun 10, 2013 1:15 pm

Thanks for the great screen Texy! You make it easy to connect and explore.

One question though. I got the screen working with both

Code: Select all

sudo con2fbmap 1 1
and

Code: Select all

 sudo FRAMEBUFFER=/dev/fb1 startx
, but I want the Pi to boot with the screen on and even show the boot sequence? Is this possible? I tried the instructions from Notro on https://github.com/notro/fbtft/wiki, but no success. I either get a white or a black screen. When I fully follow the instructions and leave a screen plugged in the HDMI port it gives me a time out error, and retries after 5 minutes.

Am I trying something that is impossible with this screen? As soon as I add

Code: Select all

#1:2345:respawn:/sbin/getty 115200 tty1
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
to the /etc/inittab I get the error...

texy
Forum Moderator
Forum Moderator
Posts: 5151
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 1.8 TFT LCD add-on shield board v2

Tue Jun 11, 2013 6:57 am

Hi,
to get the console displayed on the TFT instead of HDMI when booting you need to edit /boot/cmdline.txt and add the following to the end of the line :

Code: Select all

fbcon=map:10 fbcon=rotate:1 fbcon=font:ProFont6x11
There are other variations, like the font to use, etc (I find MINI4x6) works well - that's from memory, it might be called something else, but similar :?
See this page for more help :
http://www.mjmwired.net/kernel/Document ... on.txt#126

Also this part :

Code: Select all

#1:2345:respawn:/sbin/getty 115200 tty1
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
has nothing to do with the display as such, but allows the Pi to boot without having to log in with user pi password raspberry

Hope this helps,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

cmegens
Posts: 28
Joined: Fri May 24, 2013 12:23 pm
Location: Netherlands

Re: 1.8 TFT LCD add-on shield board v2

Tue Jun 11, 2013 8:51 pm

added that exact same line already. When I power up the RPi the screen is white, after a second or so it switches to black (with the backlight on).
Any ideas what it could be?

texy
Forum Moderator
Forum Moderator
Posts: 5151
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 1.8 TFT LCD add-on shield board v2

Tue Jun 11, 2013 8:59 pm

Hi,
can you do a

Code: Select all

dmesg
Have you changed the kernel since you last got the display working? Or an apt-get upgrade?
What does

Code: Select all

dir /dev/fb*
show.

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

cmegens
Posts: 28
Joined: Fri May 24, 2013 12:23 pm
Location: Netherlands

Re: 1.8 TFT LCD add-on shield board v2

Tue Jun 11, 2013 9:51 pm

No, didn't update anything...

this is dmesg (sorry about the length.

Code: Select all

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.6.11+ ([email protected]) (gcc version 4.6.3 (Debian 4.6.3-14+rpi1) ) #1 PREEMPT Fri May 24 07:45:23 UTC 2013
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: BCM2708
[    0.000000] cma: CMA: reserved 16 MiB at 0b000000
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] On node 0 totalpages: 49152
[    0.000000] free_area_init_node: node 0, pgdat c054f8c4, node_mem_map c05f9000
[    0.000000]   Normal zone: 384 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 48768 pages, LIFO batch:15
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 48768
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x2 bcm2708.serial=0x88f3a2da smsc95xx.macaddr=B8:27:EB:F3:A2:DA sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0xec00000 vc_mem.mem_size=0x10000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 192MB = 192MB total
[    0.000000] Memory: 172288k/172288k available, 24320k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xcc800000 - 0xff000000   ( 808 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xcc000000   ( 192 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc04f9298   (5061 kB)
[    0.000000]       .init : 0xc04fa000 - 0xc051ad48   ( 132 kB)
[    0.000000]       .data : 0xc051c000 - 0xc05500e0   ( 209 kB)
[    0.000000]        .bss : 0xc0550104 - 0xc05f87d8   ( 674 kB)
[    0.000000] NR_IRQS:330
[    0.000000] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 4294967ms
[    0.000000] Console: colour dummy device 80x30
[    0.000000] console [tty1] enabled
[    0.001003] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)
[    0.060124] pid_max: default: 32768 minimum: 301
[    0.060448] Mount-cache hash table entries: 512
[    0.061180] Initializing cgroup subsys cpuacct
[    0.061234] Initializing cgroup subsys devices
[    0.061268] Initializing cgroup subsys freezer
[    0.061297] Initializing cgroup subsys blkio
[    0.061398] CPU: Testing write buffer coherency: ok
[    0.061731] hw perfevents: enabled with v6 PMU driver, 3 counters available
[    0.061883] Setting up static identity map for 0x3a6b08 - 0x3a6b64
[    0.063395] devtmpfs: initialized
[    0.073729] NET: Registered protocol family 16
[    0.079959] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.081143] bcm2708.uart_clock = 0
[    0.082531] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.082584] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.082619] mailbox: Broadcom VideoCore Mailbox driver
[    0.082713] bcm2708_vcio: mailbox at f200b880
[    0.082811] bcm_power: Broadcom power driver
[    0.082848] bcm_power_open() -> 0
[    0.082873] bcm_power_request(0, 8)
[    0.583563] bcm_mailbox_read -> 00000080, 0
[    0.583603] bcm_power_request -> 0
[    0.583630] Serial: AMBA PL011 UART driver
[    0.583776] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83) is a PL011 rev3
[    0.902216] console [ttyAMA0] enabled
[    0.925391] bio: create slab <bio-0> at 0
[    0.930276] SCSI subsystem initialized
[    0.934358] usbcore: registered new interface driver usbfs
[    0.939941] usbcore: registered new interface driver hub
[    0.945527] usbcore: registered new device driver usb
[    0.951842] Switching to clocksource stc
[    0.956083] FS-Cache: Loaded
[    0.959217] CacheFiles: Loaded
[    0.973825] NET: Registered protocol family 2
[    0.979106] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.986455] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    0.993037] TCP: Hash tables configured (established 8192 bind 8192)
[    0.999470] TCP: reno registered
[    1.002724] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.008622] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.015175] NET: Registered protocol family 1
[    1.020096] RPC: Registered named UNIX socket transport module.
[    1.026144] RPC: Registered udp transport module.
[    1.030867] RPC: Registered tcp transport module.
[    1.035580] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.042679] bcm2708_dma: DMA manager at f2007000
[    1.047468] bcm2708_gpio: bcm2708_gpio_probe c0529db8
[    1.052926] vc-mem: phys_addr:0x00000000 mem_base=0x0ec00000 mem_size:0x10000000(256 MiB)
[    1.062098] audit: initializing netlink socket (disabled)
[    1.067701] type=2000 audit(0.930:1): initialized
[    1.192451] VFS: Disk quotas dquot_6.5.2
[    1.196591] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.203545] FS-Cache: Netfs 'nfs' registered for caching
[    1.209303] NFS: Registering the id_resolver key type
[    1.214467] Key type id_resolver registered
[    1.218759] Key type id_legacy registered
[    1.223121] msgmni has been set to 368
[    1.228670] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    1.236468] io scheduler noop registered
[    1.240419] io scheduler deadline registered (default)
[    1.245590] io scheduler cfq registered
[    1.261298] Console: switching to colour frame buffer device 82x26
[    1.272952] kgdb: Registered I/O driver kgdboc.
[    1.280181] vc-cma: Videocore CMA driver
[    1.286158] vc-cma: vc_cma_base      = 0x00000000
[    1.292791] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    1.300057] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    1.316177] brd: module loaded
[    1.325815] loop: module loaded
[    1.331147] vchiq: vchiq_init_state: slot_zero = 0xcb000000, is_master = 0
[    1.340579] Loading iSCSI transport class v2.0-870.
[    1.348310] usbcore: registered new interface driver smsc95xx
[    1.356066] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.568683] Core Release: 2.80a
[    1.573587] Setting default values for core params
[    1.580234] Finished setting default values for core params
[    1.792731] Using Buffer DMA mode
[    1.797854] Periodic Transfer Interrupt Enhancement - disabled
[    1.805433] Multiprocessor Interrupt Enhancement - disabled
[    1.812787] OTG VER PARAM: 0, OTG VER FLAG: 0
[    1.818940] Dedicated Tx FIFOs mode
[    1.825040] dwc_otg: Microframe scheduler enabled
[    1.825377] dwc_otg bcm2708_usb: DWC OTG Controller
[    1.832191] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    1.841342] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[    1.848782] Init: Port Power? op_state=1
[    1.854488] Init: Power Port (0)
[    1.859613] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.868378] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.877569] usb usb1: Product: DWC OTG Controller
[    1.884211] usb usb1: Manufacturer: Linux 3.6.11+ dwc_otg_hcd
[    1.891908] usb usb1: SerialNumber: bcm2708_usb
[    1.899110] hub 1-0:1.0: USB hub found
[    1.904767] hub 1-0:1.0: 1 port detected
[    1.910872] dwc_otg: FIQ enabled
[    1.910889] dwc_otg: NAK holdoff enabled
[    1.910910] Module dwc_common_port init
[    1.911137] Initializing USB Mass Storage driver...
[    1.918132] usbcore: registered new interface driver usb-storage
[    1.926016] USB Mass Storage support registered.
[    1.932579] usbcore: registered new interface driver libusual
[    1.940489] mousedev: PS/2 mouse device common for all mice
[    1.948710] bcm2835-cpufreq: min=700000 max=700000 cur=700000
[    1.956470] bcm2835-cpufreq: switching to governor powersave
[    1.963942] bcm2835-cpufreq: switching to governor powersave
[    1.971383] cpuidle: using governor ladder
[    1.977236] cpuidle: using governor menu
[    1.982884] sdhci: Secure Digital Host Controller Interface driver
[    1.990807] sdhci: Copyright(c) Pierre Ossman
[    1.996962] sdhci: Enable low-latency mode
[    2.046181] mmc0: SDHCI controller on BCM2708_Arasan [platform] using platform's DMA
[    2.057624] mmc0: BCM2708 SDHC host at 0x20300000 DMA 2 IRQ 77
[    2.067489] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.080753] usbcore: registered new interface driver usbhid
[    2.088300] usbhid: USB HID core driver
[    2.098718] TCP: cubic registered
[    2.106153] Indeed it is in host mode hprt0 = 00021501
[    2.115319] Initializing XFRM netlink socket
[    2.122958] NET: Registered protocol family 17
[    2.146102] Key type dns_resolver registered
[    2.152538] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    2.177031] registered taskstats version 1
[    2.206512] Waiting for root device /dev/mmcblk0p2...
[    2.215839] mmc0: read SD Status register (SSR) after 2 attempts
[    2.239559] mmc0: new high speed SDHC card at address 8d82
[    2.248897] mmcblk0: mmc0:8d82 SE16G 14.6 GiB 
[    2.256913]  mmcblk0: p1 p2
[    2.366049] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.377387] Indeed it is in host mode hprt0 = 00001101
[    2.519408] EXT4-fs (mmcblk0p2): recovery complete
[    2.529128] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.541186] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.550203] devtmpfs: mounted
[    2.555632] Freeing init memory: 128K
[    2.596362] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[    2.605233] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.616641] hub 1-1:1.0: USB hub found
[    2.622951] hub 1-1:1.0: 3 ports detected
[    2.906259] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.016689] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.025782] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.046374] smsc95xx v1.0.4
[    3.120873] smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:f3:a2:da
[    3.246357] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
[    3.368476] usb 1-1.2: New USB device found, idVendor=05e3, idProduct=0605
[    3.385556] usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    3.406062] usb 1-1.2: Product: USB2.0 Hub
[    3.420683] hub 1-1.2:1.0: USB hub found
[    3.436500] hub 1-1.2:1.0: 4 ports detected
[    3.736494] usb 1-1.2.1: new low-speed USB device number 5 using dwc_otg
[    3.869462] usb 1-1.2.1: New USB device found, idVendor=05af, idProduct=0301
[    3.882903] usb 1-1.2.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.922308] input: HID 05af:0301 as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.1/1-1.2.1:1.0/input/input0
[    3.942780] hid-generic 0003:05AF:0301.0001: input,hidraw0: USB HID v1.10 Keyboard [HID 05af:0301] on usb-bcm2708_usb-1.2.1/input0
[    3.962642] udevd[142]: starting version 175
[    4.022539] input: HID 05af:0301 as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.1/1-1.2.1:1.1/input/input1
[    4.065257] hid-generic 0003:05AF:0301.0002: input,hidraw1: USB HID v1.10 Device [HID 05af:0301] on usb-bcm2708_usb-1.2.1/input1
[    4.196414] usb 1-1.2.2: new low-speed USB device number 6 using dwc_otg
[    4.321889] usb 1-1.2.2: New USB device found, idVendor=03f0, idProduct=2c24
[    4.345759] usb 1-1.2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.386060] usb 1-1.2.2: Product: HP USB Laser Mouse
[    4.393651] usb 1-1.2.2: Manufacturer: HP
[    4.441911] input: HP HP USB Laser Mouse as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2:1.0/input/input2
[    4.496623] hid-generic 0003:03F0:2C24.0003: input,hidraw2: USB HID v1.10 Mouse [HP HP USB Laser Mouse] on usb-bcm2708_usb-1.2.2/input0
[    5.236284] bcm2708_spi bcm2708_spi.0: master is unqueued, this is deprecated
[    5.386089] spi spi0.0: setup: want 500000 Hz; bus_hz=250000000 / cdiv=500 == 500000 Hz; mode 0: cs 0x00000000
[    5.386124] spi spi0.0: setup: cd 0: 500000 Hz, bpw 8, mode 0x0 -> CS=00000000 CDIV=01f4
[    5.386304] spi spi0.1: setup: want 500000 Hz; bus_hz=250000000 / cdiv=500 == 500000 Hz; mode 0: cs 0x00000001
[    5.386330] spi spi0.1: setup: cd 1: 500000 Hz, bpw 8, mode 0x0 -> CS=00000001 CDIV=01f4
[    5.386440] bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80)
[    5.557594] Registered led device: led0
[    9.378928] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    9.801980] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   10.656884] fbtft_device: Deleting spi0.0
[   10.674040] spi spi0.0: setup: want 32000000 Hz; bus_hz=250000000 / cdiv=8 == 31250000 Hz; mode 0: cs 0x00000000
[   10.674073] spi spi0.0: setup: cd 0: 32000000 Hz, bpw 8, mode 0x0 -> CS=00000000 CDIV=0008
[   11.761744] graphics fb1: sainsmart18fb frame buffer, 40 KiB video memory, 4 KiB buffer memory, fps=50, spi0.0 at 32 MHz
[   19.621089] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[   23.002992] Adding 102396k swap on /var/swap.  Priority:-1 extents:1 across:102396k SS
and this is dir /dev/fb*

Code: Select all

/dev/fb0  /dev/fb1

cmegens
Posts: 28
Joined: Fri May 24, 2013 12:23 pm
Location: Netherlands

Re: 1.8 TFT LCD add-on shield board v2

Mon Jun 17, 2013 2:57 pm

Any ideas?

texy
Forum Moderator
Forum Moderator
Posts: 5151
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 1.8 TFT LCD add-on shield board v2

Mon Jun 17, 2013 5:41 pm

cmegens wrote:Any ideas?
Sorry about the delay. Are you saying that you can't get the boot up console showing on the TFT in any circumstances, or when you also have the hdmi monitor/tv connected at the same time?

Just to confirm, to enable the TFT permanently you need to edit the /etc/modules file with

Code: Select all

sudo nano /etc/modules
and add the following 2 lines

Code: Select all

fbtft_device name=sainsmart18fb verbose=0 speed=32000000 fps=50
sainsmart18fb
If you want the console to be shown on the TFT instead of the hdmi output you need to edit the /boot/cmdline.txt file with

Code: Select all

sudo nano /boot/cmdline.txt
and add at the end of the line

Code: Select all

fbcon=map:10 fbcon=rotate:1 fbcon=font:ProFont6x11
Note it is important that you add the above on the end of the existing line, not a new line underneath. You have other fonts choices - MINI4x6 works well on this screen.

Hope this helps,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

cmegens
Posts: 28
Joined: Fri May 24, 2013 12:23 pm
Location: Netherlands

Re: 1.8 TFT LCD add-on shield board v2

Tue Jun 18, 2013 11:43 am

Note it is important that you add the above on the end of the existing line, not a new line underneath. You have other fonts choices - MINI4x6 works well on this screen.
I did all of the things you mentioned, but I think I may have made a new line. Will check tonight. Thanks!

startreksteve
Posts: 44
Joined: Tue Mar 13, 2012 10:23 am

Re: 1.8 TFT LCD add-on shield board v2

Tue Jun 18, 2013 7:02 pm

What fonts are available? and what are the size options?
I want to get the most text possible on screen.
Steve

Return to “Other projects”