Tag Archives: Electronics

Wiring TFT LCD ILI9325 to imx233-Olinuxino-Micro – III

It is now time to wire the ILI9325. You can find more information about the ILI9325 by reading the datasheet controller/driver chip.

Wiring TFT LCD ILI9325 to imx233-Olinuxino-Micro - III

The imx233-Olinuxino-Micro pinout can be found in the user’s manual, chapter 6. Page 32 also provides a reference to a pinout summary made by David Whittaker, which is quite useful.

Here is how we did it:

LCD pin Oimex pin GPIO
D7 CON1#15    4
D6 CON1#28   53
D5 CON1#27   51
D4 CON1#26   52
D3 CON1#25   50
D2 CON1#22   57
D1 CON1#21   54
D0 CON1#19   16
RST CON1#16    5
RD CON1#14    3*
WR CON1#18    7
C/D CON1#17    6
CS CON1#13    2
Backlite           3.3V
VCC           5V
GND           GND

*NOTE: RD needs to be connected to 3.3V, in our case we chose CON1#14.

Touchscreen interface will be ‘touched’ in a later post.

Now, recheck your wires and then feed your the imx233.

Connect

Login by entering  username and password [defaulf should be usr: root, pass: root].

Next, you will need to enable the display module named fbtft_device, which was made available in the kernel in a previous post. [NOTE: the driver names this display itdb28.]

You can confirm that the module for this display was loaded by entering:

You may need to install “something” to help you viewing your images using the linux framebuffer console. We use frame buffer imageviewer (fbi). [Some linux distributions name it fbida.]

Now you are ready to play!

We had our colors all washed-out. If this is your case just create a file named gamma, in /etc:

With the following content (adjust as you wish)

Save the file and run:

HAVE FUN!

 

 

 

 

Wiring the ST7735R TFT LCD to the imx233-Olinuxino-Micro – II

Now that you’ve recharged your batteries let’s proceed and connect our display.

Let’s start by wiring the ST7735. You can read more information about the ST7735 in the datasheet controller/driver chip.

IMG_3433

As you can see in the picture this LCD uses Serial Peripheral Interface bus (SPI): MISO, SCLK, MOSI and CS pins are used for SD card communication; SCL, SDA, RS/DC, and CS pins – 4-lines/8-bts bi-directional interface – for communication between the micro controller and the LCD driver.

The imx233-Olinuxino-Micro pinout can be found in the user’s manual, chapter 6. Page 32 also provides a reference to a pinout summary made by David Whittaker, which is quite useful.

Here is how we did it:

LCD pin Olimex pin GPIO Function
SCL (SCK) CON2#11 GPIO#24 Serial CLock – Clock pulses which synchronize data transmission generated by the master
SDA (MOSI) CON2#10 GPIO#20 Serial DAta (input/output) – (MOSI Master Out Slave In) – Master line for sending data
RS/DC CON1#17 GPIO#6 RS/DC data/command flag
RES CON1#16 GPIO#5 Reset
CS CON1#13 GPIO#2 Chip Select (SS – Slave Select) – enables (like a switch) communication access to device.

Then connect VCC to +3.3V and GND to ground.

[MISO -> CON2#9 (GPIO#0)  (Master In Slave Out) – Slave line for sending data to the master. NOTE: we did not connect this one, at least for now.]

Now, recheck your wires and then feed your imx233.

Connect

Login by entering  username and password [defaulf should be usr: root, pass: root].

Next, you will need to enable the display module named fbtft_device, which was made available in the kernel in the previous post. [NOTE: the driver names this display adafruit18.]

You can confirm that the module for this display was loaded by entering:

Likely you’ll need to install “something” to help you viewing your images using the linux framebuffer console. We use frame buffer imageviewer (fbi). [Some linux distributions name it fbida.]

Now you are ready to play!

HAVE FUN!

Building a kernel for imx233-Olinuxino-Micro + wireless + TFT LCD [ST7735R/ILI9325] – I

We had our imx233-Olinuxino-Micro in its box for too long but we finally managed to run some electrons through it 🙂

We needed to have our wifi USB module – Realtek RTl8192cu Chipset working. Also, we wanted to connect our TFT LCD displays : the 1.8″ Color TFT LCD display with MicroSD Card Breakout – ST7735R, and try also the 2.8″ 18-bit color TFT LCD with touchscreen breakout board – ILI9325. [Check the next posts for wiring instructions.}

After some pains in finding the right linux kernel and drivers…we followed the great tutorial provided by g-lab, and made a few changes. Hopefully this will be of help for some of you out there. So here we go…

Getting some files

1. Start with a working SD card image. We got imx233 Debian 2GB SD-card image based on Kernel 3.11 following the olimex.com link.

Want to know how to make a bootable SD Card? Look here

2. Get the package provided by g-lab link, which contains Freescale imx-bootlets, utility elftosb2 and patches for the imx23-board.

Building the kernel

You will need to know how to build your own kernel and create a bootable image.

We used the 3.18.3 kernel. You can try another one. It is likely that any 3.x.x will work too.

To enable SPI we made our own patch. Get it as follows or Read on what you need to do...

Open imx23-olinuxino.dts file

look for ssp1: ssp@80034000 {… and add/change

by

cd into directory linux-mainline to apply  i2c patches for imx23-olinuxino board. These are required for your i2c communication devices. Also, apply our SPI patch.

We found this great driver for our LCD’s. Download sources and install it:

Read on how we got this file...

Either the wireless or the lcd were not working among all our kernel compilations. Since we were banging our head on the screen for a couple of days we decided to post our way around the thing. Boot your olimex with the abovementioned image [imx233 Debian 2GB SD-card image based on Kernel 3.11], then go to /proc and save the config.gz to your computer. You can use gunzip and save the file. This file contains already what is needed to get the wifi USB module – Realtek RTl8192cu Chipset working.

If you do not use the .config we provide here, you will have to add a few things with the menuconfig. Read more.

Open menuconfig

You will get something like this

Building a kernel for imx233-Olinuxino-Micro + wireless + TFT LCD [ST7735R/ILI9325] - I

 

Go to Device Drivers -> Graphics support -> Frame buffer devices->

Save and exit menuconfig.

Compile kernel

Mount your SD card and do [NOTE: Check where is your SD card partition is mounted and enter the path in the following line. For example we use kubuntu and had it mounted in /media/opiliao/rootfs]:

 

Bootlets

Switch into directory boot/elftosb-0.3 and make symbolic link into the compilers default PATH [elftosb2 should be located at /usr/sbin/elftosb2]

Next, switch into directory boot and do:

Now, switch into directory boot/imx-bootlets-src-10.05.02 and apply patches

This patched package require zImage in this directory. We have created zImage_dtb instead.

You should be ready to dump the image to your SD card. If your SD device is /dev/sdb1 do: [Note: you can check it by doing: sudo fdisk -l]

The card is ready, insert on your board and boot….IT WORKS!

Take a 10 min break before continuing…see you in the next post 😉