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

Re: HY28A-LCDB, ili9320

Tue Jun 11, 2013 9:18 pm

Hi,
the display is good, but I can't get the touchscreen to work at the moment. I need to check the wiring, but enough for tonight.
It's also possible that I messed up the kernel compile (not enabling something that I should of done).
Any touch-screen related commands or checks I can make to ensure the compile and environment is OK?
For one thing how do you install the test app evtest, as it isn't on my system.

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: HY28A-LCDB, ili9320

Tue Jun 11, 2013 9:43 pm

texy wrote: the display is good, but I can't get the touchscreen to work at the moment. I need to check the wiring, but enough for tonight.
It's also possible that I messed up the kernel compile (not enabling something that I should of done).
Any touch-screen related commands or checks I can make to ensure the compile and environment is OK?
When it doesn't work for me, it's always the wrong gpio_pendown
Put a LED on the IRQ and see if it lights up when you touch the display.
With debug=2 you get to see more info in the log.

Code: Select all

sudo dmesg -C
sudo modprobe ads7846_test debug=2 cs=1 speed=2000000 model=7846 x_plate_ohms=60 pressure_max=255 gpio_pendown=17 keep_vref_on=1

dmesg
ads7846_test: ads7846_init()
ads7846_test spi0.1: touchscreen, irq 187
input: ADS7846 Touchscreen as /devices/platform/bcm2708_spi.0/spi_master/spi0/spi0.1/input/input17
ads7846_test spi0.1: ignored 0 pressure 402
ads7846_test spi0.1: DOWN
ads7846_test spi0.1: 1807/2017/ 200
ads7846_test spi0.1: 1871/2076/ 238
ads7846_test spi0.1: 1792/2032/ 221
ads7846_test spi0.1: ignored 0 pressure 378
ads7846_test spi0.1: UP
texy wrote: For one thing how do you install the test app evtest, as it isn't on my system.

Code: Select all

sudo apt-get install evtest
I have begun documenting this display: https://github.com/notro/fbtft/wiki/LCD-Modules#hy28a

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

Re: HY28A-LCDB, ili9320

Tue Jun 11, 2013 9:52 pm

Thanks notro - I will try that tomorrow. However I do know that dmesg did not show any additions when sudo modprobe ads784)_test....etc was entered. It seems modprobe is dumb if it is not fully valid.
Perhaps that ads module did not compile?
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: HY28A-LCDB, ili9320

Tue Jun 11, 2013 11:32 pm

texy wrote:Thanks notro - I will try that tomorrow. However I do know that dmesg did not show any additions when sudo modprobe ads784)_test....etc was entered. It seems modprobe is dumb if it is not fully valid.
Perhaps that ads module did not compile?
Texy
You're sure the module is not already loaded? modprobe doesn't do anything if the module is already loaded. The --first-time modprobe argument overrides this behaviour.

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

Re: HY28A-LCDB, ili9320

Wed Jun 12, 2013 5:11 am

No, this is after a reboot and yet isn't in /etc/modules
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: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: HY28A-LCDB, ili9320

Wed Jun 12, 2013 6:37 am

After the modprobe ads , if I do

Code: Select all

dmesg | grep ads
I get

Code: Select all

ads7846_test: spi_busnum_to_master(0) returned NULL

Was there anything specific to the touchscreen driver I needed to do for the kernel compile sequence because I can't remember doing anything?

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: HY28A-LCDB, ili9320

Wed Jun 12, 2013 8:53 am

texy wrote:
After the modprobe ads , if I do

Code: Select all

dmesg | grep ads
I get

Code: Select all

ads7846_test: spi_busnum_to_master(0) returned NULL
I get this when spi_bcm2708 is not loaded. What it says. is that there is no SPI Bus Master for bus number 0.
https://github.com/notro/fbtft/blob/mas ... st.c#L1592

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

Re: HY28A-LCDB, ili9320

Wed Jun 12, 2013 9:06 am

notro wrote:
texy wrote:
After the modprobe ads , if I do

Code: Select all

dmesg | grep ads
I get

Code: Select all

ads7846_test: spi_busnum_to_master(0) returned NULL
I get this when spi_bcm2708 is not loaded. What it says. is that there is no SPI Bus Master for bus number 0.
https://github.com/notro/fbtft/blob/mas ... st.c#L1592
I,m not sure why that would be. Does it make sense that the display is working, but not the touch screen if spi_bcm2708 is not loaded?
Does the touchscreen driver need loading before the display driver? So for example, /etc/modules would need the drivers loaded in the correct sequence?
In any case spi_bcm2708 is first in line, but so far I have only manually loaded the ads7846 driver (after the boot up sequence obviously).

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: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: HY28A-LCDB, ili9320

