Markdown source

#LCD pinouts and notes

<abstract>
Appunti sparsi sulle prove fatte finora con gli LCD
</abstract>

## Display 5 pollici cn touch capacitivo Rutronik

Campione di display LCD fornito da Rutronik. Prezzo USD 30 per 100 pz

* [Datasheet](./DLC0500HZG-T-7.pdf)

<img src="./lcd_5_pollici_rutronik.jpg" class="img-responsive center-block">

### Connessioni touch

| Lcd pin  | RoadRunner pin             |
|----------|----------------------------|
| 1 (GND)  | GND                        |
| 2 (SDA)  | PD4 with pull-up resistor  |
| 3 (CSL)  | PD5 with pull-up resistor  |
| 4 (VDD)  | 3V3                        |
| 5 (INT)  | PB7                        | 
| 6 (XRES) | N.C. with pull-up resistor |

### Definizione nel dts

	i2c1: i2c@fc028000 {
		dmas = <0>, <0>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c1_default>;
		status = "okay";

		/* Touchscreen chip FT5216 (I2C address 0x38) */

		focaltec_5216@38 {
			compatible = "edt,edt-ft5206";
			reg = <0x38>;
			interrupt-parent = <&pioA>;
			interrupts = <39 0x0>;
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_ft_irq>;
			status = "okay";
		};
	};
	
	pinctrl@fc038000 {
		/* Touch screen controller interrupt line */
		
		pinctrl_ft_irq: ft_irq {
			pinmux = <PIN_PB7__GPIO>;
			bias-pull-up;
			input-debounce = <1>;
		};
	};




## Wirings 

|DSP|Signals| Acqua | SAMA5D3 (Acqua) | SAMA5D2 (RoadRunner) |
|---|-------|-------|-----------------|----------------------|
| 1 | VLED- | GND   |                 |            |
| 2 | VLED+ | 23VDC |                 |            |
| 3 | GND   | GND   |                 |            |
| 4 | VDD   | 3VDC  |                 |            |
| 5 | R0    | J1.26 | LCD DAT16       |            |
| 6 | R1    | J1.25 | LCD DAT17       |            |
| 7 | R2    | J1.29 | LCD DAT18       |            |
| 8 | R3    | J1.27 | LCD DAT19       |            |
| 9 | R4    | J1.30 | LCD DAT20       |            |
| 10| R5    | J1.29 | LCD DAT21       |            |
| 11| R6    | J1.32 | LCD DAT22       |            |
| 12| R7    | J1.31 | LCD DAT23       |            |
| 13| G0    | J1.18 | LCD DAT8        |            |
| 14| G1    | J1.17 | LCD DAT9        |            |
| 15| G2    | J1.20 | LCD DAT10       |            |
| 16| G3    | J1.19 | LCD DAT11       |            |
| 17| G4    | J1.22 | LCD DAT12       |            |
| 18| G5    | J1.21 | LCD DAT13       |            |
| 19| G6    | J1.24 | LCD DAT14       |            |
| 20| G7    | J1.23 | LCD DAT15       |            |
| 21| B0    | J1.10 | LCD DAT0        |            |
| 22| B1    | J1.9  | LCD DAT1        |            |
| 23| B2    | J1.12 | LCD DAT2        |            |
| 24| B3    | J1.11 | LCD DAT3        |            |
| 25| B4    | J1.14 | LCD DAT4        |            |
| 26| B5    | J1.13 | LCD DAT5        |            |
| 27| B6    | J1.16 | LCD DAT6        |            |
| 28| B7    | J1.15 | LCD DAT7        |            |
| 29| DGND  | GND   |                 |            |
| 30| DCLK  | J1.36 | LCD PCK         |            |
| 31| DISP  | J1.33 | LCD DISP        |            |
| 32| HSYNC | J1.35 | LCD HSYNC       |            |
| 33| VSYNC | J1.38 | LCD VSYNC       |            |
| 34| DE    | J1.37 | LCD DEN         |            |
| 35| NC    |       |                 |            |
| 36| GND   | GND   |                 |            |
| 37| X_R   | J1.42 | AD0             | PD19       |
| 38| Y_B   | J1.41 | AD2             | PD20       |
| 39| X_L   | J1.43 | AD1             | PD21       |
| 40| Y_T   | J1.40 | AD3             | PD22       |

##Acqua con TFT 2.8 pollici con touch resistivo 320x240 (Joy) 

