Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

TFT display vs. HDMI display. #190

Closed
ParanBada opened this issue Nov 25, 2014 · 13 comments
Closed

TFT display vs. HDMI display. #190

ParanBada opened this issue Nov 25, 2014 · 13 comments

Comments

@ParanBada
Copy link

Q1:
When Raspberry Pi Powered on,
It display on HDMI display for about 20 seconds,
and then it display on TFT.

If disconnect the HDMI display, It dons't display for about 20 seconds.
So, could I do display on TFT all from powered it on?

Q2:
I do run camera command as below.
raspistill -v -o test.jpg
raspivid -t 5000 -o video.h264

When run camera command(still cut, video record),
It display on HDMI display, So I want to display it on TFT LCD.
Let me know What can I do?

Q3:
Raspberry Pi's original display is HDMI.
Could I exchange the original display from HDMI to TFT LCD?
I think that this way is best solution.

Please advice me,
Thanks, SB

@notro
Copy link
Owner

notro commented Nov 28, 2014

Which FBTFT kernel or image do you use?

@ParanBada
Copy link
Author

I was port source code like this.
https://github.com/notro/fbtft/wiki/FBTFT-image-build-process

and then modified somthing like these.

  • Backlight port has been change from GPIO18 to GPIO23.
  • Changed the Initialize code at ~/linux/drivers/video/fbtft/fb_tinylcd.c
    because i use another new TFT LCD.

and then builed the kernel.

modules is loaded as below.
sudo nano /etc/modules
fbtft dma
fbtft_device name=tinylcd35 rotate=270 speed=16000000 fps=30
ads7846_device model=7843 gpio_pendown=4 pressure_max=255 x_plate_ohms=100 swap_xy=1 x_min=230 x_max=3850 y_min=190 y_max=3850 verbose=3

sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
Option "fbdev" "/dev/fb1" <-- It changed from fb0 to fb1

The end.

Thanks, SB.

@notro
Copy link
Owner

notro commented Dec 2, 2014

Q1:
When Raspberry Pi Powered on,
It display on HDMI display for about 20 seconds,
and then it display on TFT.

If disconnect the HDMI display, It dons't display for about 20 seconds.
So, could I do display on TFT all from powered it on?

The drivers need to be built into the kernel proper (kernel.img) to load as early as possible.
In menuconfig choose [*] (star) instead of [M] loadable module.

Q2:
I do run camera command as below.
raspistill -v -o test.jpg
raspivid -t 5000 -o video.h264

When run camera command(still cut, video record),
It display on HDMI display, So I want to display it on TFT LCD.
Let me know What can I do?

You can use fbcp: https://github.com/notro/fbtft/wiki/Framebuffer-use#framebuffer-mirroring

Q3:
Raspberry Pi's original display is HDMI.
Could I exchange the original display from HDMI to TFT LCD?
I think that this way is best solution.

If you mean the console:
Attach console to fb1 from boot: add to /boot/cmdline.txt: fbcon=map:10 (drop logo: logo.nologo)
Details: Documentation/fb/fbcon.txt

@ParanBada
Copy link
Author

About Q1;
In menuconfig chose [*] instead of [M],
But the situation is same. HDMI display for about 20 senconds, and then TFT LCD display it.
Furthermore, Touch is not work.

I want to disable the HDMI perfactly and All display just on TFT LCD.

@notro
Copy link
Owner

notro commented Dec 7, 2014

With fbtft_device and fb_tinylcd35 builtin, you specify the fbtft_device arguments on the kernel commandline, in /boot/cmdline.txt.
See: https://github.com/notro/rpi-firmware/wiki/branch:-builtin

Furthermore, Touch is not work.

Each time you touch the panel and interrupt is fired. Check /proc/interrupts and see if the ads7846 counter increases.

I want to disable the HDMI perfactly and All display just on TFT LCD.

If you completly remove /dev/fb0, I guess you can't get live feed from the camera, as this is displayed there.

Remove bcm_register_device(&bcm2708_fb_device); from arch/arm/mach-bcm2708/bcm2708.c and /dev/fb0 will be the TFT display instead.

@ParanBada
Copy link
Author

I already set like this;
nano /etc/modules

fbtft dma
fbtft_device name=tinylcd35 rotate=270 speed=16000000 fps=30

