tsaG
Posts: 80
Joined: Thu Jun 26, 2014 1:30 pm

Re: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart

Fri Jun 27, 2014 2:32 pm

Hi,

I want to write a Framebuffer driver for the S6E63D6, the data sheet can be found here -> http://www.4dsystems.com.au/downloads/D ... EV1.10.pdf

But I struggle.. It already starts to find out the speed of the Display, is it 1290.2 kHz?
Is there an HowTo for writing the driver? As far as I understood I have to write an fb_s6e63d6.c like this one?
https://github.com/notro/fbtft/blob/master/fb_hx8353d.c

But how do I know how and what to write to init the display? :(
Im sorry, but this is quite new to me :D

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

Re: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart

Fri Jun 27, 2014 6:16 pm

You can probaly use the flexfb driver: https://github.com/notro/fbtft/wiki/fle ... 24-s6d1121
You can't use the fb_s6d1121 driver directly, because the Entry mode register 03h differs.

Usually the init sequence comes with the display as example code for some microcontroller.

You can always go faster than the speed mentioned in the datasheet. Start low and go as high as you can before you get distortions in the picture.

Do you have a link to the display product page?

tsaG
Posts: 80
Joined: Thu Jun 26, 2014 1:30 pm

Re: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart

Fri Jun 27, 2014 9:45 pm

Thank you for your fast reply.

It is this Display here
http://www.ebay.de/itm/181297639621?ssP ... 1497.l2649

Sadly it is the only OLED 2.2" Color display I could find, so Im stuck with this One. Also, it looks like there are no examples for it.

Here is another Website with a similar Display (just bigger)
http://www.wayengineer.com/28-full-colo ... 63mhH8aySM


Thanks in advance!

Patrick

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

Re: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart

Sat Jun 28, 2014 5:34 pm

I have found two identical init sequences for that controller:
http://www.tricorderproject.org/tricorder-mark2.html
Source files: http://www.tricorderproject.org/source/ ... source.zip
https://forum.sparkfun.com/viewtopic.php?t=10827

Code: Select all

R10h: 0x0000 (IC standby off)
R03h: 0x0030 (16-bit mode)
R05h: 0x0001 (Display on)
So maybe the default register values would work fine.
However, you have to find how to set the interface mode you want.

But I have no idea how you should wire it. Maybe you can glean something from the Tricorder schematics.

tsaG
Posts: 80
Joined: Thu Jun 26, 2014 1:30 pm

Re: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart

Sat Jun 28, 2014 6:34 pm

Thanks!

So, I can use the flexfb driver and it should work?

Im already trying to get the Adafruit 2.2" (new one) Display to work, but I only get a white display...

Do you know why?

here is my dmesg

Code: Select all

[    8.837273] fbtft_device:  SPI devices registered:
[    8.843790] fbtft_device:      spidev spi0.0 500kHz 8 bits mode=0x00
[    8.851802] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
[    8.859747] fbtft_device:  'fb' Platform devices registered:
[    8.866938] fbtft_device:      bcm2708_fb id=-1 pdata? no
[    8.873742] fbtft_device: Deleting spi0.0
[    8.882009] fbtft_device:  GPIOS used by 'adafruit22a':
[    8.904538] fbtft_device:    'reset' = GPIO25
[    8.910269] fbtft_device:    'dc' = GPIO24
[    8.918678] fbtft_device:    'led' = GPIO18
[    8.924240] fbtft_device:  SPI devices registered:
[    8.930315] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
[    8.944588] fbtft_device:      fb_ili9340 spi0.0 5000kHz 8 bits mode=0x00
[    9.699953] graphics fb1: fb_ili9340 frame buffer, 320x240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi0.0 at 5 MHz
Im using the driver with loadable modules and the latest raspberry. I started using the weezy minimal, updated everything , installed Xserver and xinit, then worked through your "fbtft installation guide" (https://github.com/notro/fbtft/wiki).

Im loading the module in /etc/modules
with

Code: Select all

fbtft_device name=adafruit22a rotate=90 speed=32000000
At bootup and manual module load (with mod probe) the display turns black and then white again (quickly).
It looks like con2fbmap isn't installed, so I was using Xorg

Code: Select all

FRAMEBUFFER=/dev/fb1 starts
But there is nothing, not even an error message, just the white display :(
Im running headless, just using SSH.

Relating the OLED. Everything hardwarish is no problem for me, Im more the hardware than software guy....

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

Re: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart

Sat Jun 28, 2014 7:02 pm

> So, I can use the flexfb driver and it should work?

It might work, it uses the same registers to set the GRAM area to be updated.
But I haven't worked with this controller, so I can't say for sure.


> At bootup and manual module load (with mod probe) the display turns black and then white again (quickly).

Probably the backlight being turned off/on briefly during probing.
A white display means it's not initialized. It should turn black (all pixels zero).
I guess you have seen this and wired accordingly? https://github.com/notro/fbtft/wiki/LCD ... dafruit-22
Have you connected reset? Some controllers won't work without a hardware reset.

The driver doesn't check to see if there's a controller connected, so the driver will always load.

tsaG
Posts: 80
Joined: Thu Jun 26, 2014 1:30 pm

Re: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart

Sat Jun 28, 2014 7:14 pm

Ha,

its working.... It was the MOSI Channel, I was using it as MISO :D

Okay, I'll contact you if there are new relating the S6e63d6 :)

Thank you!

kmillar82
Posts: 12
Joined: Sun Jun 29, 2014 10:42 am

Re: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart

Fri Jul 18, 2014 6:25 am

I happened to use your module today to get my ILI9341 SPI 2.2 working, I thought I was dead in the water, I used this link from your git wiki

http://marcosgildavid.blogspot.no/2014/ ... ng-on.html

could you detail the kernel module installation more clearly? Reason being I got it working, than did apt-get upgrade, and it stopped, and took me a bit to get it going again.

great work though!

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

Re: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart

Sun Jul 20, 2014 3:58 pm

I guess 'apt-get upgrade' also installed a kernel overwriting the FBTFT kernel.

This should get you back:

Code: Select all

sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update
sudo reboot

Return to “Other projects”