Rei Vilo 695 Posted August 27, 2014 Author Share Posted August 27, 2014 @@Rei Vilo, how do you use your library with my LCD with Touch BP? Please refer to [Energia Library] Colour LCD 2.2" Touch Library for LaunchPad + StellarPad Are there different revisions for the screen? Quote Link to post Share on other sites
RobG 1,892 Posted August 27, 2014 Share Posted August 27, 2014 There are, but most differences are in the layout. Could you confirm the pins and that the library is working with MSP and Tiva? LCD CS P1.0, LCD RS P1.4, PENIRQ P2.0, TSC CS P2.1 2.2 LCD Touch v4.pdf Quote Link to post Share on other sites
Rei Vilo 695 Posted August 27, 2014 Author Share Posted August 27, 2014 We aren't even sure @@mgokturk uses this very screen. The library works fine as mentioned in the dedicated thread. Quote Link to post Share on other sites
RobG 1,892 Posted August 27, 2014 Share Posted August 27, 2014 Downloaded energia-0101E0012 and LCD22_Touch_main, everything works as expected with v1-v4 LCD BPs. The only thing, y axis is reversed, but fix was already posted in one of the threads. Quote Link to post Share on other sites
Rei Vilo 695 Posted August 27, 2014 Author Share Posted August 27, 2014 Welcome to Energia! To use the example: For the LCD22_Touch_main.zip package, just unzip it and double-click on LCD22_Touch_main.ino.Now, if you want to use it as a library: The first time you run Energia, it creates a folder called Energia with a sub-folder called libraries or Libraries. Just place the folder with the library inside, to obtain Energia/libraries/LCD22_Touch_main. EitherDelete the LCD22_Touch_main.ino orCreate a folder Energia/libraries/LCD22_Touch_main/examples/LCD22_Touch_main and Move LCD22_Touch_main.ino inside. Quote Link to post Share on other sites
dpharris 13 Posted August 28, 2014 Share Posted August 28, 2014 This is weird. I have tried several Energia libraries for Rob's LCD on a Stellaris Launchpad (earlier version?): (1) LCD_Distribution105_2 works -- except touch is wonky. This has four demos: LCDExampleWITHCLOCK, LCDExampleWITHGAUGE, LCDExampleWITHHISTOGRAM and LCDExampleWITHTOUCH. (2) LCD_Distribution107_2 doesn't work. (this is where LCD22_Touch_main.ino is). It compiles and appears to load but just freezes. (3) Rei Vilo's 'Library113' (Distribution-2) freezes. (3) ReiVilo's latest Beta122 gives me this error: "LCD_screen_font.cpp.o: In function `LCD_screen_virtual::LCD_screen_virtual()': LCD_screen_virtual.h:46: undefined reference to `vtable for LCD_screen_virtual' collect2: error: ld returned 1 exit status" ... and I do not know how to fix it. Thanks, David Quote Link to post Share on other sites
Rei Vilo 695 Posted August 28, 2014 Author Share Posted August 28, 2014 I'll give a look. Now, this screen has been released with different versions and pin-outs, so the library may work with one of them but not all of them. In the meantime, please read Some Misconceptions about Libraries at http://forum.43oh.com/topic/5548-some-misconceptions-about-libraries/#entry48778 Quote Link to post Share on other sites
RobG 1,892 Posted August 28, 2014 Share Posted August 28, 2014 Only the very first batch of this BP had different pin-out (do not confuse with board marked as v1.) All current boards (v1-v4,) have the same pin-out and do work with D107 library without any changes. Quote Link to post Share on other sites
dpharris 13 Posted August 28, 2014 Share Posted August 28, 2014 Umm, now I am having trouble even uploading to the Stellaris after trying some of the libraries. Is there some way to resurrect my Stellaris Laundhpads? David Quote Link to post Share on other sites
spirilis 1,265 Posted January 4, 2015 Share Posted January 4, 2015 @@Rei Vilo - Can you fix the case sensitivity issues present in the various files? Under Linux case sensitivity is mandatory, so the library refuses to compile due to: #include "spi.h" in a lot of the .h files (it's SPI.h, not spi.h) Many of the Screen_XYZ.cpp files include their .h as "screen_XYZ.h", rather than "Screen_XYZ.h" as it should be. After redoing all those mistakes I have a new Screen_ILI9341.cpp and clock example that compiles (haven't loaded it onto an MCU yet ....... so we're at that precious "hope & pray" stage ;-) ) Also I noticed release 113 lists the versions wrong, with LCD_SCREEN_RELEASE 110 and LCD_SCREEN_FONT release 112 Quote Link to post Share on other sites
spirilis 1,265 Posted January 5, 2015 Share Posted January 5, 2015 Screen_ILI9341.cpp / .h for the 2.2" ILI9341 TFT displays accessible over SPI found cheap at Aliexpress, eBay et al, example link - http://www.aliexpress.com/item/New-2-2-inch-2-2-240x320-SPI-TFT-LCD-Display-Module-ILI9341-PCB-5V-3/32237378199.html (search "ili9341 2.2") Hardware SPI is the only one supported, no setModule() type of stuff supported either yet. Wanted to simplify the begin() routine since it's my first dip into LCD_screen. Features supported above and beyond typical LCD_screen: Sleep - setSleep(true/false), which also controls the backlight Invert - setInvert(true/false) Initializer syntax: Screen_ILI9341(uint8_t pinScreenChipSelect, uint8_t pinScreenDataCommand, uint8_t pinScreenBacklight, uint8_t pinScreenReset=NULL); Currently setOrientation() hasn't been tested, it works in Portrait mode on my display (240 width, 320 height) with setOrientation(0). The MADCTL register had to be tweaked to flip-flop X coordinates because they appear to be backwards with the way this display is internally wired. There is no touch digitizer on this screen so my code doesn't include any touch support. There is an SD card slot, but I haven't played with it yet. Pics: (^ invert mode) Quote Link to post Share on other sites
spirilis 1,265 Posted January 6, 2015 Share Posted January 6, 2015 Oops, looks like on my display the BGR bit needed to be set for MADCTL... otherwise redColour shows up blue and blueColour shows up red. Updated zipfile: LCD_screen_113_ILI9341_v3.zip (Had to update the copyright info FYI, hence the v3) Quote Link to post Share on other sites
Rei Vilo 695 Posted January 6, 2015 Author Share Posted January 6, 2015 Thank you for the comments. Unfortunately, the SPI library is sometimes spi.h and sometimes SPI.h, depending on the platform. The library has gone through heavy work for another project, so I haven't released an updated version for a long time now. Let's hope to have some time available to work on it! @@spirilis How many lines of code for the clock? Quote Link to post Share on other sites
spirilis 1,265 Posted January 6, 2015 Share Posted January 6, 2015 Thank you for the comments. Unfortunately, the SPI library is sometimes spi.h and sometimes SPI.h, depending on the platform. The library has gone through heavy work for another project, so I haven't released an updated version for a long time now. Let's hope to have some time available to work on it! @@spirilis How many lines of code for the clock? It's not a real clock, but the amount of code regardless was infinitesimal! #include <SPI.h> #include <LCD_screen_font.h> #include <Screen_ILI9341.h> #include <LCD_GUI.h> #include <LCD_graphics.h> Screen_ILI9341 myLCD(13, 33, 31, 32); gClock myClock; void setup() { int i; // put your setup code here, to run once: Serial.begin(115200); Serial.println("LCD init-"); myLCD.begin(); Serial.println("Defining clock-"); myClock.define(&myLCD, 120, 120, 60); myLCD.line(0, 0, 100, 100, whiteColour); } void loop() { //return; // put your main code here, to run repeatedly: static unsigned int minute = 0; Serial.print("Drawing time: 4, "); Serial.print(minute); Serial.println(", 0, \"LCD test!\""); myClock.draw(4, minute++, 0, "LCD test!"); delay(2000); if (minute % 5 == 1) myLCD.setSleep(true); else myLCD.setSleep(false); } Seriously myClock.define() and myClock.draw() is all there is to it. And plenty of customization can be had in the options to define(). Great design! Quote Link to post Share on other sites
Rei Vilo 695 Posted February 7, 2015 Author Share Posted February 7, 2015 The LCD_screen Library Suite release 225 supports a wide selection of screens on different platforms, including Energia, Teensy and Arduino. Screen_ER1963 and Screen_ER1963_SD Screen_ER8875 and Screen_ER8875_SD Screen_HI32 Screen_HX8353E Screen_HY28A Screen_HY28A_SRAM Screen_ILI9225B Screen_ILI9340 Screen_K35 Screen_K35_SPI Screen_K70 Screen_PICadillo Screen_PicasoSGC Screen_PicasoSPE Screen_ST7735 Screen_W32 Link: http://embeddedcomputing.weebly.com/lcd_screen-library-suite.html reaper7 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.