I was driving multiple TFT LCDs on the same microcontroller. Each LCD had its own instance and I needed an easy method of iterate through all of them.
The platform I used is a ST Nucleo F411RE board, the programming enviroment is mbed and the TFT LCDs are 2.2 inch ILI9341 display.
By using a single screen, the code could look like this:
On the other hand, by using multiple screens, the code could look like this:
The code is not elegant, but it gets the job done.
Note that the LCDs RST and CS pins need to be individually connected to the microcontroller.
Reference: www.java2s.com
Showing posts with label lcd. Show all posts
Showing posts with label lcd. Show all posts
8x8 dot matrix font generator for LCD
This is a javascript based 8x8 pixel font generator for any LCD.
How it works: just click on the dot matrix to enable and disable a dot. On the right side, the equivalent binary code will be generated. The reset button will reset the entire dot matrix. Multiple dot selection is not supported.
The code for generating "8x8 dot matrix font generator" is taken from www.pial.net.
How it works: just click on the dot matrix to enable and disable a dot. On the right side, the equivalent binary code will be generated. The reset button will reset the entire dot matrix. Multiple dot selection is not supported.
|
Binary code: |
The code for generating "8x8 dot matrix font generator" is taken from www.pial.net.
QVGA 2.2" (240x320) TFT SPI display with SD-CARD pinout
The QVGA 2.2" TFT SPI display was bought from Ebay. The display driver is ILI9341 and the board uses 3.3V logic.
The maximum color depth this TFT supports is 16 bit.
The SD-CARD is powered from the display VCC and has separate SPI pins.
The TFT display pins:
SDO (MISO)
LED = 3.3V or in series with a 100 ohm resistor from 5V
SCK (CLOCK)
SDI (MOSI)
D/C (DATA/COMMAND)
RESET
CS (CHIPSELECT)
GND
VCC = 3.3V
The SD-CARD pins:
SD_CS (CHIPSELECT)
SD_MOSI (MOSI)
SD_MISO (MISO)
SD_SCK (CLOCK)
References: ILI9341 PDF manual, www.instructables.com
The maximum color depth this TFT supports is 16 bit.
The SD-CARD is powered from the display VCC and has separate SPI pins.
Warning! The QVGA 2.2" TFT does not support 5V on either of its pins.
The TFT display pins:
SDO (MISO)
LED = 3.3V or in series with a 100 ohm resistor from 5V
SCK (CLOCK)
SDI (MOSI)
D/C (DATA/COMMAND)
RESET
CS (CHIPSELECT)
GND
VCC = 3.3V
The SD-CARD pins:
SD_CS (CHIPSELECT)
SD_MOSI (MOSI)
SD_MISO (MISO)
SD_SCK (CLOCK)
References: ILI9341 PDF manual, www.instructables.com
Subscribe to:
Posts (Atom)
