for Arduino TFT LCD Screen 160x128
Dependents: TFTLCDSCREEN Pong_ILI9163C
Fork of TFT_ILI9163C by
TFT_ILI9163C.h
- Committer:
- peu605
- Date:
- 2015-02-03
- Revision:
- 8:8dea70cf3ae8
- Parent:
- 7:3dcb98ecf29f
- Child:
- 9:82ad9b318df8
File content as of revision 8:8dea70cf3ae8:
/* ILI9163C - A fast SPI driver for TFT that use Ilitek ILI9163C. Features: - Very FAST!, expecially with Teensy 3.x where uses DMA SPI. - It uses just 4 or 5 wires. - Compatible at command level with Adafruit display series so it's easy to adapt existing code. - It uses the standard Adafruit_GFX Library (you need to install). Background: I got one of those displays from a chinese ebay seller but unfortunatly I cannot get any working library so I decided to hack it. ILI9163C looks pretty similar to other display driver but it uses it's own commands so it's tricky to work with it unlsess you carefully fight with his gigantic and not so clever datasheet. My display it's a 1.44"", 128x128 that suppose to substitute Nokia 5110 LCD and here's the first confusion! Many sellers claim that it's compatible with Nokia 5110 (that use a philips controller) but the only similarity it's the pin names since that this one it's color and have totally different controller that's not compatible. http://www.ebay.com/itm/Replace-Nokia-5110-LCD-1-44-Red-Serial-128X128-SPI-Color-TFT-LCD-Display-Module-/141196897388 http://www.elecrow.com/144-128x-128-tft-lcd-with-spi-interface-p-855.html Pay attention that can drive different resolutions and your display can be 160*128 or whatever, also there's a strain of this display with a black PCB that a friend of mine got some weeks ago and need some small changes in library to get working. If you look at TFT_ILI9163C.h file you can add your modifications and let me know so I can include for future versions. Code Optimizations: The purpose of this library it's SPEED. I have tried to use hardware optimized calls where was possible and results are quite good for most applications, actually nly filled circles are still a bit slow. Many SPI call has been optimized by reduce un-needed triggers to RS and CS lines. Of course it can be improved so feel free to add suggestions. ------------------------------------------------------------------------------- Copyright (c) 2014, .S.U.M.O.T.O.Y., coded by Max MC Costa. TFT_ILI9163C Library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. TFT_ILI9163C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ This file needs the following Libraries: Adafruit_GFX by Adafruit: https://github.com/adafruit/Adafruit-GFX-Library Remember to update GFX library often to have more features with this library! From this version I'm using my version of Adafruit_GFX library: https://github.com/sumotoy/Adafruit-GFX-Library It has faster char rendering and some small little optimizations but you can choose one of the two freely since are both fully compatible. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Special Thanks: Thanks Adafruit for his Adafruit_GFX! Thanks to Paul Stoffregen for his beautiful Teensy3 and DMA SPI. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Version: 0.1a1: First release, compile correctly. Altrough not fully working! 0.1a3: Better but still some addressing problems. 0.1b1: Beta! Addressing solved, now rotation works and boundaries ok. 0.2b1: Cleaned up. 0.2b3: Added 2.2" Red PCB parameters 0.2b4: Bug fixes, added colorSpace (for future send image) 0.2b5: Cleaning +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ BugList of the current version: - Actually no scroll commands (only in release will be included). */ /** * TFT_ILI9163C library for ST Nucleo F411RE * * @author Copyright (c) 2014, .S.U.M.O.T.O.Y., coded by Max MC Costa * https://github.com/sumotoy/TFT_ILI9163C * * @author modified by masuda, Masuda Naika */ #ifndef _TFT_ILI9163CLIB_H_ #define _TFT_ILI9163CLIB_H_ #if defined(TARGET_NUCLEO_F411RE) // #define __F411RE_SOFT__ // #define __F411RE_DMA__ #define __F411RE_DMA_IT__ #elif defined(TARGET_NUCLEO_F302R8) // #define __F302R8_SOFT__ #define __F302R8_DMA__ #else #define __MBED_GENERIC__ #endif #if defined(__F411RE_SOFT__) #include "TFT_ILI9163C_F411RE_SOFT.h" #elif defined(__F411RE_DMA__) #include "TFT_ILI9163C_F411RE_DMA.h" #elif defined(__F411RE_DMA_IT__) #include "TFT_ILI9163C_F411RE_DMA_IT.h" #elif defined(__F411RE_FIFO__) #include "TFT_ILI9163C_F411RE_FIFO.h" #elif defined(__F302R8_SOFT__) #include "TFT_ILI9163C_F302R8_SOFT.h" #elif defined(__F302R8_DMA__) #include "TFT_ILI9163C_F302R8_DMA.h" #else #include "TFT_ILI9163C_GENERIC.h" #endif #endif