Go to advanced search

by notro
Sun Feb 03, 2013 11:21 pm
Forum: Other projects
Topic: LCD circuit
Replies: 27
Views: 9023

Re: LCD circuit

I couldn't find a datasheet for the module on that page, but lets go through the pinout: * DB00-DB17 - Data bus. To use it with the PI you have to short R7 to enable 8-bit mode because the PI doesn't have that many pins. Looking at the ILI9325 datasheet 7.2. Input Interfaces, it seems DB10-17 is the...
by notro
Sun Feb 03, 2013 4:16 pm
Forum: Other projects
Topic: TFT LCD from a industrial SCB
Replies: 1
Views: 963

Re: TFT LCD from a industrial SCB

The first problem is that there isn't enough gpios on the PI. 18 bit databus + 4 control pins is more than what is available. I don't know if the databus could be configured to say RGB565 and then there would be enough pins. The next problem would be the video driver. It is not trivial to write such...
by notro
Sun Feb 03, 2013 3:25 pm
Forum: Other projects
Topic: LCD circuit
Replies: 27
Views: 9023

Re: LCD circuit

Where did you buy it? There are many of these small display modules which may have the same LCD and controller, but the pinout is different or not all pins are brought out to the header. Some controllers support both serial (SPI) and parallell interface, but only one is available on the module. One ...
by notro
Sun Feb 03, 2013 11:51 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 242
Views: 146484

Re: SPI driver latency and a possible solution

I've tried to write a generic SPI device explorer but other things needed more attention I've just done some work on adding and removing SPI devices at runtime. I'm developing a framework for small LCD displays, and needed an easy way to change SPI devices when testing different settings. First I w...
by notro
Tue Jan 29, 2013 1:39 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI 9-bit support, call for testing
Replies: 18
Views: 5563

SPI 9-bit support, call for testing

I have made a patch to enable 9-bit support using the SPI Controller LoSSI mode. I would be grateful if someone tested the patch on a project to see if it breaks anything. Here is the patch/Pull Request: https://github.com/raspberrypi/linux/pull/202 Here is the patched version: https://github.com/no...
by notro
Tue Jan 29, 2013 5:10 am
Forum: Other projects
Topic: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart 1.8
Replies: 33
Views: 13687

Re: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart

BTW; as the Sainsmart use a ST7735R, your driver should also be able to run the Adafruit 1.8" I just remembered that the Sainsmart display was configured BGR instead of RGB. The colors were wrong, so I had to do a conversion. So even if they have the same controller, they are configured differently...
by notro
Mon Jan 28, 2013 10:11 pm
Forum: Other projects
Topic: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart 1.8
Replies: 33
Views: 13687

Re: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart

The Adafruit 2.2" uses 9-bit SPI, so D/C is the 9nth bit. But to get it to work on the rPi, the SPI controller must be patched as mentioned in the post. This is my patched version: https://github.com/notro/linux/blob/LoSSI/drivers/spi/spi-bcm2708.c When wiring, can they share any pins on the GPIO? W...
by notro
Mon Jan 28, 2013 4:25 pm
Forum: Other projects
Topic: Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart 1.8
Replies: 33
Views: 13687

Linux Framebuffer Driver for Adafruit 2.2" and Sainsmart 1.8

I have written a kernel module that simplifies writing drivers for many small TFT LCD display modules. Currently two displays are supported (both SPI): * Adafruit 2.2" [1] * Sainsmart 1.8" Project page: https://github.com/notro/fbtft Here's a video: http://youtu.be/0vfDifIU7gw I have a ordered an IT...
by notro
Sun Jan 20, 2013 6:29 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to enable SPI Controller Bidirectional mode (SPI_3WIRE)?
Replies: 8
Views: 7211

Re: How to enable SPI Controller Bidirectional mode (SPI_3WI

I tried adding this patch, but it didn't work. Very hard to look more into this without a SPI protocol analyzer. Dropping this for now, but Bus Pirate by Sparkfun may come in handy if I decide to try again later: diff --git a/drivers/spi/spi-bcm2708.c b/drivers/spi/spi-bcm2708.c index 200b49e..00f21...
by notro
Fri Jan 18, 2013 12:06 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to enable SPI Controller Bidirectional mode (SPI_3WIRE)?
Replies: 8
Views: 7211

Re: How to enable SPI Controller Bidirectional mode (SPI_3WI

You should be able to set the REN bit to read per 10.2.2 of the Broadcom Raspberry Pi document. Thank you so much, I have read that section a couple of times, thinking I didn't understanding what it said. What tricked me was that REN is 0x1 on reset, meaning it is in receive mode. Also the wording ...
by notro
Thu Jan 17, 2013 7:33 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to enable SPI Controller Bidirectional mode (SPI_3WIRE)?
Replies: 8
Views: 7211

Re: How to enable SPI Controller Bidirectional mode (SPI_3WI

Looking at the code, this calls the spidev ioctl with SPI_3WIRE set. Walking the kernel sources should let you see what register configuration this requires. The spidev ioctl then calls spi_setup()[1] in spi.c which calls bcm2708_spi_setup() which calls bcm2708_setup_state in spi-bcm2708.c[2]. My p...
by notro
Thu Jan 17, 2013 5:56 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to enable SPI Controller Bidirectional mode (SPI_3WIRE)?
Replies: 8
Views: 7211

Re: How to enable SPI Controller Bidirectional mode (SPI_3WI

The Sainsmart LCD module[1] uses a ST7735R display controller. Looking at the datasheet[2] it states that the SDA pin is used as input and output. According to http://www.whence.com/rpi/ there is no levelshifter that would mess up this functionality. What I'm after is reading RDDID as described in: ...
by notro
Thu Jan 17, 2013 2:56 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to enable SPI Controller Bidirectional mode (SPI_3WIRE)?
Replies: 8
Views: 7211

How to enable SPI Controller Bidirectional mode (SPI_3WIRE)?

The Pi datasheet[1] states that the SPI controller supports Bidirectional mode. The problem is that I can't find how to enable this. All I find in the datasheet is the REN (Read Enable) register which decides the direction of the bus line. I need this so I can read from a 8-bit LCD module (Sainsmart...
by notro
Fri Nov 30, 2012 11:30 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Need help to determine max SPI speed from datasheet
Replies: 6
Views: 9011

Re: Need help to determine max SPI speed from datasheet

Just for the record. I was wrong about the minimum speed. hx8340fb spi0.0: setup: want 4000 Hz; bus_hz=250000000 / cdiv=0 == 0 Hz; mode 3: cs 0x0000200C hx8340fb spi0.0: setup: want 8000 Hz; bus_hz=250000000 / cdiv=32768 == 7629 Hz; mode 3: cs 0x0000200C So here's the available speeds: cdiv speed 2 ...
by notro
Fri Nov 30, 2012 1:36 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Need help to determine max SPI speed from datasheet
Replies: 6
Views: 9011

Re: Need help to determine max SPI speed from datasheet

I tried 62.5 MHz hx8340fb spi0.0: setup: want 64000000 Hz; bus_hz=250000000 / cdiv=4 == 62500000 Hz; mode 3: cs 0x0000200C Now the display didn't work. So I have 2 alternatives: 32 or 16 MHz. Worst case scenario: The most significant bit is flipped in a transfer, it turns a data byte into a command....
by notro
Fri Nov 30, 2012 12:32 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Need help to determine max SPI speed from datasheet
Replies: 6
Views: 9011

Re: Need help to determine max SPI speed from datasheet

Thanks for drawing my attention to the "power of two" fact. With DEBUG enabled in spi-bcm2708.c I get this in dmesg: hx8340fb spi0.0: setup: want 20000000 Hz; bus_hz=250000000 / cdiv=16 == 15625000 Hz; mode 3: cs 0x0000200C Here I ask for 20 MHz, but I only get 15.6 MHz. I thought I was at a higher ...
by notro
Thu Nov 29, 2012 6:01 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Need help to determine max SPI speed from datasheet
Replies: 6
Views: 9011

Need help to determine max SPI speed from datasheet

I have ported the st7735fb driver to the hx8340bn based Adafruit 2.2" 18-bit color TFT LCD display. I need help to find out how fast I can go with this controller. HX8340bn datasheet: ftp://imall.iteadstudio.com/IM120419002_ITDB02_2.2SP/DS_HX8340-B_N.pdf Section 11.7.3 Serial Interface Characteristi...

Go to advanced search