Wed Jun 12, 2013 7:50 pm

OK. So I spent some more time on this. Fairly sure I messed up the compile yesterday as although the screen worked OK, I could not get the touchscreen working.
Earlier this evening I recompiled using Notro's quick version when using a system with fbtft already installed and working - see this age :
https://github.com/notro/fbtft/wiki/Development

However one thing not mentioned on the page is the menconfig options.
Does spidev need binding to bcm2708 ?

Code: Select all

scripts/kconfig/conf --silentoldconfig Kconfig
*
* Restart config...
*
*
* Broadcom BCM2708 Implementations
*
Broadcom BCM2708 Development Platform (MACH_BCM2708) [Y/?] y
  BCM2708 gpio support (BCM2708_GPIO) [Y/n/?] y
  Videocore Memory (BCM2708_VCMEM) [Y/n/?] y
  Videocore L2 cache disable (BCM2708_NOL2CACHE) [N/y/?] n
  BCM2708 DMA helper (BCM2708_DMAER) [M/n/y/?] m
  Bind spidev to SPI0 master (BCM2708_SPIDEV) [Y/n/?] (NEW)
I,m on hold until I get an answer, lol
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: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: HY28A-LCDB, ili9320

Wed Jun 12, 2013 9:48 pm

All sorted now. The answer is yes to the binding question.
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
topogigio
Posts: 38
Joined: Fri May 10, 2013 1:35 am

Re: HY28A-LCDB, ili9320

Wed Jun 12, 2013 11:45 pm

notro wrote:
topogigio wrote: could you tell me how to compile, link and link to kernel to use driver as FB.
Follow this guide: https://github.com/notro/fbtft/wiki/Development
Then you don't have to rebuild the kernel.

Hi,
I follow your link.
in section Preparation the 1st and 2nd line says that
/home/pi/extra/.config file does not exist.
I check it and "extra" folder does not exist.
What I miss?
thanks

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

Re: HY28A-LCDB, ili9320

Thu Jun 13, 2013 1:15 am

Did you start with a os downloaded from Notro's GitHub page?
I'm guessing it will not work if you start with a raspbian wheezy
Downloaded from pi.org.
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
topogigio
Posts: 38
Joined: Fri May 10, 2013 1:35 am

Re: HY28A-LCDB, ili9320

Thu Jun 13, 2013 8:27 am

Hi texy,
From an image downloaded from pi.org
There are a lot of software installed. I would like to use it avoiding reinstall.
Anyway send me the link to notro's page.
Thanks

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

Re: HY28A-LCDB, ili9320

Thu Jun 13, 2013 9:04 am

topogigio wrote: Follow this guide: https://github.com/notro/fbtft/wiki/Development
Then you don't have to rebuild the kernel.

Hi,
I follow your link.
in section Preparation the 1st and 2nd line says that
/home/pi/extra/.config file does not exist.
I check it and "extra" folder does not exist.
What I miss?
thanks
The third line on that Developement pages states:
> Boot with latest FBTFT image.

You have to use the FBTFT image, which is the same as the previous one on pi org, except for a different kernel and the extras folder.
Here you can see what changes I do to the official image: https://github.com/notro/fbtft/wiki/FBT ... cess#image

Download image: https://github.com/notro/fbtft/wiki

I'm planning to release a new image on Friday, if it passes the tests.

User avatar
topogigio
Posts: 38
Joined: Fri May 10, 2013 1:35 am

Re: HY28A-LCDB, ili9320

Thu Jun 13, 2013 8:29 pm

ok,
now Preparation passed
I must pass through
Example driver: hellofb
or skip it to
Configure
Thanks

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

Re: HY28A-LCDB, ili9320

Thu Jun 13, 2013 8:39 pm

You don't need to bother with hellofb - its just an example if you want to try your own driver.
So skip that section.

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
topogigio
Posts: 38
Joined: Fri May 10, 2013 1:35 am

Re: HY28A-LCDB, ili9320

Thu Jun 13, 2013 10:39 pm

texy,
that's the results of dmesg
[12419.043484] fbtft_device: SPI devices registered:
[12419.043527] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
[12419.043539] fbtft_device: 'fb' Platform devices registered:
[12419.043560] fbtft_device: bcm2708_fb id=-1 pdata? no
[12419.046801] fbtft_device: GPIOS used by 'hy28afb':
[12419.046834] fbtft_device: 'reset' = GPIO25
[12419.046845] fbtft_device: 'led' = GPIO18
[12419.046854] fbtft_device: SPI devices registered:
[12419.046869] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
[12419.046881] fbtft_device: hy28afb spi0.0 32000kHz 8 bits mode=0x03