|LCD PIN | SIGNAL  | ACQUA PIN | SIGNAL   | ARIETTA PIN | SIGNAL           |
|--------|---------|-----------|----------|-------------|------------------|
| 1      | LEDK    |           | GND      | J4.9        | GND              | 
| 2      | LEDA1   |           | 3V3      | J4.5        | 3V3              |
| 3      | LEDA2   |           | 3V3      | J4.5        | 3V3              |
| 4      | LEDA3   |           | 3V3      | J4.5        | 3V3              |
| 5      | LEDA4   |           | 3V3      | J4.5        | 3V3              |
| 6      | IM0     |           | GND      | J4.9        | GND              |
| 7      | IM1     |           | 3V3      | J4.5        | 3V3              |
| 8      | IM2     |           | 3V3      | J4.5        | 3V3              |
| 9      | IM3     |           | 3V3      | J4.5        | 3V3              |
|10      | RESET   | J2.33     | PB8      | J4.33       | PC3              |
|33      | MISO    | J2.8      | MISO     | J4.10       | SPI1-MISO (PA11) |
|34      | MOSI    | J2.7      | MOSI     | J4.8        | SPI1-MOSI (PA12) |
|36      | D/CX    | J2.31     | PB1      | J4.31       | PC4              |
|37      | SCK     | J2.6      | CLK      | J4.7        | SPI1-CLK (PA13)  |
|38      | CSX     | J2.5      | CS0      | J4.25       | SPI1-CS0 (PA8)   |
|40      | VDDI    |           | 3V3      | J4.5        | 3V3              |
|41      | VDDI    |           | 3V3      | J4.5        | 3V3              |
|42      | VCI     |           | 3V3      | J4.5        | 3V3              |
|43      | GND     |           | GND      | J4.9        | GND              |
|44      | X+ (XR) | J1.43     | AD3 (XL) | J4.38       | AD2              | 
|45      | Y+ (YB) | J1.40     | AD0 (YT) | J4.36       | AD1              |
|46      | X- (XL) | J1.42     | AD2 (XR) | J4.40       | AD3              |
|47      | Y- (XT) | J1.41     | AD1 (YB) | J4.34       | AD0              |
|48      | GND     |           | GND      | J4.9        | GND              |
|49      | GND     |           | GND      | J4.9        | GND              |
|50      | GND     |           | GND      | J4.9        | GND              |


Touch lines with rotate = 270
(Connector on right)

<br/>

* [Datasheet MULTI-INNO LCD module](/datasheets/MI0283QT-11_V1.1.pdf)

<hr/>

##Aria G25 con oLed 128x128 (SPI)

<img src="./oled128.jpg" width="320px"/>

* [Adafruit 1.5" Color OLED Breakout Board](https://learn.adafruit.com/adafruit-1-5-color-oled-breakout-board/wiring-and-test)
* [Datasheet del solo vetro UG-2828GDEDF11 ](http://www.adafruit.com/datasheets/UG-2828GDEDF11.pdf)
* [Datasheet del chip a bordo SSD1351](http://www.adafruit.com/datasheets/SSD1351-Revision%201.3.pdf)
* [Linux Framebuffer modificato](https://github.com/erazor83/fbtft)
* [Note da cui sono partito per capire il dts](https://github.com/notro/fbtft/issues/80)
* [Linux Framebuffer drivers for small TFT LCD display modules](https://github.com/notro/fbtft/wiki)
* [Altro documentazione software](https://github.com/notro/fbtft/wiki)

##Wirings con Aria G25

| Adafruit    | at91 |
|-------------|------|
| #1  MOSI    | PA12 |
| #2  SCK     | PA13 |
| #3  DC      | PC21 |
| #4  R       | PC20 |
| #5  OLEDCS  | PA14 |
| #7  MISO    | PA11 |
| #9  3V3     | 3V3  |
| #11 GND     | GND  |

#Acqua con TFT 4.3 pollici con touch resistivo 480x272 (RGB) 

<img src="http://p.globalsources.com/IMAGES/PDT/B1084030251/4.3-inch-TFT-module.jpg" style="width:320px;"/>



#Comandi vari

Riempire i frame buffer di dati casuali:

<pre class="minicom">
# cat /dev/urandom > /dev/fb0
</pre>

Far partire X da DPI:

<pre class="minicom">
# FRAMEBUFFER=/dev/fb0 startx
</pre>

Inviare comandi da DPI alla consolle su X:

<pre class="minicom">
# DISPLAY=":0" mplayer video.mp4
</pre>


Non ricordo piu' a che serve :-(

<pre class="minicom">
# apt-get install xinput
# xinput list
# apt-get install evtest
</pre>

Photo frame

<pre class="minicom">
# mplayer mf://*.jpg -mf fps=0.1 -loop 0
</pre>

#DOOM

<pre class="minicom">
# FRAMEBUFFER=/dev/fb0 startx &
# DISPLAY=":0" /usr/games/chocolate-doom -width 320 -height 240
</pre>

#Usare i gpio_keys

* [Usare i gpio_keys](http://www.armadeus.com/wiki/index.php?title=GPIO_keys)
* [Linux Keycode table](https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/include/uapi/linux/input.h?id=refs/tags/v3.16.1)

#Altro 

* [Comandi utili in X](/x)
* [xinput e evtest](http://blog.rot13.org/2013/12/touch-screen-configuration-using-xinput.html)



Le attività del TanzoLab si svolgono ogni mercoledi sera, salvo casi speciali, dalle ore 18:30 presso i locali della Acme Systems srl e consistono in:

  • Talk monotematici a cura di professionisti in vari settori tecnologici
  • Workshop pratici su elettronica embedded, produzione e informatica
  • Progettazione e realizzazione di nuovi prodotti embedded per l'IT

Le attività vengono coordinate tramite questo sito, in cui vengono pubblicati tutti i lavori svolti o in via di sviluppo, e tramite un gruppo Telegram con cui per interagire direttamente via chat con gli altri membri.