ads7846_device model=7843 gpio_pendown=4 pressure_max=255 x_plate_ohms=100 swap_xy=1 x_min=230 x_max=3850 y_min=190 y_max=3850 verbose=3

TFT LCD and Touch are work well,
But,,,,
As you know display on HDMI monitor first, and then display on TFT LCD.
If disconnect HDMI monitor, It display on TFT LCD after about 20 seconds.

My question is as below.
Can I just use TFT LCD only?
I want to that All display on TFT LCD from BOOT(from power connector insert into Pi).
Thanks,

@notro
Copy link
Owner

notro commented Dec 9, 2014

If you want the drivers to load early, they have to be built into the kernel proper (zImage/kernel.img) and not as loadable kernel modules.
The same goes for the SPI controller driver on which the FBTFT driver depends: spi_bcm2708.

This is a snapshot of menuconfig showing the modules configured as builtin (*-star) as opposed to loadable (M):

 > Device Drivers > SPI support
                    <*>   BCM2708 SPI controller driver (SPI0)
> Device Drivers > Graphics support > Support for small TFT LCD display modules

                    --- Support for small TFT LCD display modules
                    <*>   FB driver for the AGM1264K-FL LCD display
[...]
                    <*>   FB driver for tinylcd.com display
[...]
                    <*>   Module to for adding FBTFT devices

Backlight port has been change from GPIO18 to GPIO23.
Changed the Initialize code at ~/linux/drivers/video/fbtft/fb_tinylcd.c because i use another new TFT LCD.

You don't have to rebuild the kernel to do those changes unless your init sequence is very long.
You can use BRANCH=builtin from https://github.com/notro/fbtft/wiki#install and add this to /boot/cmdline.txt:

fbtft_device.name=tinylcd35 fbtft_device.rotate=270 fbtft_device.speed=16000000 fbtft_device.fps=30 fbtft_device.gpios=reset:25,dc:24,led:23 fbtft_device.init=-1,...,-3

Check /proc/cmdline after boot to see if all arguments could fit the 1024 character limit (the bootloader also adds some arguments).
For the init= format see: https://github.com/notro/fbtft/wiki/fbtft_device#parameters

@ParanBada
Copy link
Author

Thank you very much for your reply.

I installed RaspiMJPEG or MjpegStreamer on Raspberry Pi with TFT LCD worked.
But TFT LCD and HDMI display are all black, all display are not work,
TFT LCD and Mjpeg streaming are crashed. However I know that Raspberry Pi is work well because SSH is work well. TFT and HDMI are only not work.

Can you guess that what happend on that?

thanks, SB

@ParanBada
Copy link
Author

Refer to about RaspiMJPEG(=RPi Cam Web Interface);
http://www.raspberrypi.org/forums/viewtopic.php?f=43&t=63276&p=468491#p468491

How to Install;

sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update
git clone https://github.com/silvanmelchior/RPi_Cam_Web_Interface.git
cd RPi_Cam_Web_Interface
chmod u+x RPi_Cam_Web_Interface_Installer.sh
./RPi_Cam_Web_Interface_Installer.sh install

and then,
sudo shutdown -r now

All screen is black, however SSH is work fine.

@notro
Copy link
Owner

notro commented Dec 11, 2014

I don't know what's wrong here.

@ParanBada
Copy link
Author

I'm sorry,
It occured by update like these;
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo rpi-update

I found out the solution in your posting.
Like these;
#10

sudo apt-mark hold raspberrypi-bootloader
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install rpi-update
sudo SKIP_KERNEL=1 rpi-update

I'm sorry and Thanks,

@ParanBada
Copy link
Author

When take the picture(run MjpegStreamer or raspistill, raspivid command),
Picture display on HDMI display, I want to display on TFT LCD.

So I tried mirroring refer to your posting,
https://github.com/notro/fbtft/wiki/Framebuffer-use#framebuffer-mirroring

But It too slow, Picture quality is not good.

Rpi original display is HDMI, So I want to exchange the original display from HDMI to TFT LCD.
I'm looking for the solution about this.

Any idea?

@notro
Copy link
Owner

notro commented Dec 12, 2014

AFAIK the camera stills can only be viewed on HDMI because it's the GPU that does this work.
So the only way to get it on other framebuffers is to use fbcp.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants