Jump to content


  • Content Count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    rado_1 reacted to gmtii in 2.2 inch LCD TFT ILI9341 Library?!   
    There is a library working on Stellaris already. It can be a better start point:
    Enviado desde mi GT-P6810 mediante Tapatalk
  2. Like
    rado_1 reacted to grahamf72 in 2.2 inch LCD TFT ILI9341 Library?!   
    Here's the library I've been using. As suggested by the filename it originally came from Seeed. It looks very similar to the code you posted above.  I've made a couple of changes - firstly changed the AVR specific stuff so that it would work with the MSP430. I also changed the code for filled circles so it is a bit quicker, added some more colour definitions, and added a macro to convert RGB values into the 5.6.5 format used by the ILI9341.
    Note - in the header file is some information about the pinout that it expects. If you use different pins for CS, DC & Backlight, you will need to edit the header.  I've tested this library on MSP430G2 launchpad with the 2452 & 2553, and also on the CC430 Experimenters board. With modifications to the macros in the header file, it also works on the Stellaris.
    Edit: your pictures finally loaded, and the display board I've been using is exactly the same as the one you have. I haven't attempted to use the SD card interface yet, but I can confirm the attached library works well with this display.
  3. Like
    rado_1 reacted to chicken in 2.2 inch LCD TFT ILI9341 Library?!   
    Which Arduino library are you using? Depending on it's implementation, adapting it might be not that hard.
  4. Like
    rado_1 reacted to chicken in 2.2 inch LCD TFT ILI9341 Library?!   
    On a first glance, few things you need to edit:
    Add #include <Energia.h> in TFTv2.h. Replacing Arduino/Seeduino entries or adding another #if clause.
    Unlike MSP430, AVRs need special commands to access read-only memory. In font.c:
    #include <avr/pgmspace.h> const unsigned char simpleFont[][8] PROGMEM= you can remove the include, and also the "PROGMEM" string in the declaration.
    In TVTv2.cpp line 338
    INT8U temp = pgm_read_byte(&simpleFont[ascii-0x20][i]); must be changed to
    INT8U temp = simpleFont[ascii-0x20][i]; In TFTv2.h, line 55ff there's a whole list of macros to directly access digital ports.
    #define TFT_CS_LOW {DDRD |= 0x20;PORTD &=~ 0x20;} #define TFT_CS_HIGH {DDRD |= 0x20;PORTD |= 0x20;} #define TFT_DC_LOW {DDRD |= 0x40;PORTD &=~ 0x40;} #define TFT_DC_HIGH {DDRD |= 0x40;PORTD |= 0x40;} #define TFT_BL_OFF {DDRD |= 0x80;PORTD &=~ 0x80;} #define TFT_BL_ON {DDRD |= 0x80;PORTD |= 0x80;} #define TFT_RST_OFF {DDRD |= 0x10;PORTD |= 0x10;} #define TFT_RST_ON {DDRD |= 0x10;PORTD &=~ 0x10;} You will have to add your own definitions of these that reflect the LaunchPad pins and ports.
  5. Like
    rado_1 reacted to chicken in 2.2 inch LCD TFT ILI9341 Library?!   
    At the very least you'll have to configure your pins as digital outputs with PinMode, e.g. inside of the begin method you added.
  6. Like
    rado_1 reacted to RobG in 2.2 inch LCD TFT ILI9341 Library?!   
    See here. It's not Energia, but it works with your display.
  • Create New...