sudo FRAMEBUFFER=/dev/fb1 startx
doesn't start gui on hy28a but still on hdmi
Any suggestions?
Thanks

User avatar
topogigio
Posts: 38
Joined: Fri May 10, 2013 1:35 am

Re: HY28A-LCDB, ili9320

Thu Jun 13, 2013 10:45 pm

Texy,
do I must connect the led cable GPIO18 too?
Bye

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

Re: HY28A-LCDB, ili9320

Fri Jun 14, 2013 8:16 am

topogigio wrote:texy,
that's the results of dmesg
[12419.043484] fbtft_device: SPI devices registered:
[12419.043527] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
[12419.043539] fbtft_device: 'fb' Platform devices registered:
[12419.043560] fbtft_device: bcm2708_fb id=-1 pdata? no
[12419.046801] fbtft_device: GPIOS used by 'hy28afb':
[12419.046834] fbtft_device: 'reset' = GPIO25
[12419.046845] fbtft_device: 'led' = GPIO18
[12419.046854] fbtft_device: SPI devices registered:
[12419.046869] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
[12419.046881] fbtft_device: hy28afb spi0.0 32000kHz 8 bits mode=0x03

sudo FRAMEBUFFER=/dev/fb1 startx
doesn't start gui on hy28a but still on hdmi
Any suggestions?
Thanks
So that looks like the display is configured correctly :)
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: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: HY28A-LCDB, ili9320

Fri Jun 14, 2013 8:18 am

topogigio wrote:Texy,
do I must connect the led cable GPIO18 too?
Bye
I do not believe backlight is implemented yet in fbtft. You do not need to connect it in order for the display to work, but for future use, I would wire it in.
So as fbtft appears to be correctly configured for HY28A, I would check the hard wiring is correct.
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: HY28A-LCDB, ili9320

Fri Jun 14, 2013 8:50 am

topogigio wrote:texy,
that's the results of dmesg
[12419.043484] fbtft_device: SPI devices registered:
[12419.043527] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
[12419.043539] fbtft_device: 'fb' Platform devices registered:
[12419.043560] fbtft_device: bcm2708_fb id=-1 pdata? no
[12419.046801] fbtft_device: GPIOS used by 'hy28afb':
[12419.046834] fbtft_device: 'reset' = GPIO25
[12419.046845] fbtft_device: 'led' = GPIO18
[12419.046854] fbtft_device: SPI devices registered:
[12419.046869] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
[12419.046881] fbtft_device: hy28afb spi0.0 32000kHz 8 bits mode=0x03

sudo FRAMEBUFFER=/dev/fb1 startx
doesn't start gui on hy28a but still on hdmi
Any suggestions?
Thanks
This is only the output of fbtft_device, the module that registers the device. I don't see any output from the hy28afb driver/module.

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

Re: HY28A-LCDB, ili9320

Fri Jun 14, 2013 8:58 am

texy wrote:
topogigio wrote:Texy,
do I must connect the led cable GPIO18 too?
Bye
I do not believe backlight is implemented yet in fbtft. You do not need to connect it in order for the display to work, but for future use, I would wire it in.
So as fbtft appears to be correctly configured for HY28A, I would check the hard wiring is correct.
Texy
fbtft has on/off backlight control built in: https://github.com/notro/fbtft/wiki/Backlight
BUT, sainsmart18fb, did not use it. It is fixed in the the next release. The reason it didn't, is because the Sainsmart 1.8 display doesn't expose the backlight on the header. But nowadays many displays use this driver, so I added it.
Brightness can be controlled using Wiring Pi.

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

Re: HY28A-LCDB, ili9320

Fri Jun 14, 2013 9:03 am

OK - thanks for the clarification Notro.
Note that I found that the HY28A display backlight is on by default if it is not wired to the Pi. Now I have wired it, but not played with on, off or pwm yet.
Something else to try ;)

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: HY28A-LCDB, ili9320

Fri Jun 14, 2013 3:42 pm

Image is updated with HY28A support: https://github.com/notro/fbtft/wiki

User avatar
topogigio
Posts: 38
Joined: Fri May 10, 2013 1:35 am

Re: HY28A-LCDB, ili9320

Fri Jun 14, 2013 8:18 pm

Hi notro,
I loaded your new 2013-06-14 image on SD and now what I must do to start x. :)
Thanks

Return to “Other projects”