guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Tue Sep 03, 2013 10:29 am

Thans for the clarification notro, I figured it was something like that, but I did not want to offer best guesses.

@bob_binz, some more thoughts......

I assume you ran the test core on your newer Guzunty and that it is oscillating all its pins as expected, right?

There is nothing much to go wrong with the daughter board. It is just an adapter really, but I want to check that you did put the 2x20 header on the underside and not on top. I only ask because I did this myself with one of the prototypes, though I don't recall what the symptoms were (I suspect the display would not even start up). If you did happen to do this, don't panic, my display survived and there is a workaround you can do with the ribbon cable.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

User avatar
bob_binz
Posts: 373
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Tue Sep 03, 2013 11:09 am

<EDIT due to spotting reply from guzunty - will answer that first>
Yes, test core worked fine. I've also used the new guzunty to drive my old screen, and that works fine too, so no issue with that board. I agree with the daughter board comment, not a lot to go wrong and I have the 40way header on the correct side. See below for more "waffle".



I've rebuilt a new kernel and modules with up to date code and still have lines. I'm still not convinced that it isn't a "noise" issue though, although the lines are extremely consistent. Maybe I'll contact the vendor and see what they say.

On a side note, a dumb question: I noticed that the touch screen module has moved to the fbtft_tools repo now and is thus not built through the kernel menu. How do I build and install this now? I always cross compile the kernel on my Ubuntu box. When I tried running make on the RPi in the ads7846_device folder, I receive the following error:

Code: Select all

make -C /lib/modules/3.6.11+/build M=/home/steve/src/notro/fbtft_tools/ads7846_device modules
make[1]: Entering directory `/home/steve/nfsimport/linux'
  CC [M]  /home/steve/src/notro/fbtft_tools/ads7846_device/ads7846_device.o
scripts/basic/fixdep: 1: scripts/basic/fixdep: Syntax error: end of file unexpected (expecting ")")
make[2]: *** [/home/steve/src/notro/fbtft_tools/ads7846_device/ads7846_device.o] Error 2
make[1]: *** [_module_/home/steve/src/notro/fbtft_tools/ads7846_device] Error 2
make[1]: Leaving directory `/home/steve/nfsimport/linux'
make: *** [all] Error 2
I've seen this in the past and I think it's to do with the fact that the scripts that are made on the Ubuntu box when making the kernel aren't compatible with the RPi (I think, if you build a fresh kernel on the Pi, these scripts are remade and they work fine; however, I don't want the kernel source on the Pi - I'm happy with it symlinked to the Ubuntu NFS share.)

Anyway, I have built the kernel module by cross compile, copied the generated files across to the Pi and tried make install, but it doesn't install the driver. So, what am I doing wrong?

Thanks for the help.
Last edited by bob_binz on Tue Sep 03, 2013 11:20 am, edited 1 time in total.

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Tue Sep 03, 2013 11:15 am

Can't help with the build issue, I'm afraid. I have not seen this problem.

On the noise question, that did occur to me. I have not used a 30cm ribbon before, mine is about half that.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

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

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Tue Sep 03, 2013 12:31 pm

bob_binz wrote: Anyway, I have built the kernel module by cross compile, copied the generated files across to the Pi and tried make install, but it doesn't install the driver. So, what am I doing wrong?
I don't have much experience with kernel building, but can't you just copy ads7846_device.ko to /lib/modules/.../extra/ and then run sudo depmod?

User avatar
bob_binz
Posts: 373
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Tue Sep 03, 2013 12:58 pm

notro wrote:
bob_binz wrote: Anyway, I have built the kernel module by cross compile, copied the generated files across to the Pi and tried make install, but it doesn't install the driver. So, what am I doing wrong?
I don't have much experience with kernel building, but can't you just copy ads7846_device.ko to /lib/modules/.../extra/ and then run sudo depmod?
Yep, that does it. Wasn't aware of the "extra" folder. Thanks

beruic
Posts: 28
Joined: Sun Jan 29, 2012 1:37 pm

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Fri Sep 06, 2013 12:05 pm

I am completely noob with this kind of hardware. Can anyone tell me wht the SainSmart 3.2" SSD1289 has a MicroSD socket?

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Fri Sep 06, 2013 12:11 pm

Yes, it does.

I not aware of anyone having hooked it up to the RPi file system, but I'm sure it is possible to do so, so long as the module header signals are hooked up.

D.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

beruic
Posts: 28
Joined: Sun Jan 29, 2012 1:37 pm

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 6:49 am

guzunty wrote:Yes, it does.

I not aware of anyone having hooked it up to the RPi file system, but I'm sure it is possible to do so, so long as the module header signals are hooked up.

D.
I meant to ask why it has a MicroSD socket, but I can see I misspelled it. So, why does it?

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 6:57 am

My apologies.

I misread your question It's not MicroSD, just normal SD.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

beruic
Posts: 28
Joined: Sun Jan 29, 2012 1:37 pm

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 7:34 am

Following http://www.sainsmart.com/arduino-compat ... -2560.html the SainSmart 3.2" SSD1289 has a MicroSD socket on the backside.

My question is not whether it has a socket, as I find that quite clearly established. It's more why it has that socket. what is it used for?
I have read something round the web, which indicates that it might be used for some sort of firmware, but I have not been able to find a conclusive confirmation on this.

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 8:21 am

@beruic The short answer is, the SD slot has no function on a Raspberry Pi.

Longer answer:

> It's more why it has that socket. what is it used for?
The SD socket has its signals brought out directly to the 40 pin header. It may be used for whatever purpose the user requires of it, assuming the host system can be wired to use those header signals. In the case of the RPi, you would need to do some kernel modifications to support mounting a filesystem on the SD card. Even more modifications are needed if you require both touch screen and SD access. I'd be happy to set out at a high level what kernel changes are needed, but I can tell you it would be an advanced project.

>I have read something round the web, which indicates that it might be used for some sort of firmware, but I have not been able to find a conclusive confirmation on this.
There is no firmware on the LCD module. This board is aimed at makers with lots of different host boards who are willing to do a little work to get it running. On a different host, it might be possible to boot from this slot, but the work required to access it on RPi is probably more than the usefulness the card adds.

Finally, I have one of these modules on the desk beside me as I write this, and I can tell you with 100% confidence that the slot on the module is for a normal SD card. The slot is very definitely not MicroSD, regardless of what the Sainsmart web page might say.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

beruic
Posts: 28
Joined: Sun Jan 29, 2012 1:37 pm

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 9:28 am

guzunty wrote: Finally, I have one of these modules on the desk beside me as I write this, and I can tell you with 100% confidence that the slot on the module is for a normal SD card. The slot is very definitely not MicroSD, regardless of what the Sainsmart web page might say.
That's really weird. Form the picture at the Sainsmart site, it also looks as a MicroSD. Perhaps you have an older revision, or their images are wrong.
In any case thanks for the detailed answer. I guess I shouldn't worry too much about this card slot, if I buy one of these for my pi :)

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 9:43 am

Pretty sure it's the same model, the current images on the Sainsmart website look identical to the model I have.

I tried to link an image, but the forum limits are too small to provide a useful image. I bought this just a couple months ago. I can see why you think it looks like a MicroSD slot, but I assure you it is not. The standard SD card is inserted from the short edge of the board, BTW. Trust me, I've actually tried one for fit.

Derek
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

User avatar
bob_binz
Posts: 373
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 10:01 am

I too have one and can confirm it's full size SD:

Image

beruic
Posts: 28
Joined: Sun Jan 29, 2012 1:37 pm

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 12:59 pm

Cool. Thanks for the info. Now I just need to figure out how it is to work with connected to a pi :)

iriseth
Posts: 20
Joined: Sat Aug 24, 2013 4:03 pm

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 8:47 pm

hi, I just wired my display like this, and I only see a white backlight but nothing else. tried with the newest sainsmart fbtft drivers, but no luck . do I need to wire other pins as well? any help is appreciated.

Display Driver gpio n raspi Raspberry Pi Remark
1 GND 6 GND
2 VCC 1 3.3V
4 RS dc 18 GPIO24 Command/data
17 RESET reset 22 GPIO25
19 LED-A led 17 3.3V Backlight draws ~50mA
- LED-A 4 5.0V Backlight draws >200mA
29 D_CLK 23 SCLK Touch controller
30 D_CS 26 CE1
31 D_DIN 19 MOSI
33 D_OUT 21 MISO
34 D_Penirq - GPIOxx

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 8:51 pm

Do you have D0 thru D15 hooked up to anything?
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

iriseth
Posts: 20
Joined: Sat Aug 24, 2013 4:03 pm

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 8:54 pm

I have just wired these I shown up. you meant DB0-DB15 I guess. I think I have not wired those and those could be the data buses am I right?

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 8:59 pm

They are indeed, and they are all required to operate the display.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

iriseth
Posts: 20
Joined: Sat Aug 24, 2013 4:03 pm

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 9:01 pm

may you happen to have a pin matching table? I highly appreciate if you can send it over in private (mjavor@mail.ie)
thank you!

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 9:09 pm

There are more pins on the display than there are GPIOs, so you need to build a simple SPI interface circuit.

Notro has one here:
https://github.com/notro/fbtft/wiki/SPI ... ce-circuit

or you can program my Guzunty design to do the job:
https://github.com/Guzunty/Pi/wiki/Gall ... lay-driver

HTH,

Derek
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

iriseth
Posts: 20
Joined: Sat Aug 24, 2013 4:03 pm

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 9:12 pm

THANK YOU!
so question: I guess i can associate any GPIOs with any of the DB data ports right? I just need to specify it in the module when loading.may you have a pin matching table? :)

thanks again,
regards,

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 9:22 pm

No, you can't connect the GPIO's directly. There are not enough pins on the Pi GPIO to complete the circuit.

Instead, you pass the video data on spi0.0. Hence you need to build a serial to parallel converter circuit as described on notro's site at the page I linked.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

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

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Mon Sep 09, 2013 11:05 pm

It is possible to hook up just the LCD using gpios.
The rev. 2 board has 17+4 gpios. The display needs 16db + RS(dc) + WR + RESET = 19. CS can be tied directly low.
But the touch controller can't be hooked up in this mode. There is not enough gpios as guzunty points out.

This is from my test script:

Code: Select all

sudo modprobe fbtft_device name=sainsmart32 gpios=reset:29,dc:2,wr:31,db00:11,db01:9,db02:10,db03:22,db04:27,db05:17,db06:4,db07:3,db08:7,db09:8,db10:25,db11:24,db12:23,db13:18,db14:14,db15:15

iriseth
Posts: 20
Joined: Sat Aug 24, 2013 4:03 pm

Re: Sainsmart 3.2" (SSD1289) framebuffer driver

Tue Sep 24, 2013 4:22 pm

notro wrote:It is possible to hook up just the LCD using gpios.
The rev. 2 board has 17+4 gpios. The display needs 16db + RS(dc) + WR + RESET = 19. CS can be tied directly low.
But the touch controller can't be hooked up in this mode. There is not enough gpios as guzunty points out.

This is from my test script:

Code: Select all

sudo modprobe fbtft_device name=sainsmart32 gpios=reset:29,dc:2,wr:31,db00:11,db01:9,db02:10,db03:22,db04:27,db05:17,db06:4,db07:3,db08:7,db09:8,db10:25,db11:24,db12:23,db13:18,db14:14,db15:15
@Notro, thanks, do you have a pin matching diagram for the "witout the touchscreen" version you specify above?
one more thing: do you happen to have a PCB diagram for SPI interface circuit? I have the necessary ic's I just want to be lazy not to design the pcb again. if you don't have, I will design it and I will share for the readers. THANK YOU!

Return to “Other projects”

Who is online

Users browsing this forum: No registered users and 21 guests