RobG 1,892 Posted November 12, 2012 Author Share Posted November 12, 2012 Updated 2 files: colorLCD.c and font_11x16.h What's new? Small speed improvements and font background. In most cases, fonts with background should be faster, but if you have a lot of white spaces, you could try using old functions (they are commented out.) The main advantage of using new functions is that you don't have to erase before writing new content and updates are faster and flicker free. Quote Link to post Share on other sites
RobG 1,892 Posted November 27, 2012 Author Share Posted November 27, 2012 Do you feel like this library is slow? Well, I have a good news for you I have few updates coming and one of them is hardware SPI option (available only for 1.8" JD-T1800 and 2.2" LCD with touch displays, no Nokia.) With this new option, you will get about 500% speed increase, take a look: Drawing 600 shapes and about 3000 different size characters. bluehash 1 Quote Link to post Share on other sites
bluehash 1,581 Posted November 27, 2012 Share Posted November 27, 2012 Do you feel like this library is slow? Well, I have a good news for you I have few updates coming and one of them is hardware SPI option (available only for 1.8" JD-T1800 and 2.2" LCD with touch displays, no Nokia.) With this new option, you will get about 500% speed increase, take a look: Drawing 600 shapes and about 3000 different size characters. Holy crap! Quote Link to post Share on other sites
RobG 1,892 Posted November 27, 2012 Author Share Posted November 27, 2012 Exactly. I was working on some GUI controls for my touch LCD and really needed that boost. The only possible problem is the touch controller chip which has 2MHz max clock speed. BTW, I get about 5fps on 2.2" display and about 10fps on 1.8" (fill the entire screen with color, 176 x 220 & 128 x 160.) Quote Link to post Share on other sites
tdyer 0 Posted December 3, 2012 Share Posted December 3, 2012 Rob, Great work on the library, it works great! I need a larger font, did you use a program to generate the fonts or do it by hand. I have looked at several of the programs that are available but the ones I have found have variaable character widths. Thanks Quote Link to post Share on other sites
username 198 Posted December 15, 2012 Share Posted December 15, 2012 Hey RobG, nice work on the libraries as always! Had a question for ya.. Is there any easy way to rotate the ILI9225B display so the libraries work horizontally? I was able to get text to display horizontally but that required modding of control registries as well as the font functions. Quote Link to post Share on other sites
RobG 1,892 Posted December 15, 2012 Author Share Posted December 15, 2012 I had a hard time getting horizontal to work. HX and ST driver works like a charm with updates to just 3 lines of code, but ILI is not. I will take a look again tonight. Quote Link to post Share on other sites
RobG 1,892 Posted December 16, 2012 Author Share Posted December 16, 2012 Here are the changes required to make ILI9225B horizontal. In the next round of updates, I will add conditionals to make H/V switch possible with a single define. colorLCD.h #ifdef ILI9225B // #define USE16BIT #define LCD_HEIGHT 176 // horizontal #define LCD_WIDTH 220 // horizontal colorLCD.c #ifdef ILI9225B char trueXStart, trueYStart, trueXEnd, trueYEnd; // horizontal trueXStart = yStart; // horizontal trueXEnd = yEnd; // horizontal trueYStart = xStart; // horizontal trueYEnd = xEnd; // horizontal writeCommand(ILIGRAMHEA); writeData(0); writeData(trueXEnd + LCD_OFFSET_WIDTH); // horizontal writeCommand(ILIGRAMHSA); writeData(0); writeData(trueXStart + LCD_OFFSET_WIDTH); // horizontal writeCommand(ILIGRAMVEA); writeData(0); writeData(trueYEnd + LCD_OFFSET_HEIGHT); // horizontal writeCommand(ILIGRAMVSA); writeData(0); writeData(trueYStart + LCD_OFFSET_HEIGHT); // horizontal writeCommand(ILIGRAMADDRX); writeData(0); writeData(trueXStart + LCD_OFFSET_WIDTH); // horizontal writeCommand(ILIGRAMADDRY); writeData(0); writeData(trueYStart + LCD_OFFSET_HEIGHT); // horizontal void initILI9225B() { writeCommand(0x28); delay(20); writeCommand(0x01); writeData(0x03); // set SS and NL bit // horizontal writeData(0x1C); writeCommand(0x02); writeData(0x01); // set 1 line inversion writeData(0x00); writeCommand(0x03); writeData(0x10); // set GRAM write direction and BGR=1.//1030 writeData(0x38); // horizontal username 1 Quote Link to post Share on other sites
Rogerpro 0 Posted December 23, 2012 Share Posted December 23, 2012 Very nice work RobG, congrats. I have test in a StellarisLaunchpad with a Nokia 2760 lcd and works great. Have you put the source with SPI Hardware in any place, i like to study. Can you free the UARTS pins in next developments, i cant enable uart to work. Regards. Quote Link to post Share on other sites
luke 9 Posted January 11, 2013 Share Posted January 11, 2013 Rob Can you post your latest code? Quote Link to post Share on other sites
RobG 1,892 Posted January 11, 2013 Author Share Posted January 11, 2013 I will this weekend, I have to clean it up. luke 1 Quote Link to post Share on other sites
RFDesign 0 Posted January 27, 2013 Share Posted January 27, 2013 Hi, nice library. I got some 2.4" TFTs having also a SD card holder using a SSD1289 controller. Can you possibly add support for this controller ? Regards Peter Quote Link to post Share on other sites
EdZackRee 0 Posted January 31, 2013 Share Posted January 31, 2013 Noob problems: Purchased latest offering of the 2.2" LCD (beautiful work!!!), soldered on the connectors, plugged in and it lights up. Yippee! Then comes using it. Create a new project in CCS for the Lights Out game. Downloaded all of RobG's latest files in Post #20, searched and found a copy of the msp430g2553.h file on internet. Placed this and the color.h and colorLCD.h files, plus the in430.h file in the same Project folder, clearing the question marks (?) next to the INCLUDE statements at the start of main.c. But now I get a wad of nasty errors. Noob can't figure out what he's done wrong. Any help appreciated. **** Build of configuration Debug for project LightsOut ****"C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all'Building file: ../main.c''Invoking: ARM Compiler'"C:/ti/ccsv5/tools/compiler/arm_5.0.1/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16--abi=eabi -me -g --include_path="C:/ti/ccsv5/tools/compiler/arm_5.0.1/include" --include_path="C:/" --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile--preproc_dependency="main.pp" "../main.c""..\msp430g2553.h", line 1: error #171: expected a declaration"..\msp430g2553.h", line 8: error #24: invalid octal digit"..\msp430g2553.h", line 9: error #24: invalid octal digit"..\msp430g2553.h", line 12: error #10: "#" not expected here"..\msp430g2553.h", line 13: error #10: "#" not expected here"..\msp430g2553.h", line 18: error #24: invalid octal digit"..\msp430g2553.h", line 19: error #24: invalid octal digit"..\msp430g2553.h", line 19: warning #12-D: parsing restarts here after previous syntax error"..\msp430g2553.h", line 20: error #171: expected a declaration"..\msp430g2553.h", line 21: error #171: expected a declaration"..\msp430g2553.h", line 22: error #171: expected a declaration"..\msp430g2553.h", line 23: error #171: expected a declaration"..\msp430g2553.h", line 24: error #171: expected a declaration"..\msp430g2553.h", line 25: error #171: expected a declaration"..\msp430g2553.h", line 26: error #171: expected a declaration"..\msp430g2553.h", line 27: error #171: expected a declaration"..\msp430g2553.h", line 28: error #24: invalid octal digit"..\msp430g2553.h", line 28: error #171: expected a declaration"..\msp430g2553.h", line 29: error #24: invalid octal digit"..\msp430g2553.h", line 29: error #171: expected a declaration"..\msp430g2553.h", line 30: error #171: expected a declaration"..\msp430g2553.h", line 35: error #10: "#" not expected here"..\msp430g2553.h", line 36: error #10: "#" not expected here"..\msp430g2553.h", line 37: error #10: "#" not expected here"..\msp430g2553.h", line 38: error #24: invalid octal digit"..\msp430g2553.h", line 38: error #10: "#" not expected here"..\msp430g2553.h", line 39: error #24: invalid octal digit"..\msp430g2553.h", line 39: error #10: "#" not expected here"..\msp430g2553.h", line 40: error #10: "#" not expected here"..\msp430g2553.h", line 41: error #10: "#" not expected here"..\msp430g2553.h", line 42: error #10: "#" not expected here"..\msp430g2553.h", line 48: error #24: invalid octal digit"..\msp430g2553.h", line 48: error #10: "#" not expected here"..\msp430g2553.h", line 49: error #24: invalid octal digit"..\msp430g2553.h", line 49: error #10: "#" not expected here"..\msp430g2553.h", line 50: error #10: "#" not expected here"..\msp430g2553.h", line 51: error #10: "#" not expected here"..\msp430g2553.h", line 52: error #10: "#" not expected here"..\msp430g2553.h", line 53: error #10: "#" not expected here"..\msp430g2553.h", line 54: error #10: "#" not expected here"..\msp430g2553.h", line 55: error #10: "#" not expected here"..\msp430g2553.h", line 56: error #10: "#" not expected here"..\msp430g2553.h", line 57: error #10: "#" not expected here"..\msp430g2553.h", line 58: error #24: invalid octal digit"..\msp430g2553.h", line 59: error #24: invalid octal digit"..\msp430g2553.h", line 59: error #10: "#" not expected here"..\typedefs.h", line 13: warning #12-D: parsing restarts here after previous syntax error"..\colorLCD.h", line 105: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 106: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 107: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 120: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 123: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 123: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 123: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 123: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 124: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 125: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 125: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 126: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 126: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 127: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 127: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 128: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 128: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 129: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 129: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 130: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 130: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 131: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 131: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 132: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 132: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 132: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 132: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 133: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 133: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 133: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 133: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 134: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 134: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 134: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 136: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 136: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 136: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 136: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 137: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 137: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 137: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 139: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 139: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 139: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 139: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 139: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 141: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 141: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 141: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 141: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 142: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 142: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 142: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 142: error #20: identifier "u_char" is undefined"..\colorLCD.h", line 142: error #20: identifier "u_char" is undefinedError limit reached.100 errors detected in the compilation of "../main.c".Compilation terminated.>> Compilation failuregmake: *** [main.obj] Error 1gmake: Target `all' not remade because of errors.**** Build Finished **** Quote Link to post Share on other sites
RobG 1,892 Posted January 31, 2013 Author Share Posted January 31, 2013 msp430g2553.h should be available in CCS so the line below is all you need, delete msp430g2553.h file from your project. include "msp430g2553.h" You are also missing typedefs.h from post #20. Quote Link to post Share on other sites
EdZackRee 0 Posted February 1, 2013 Share Posted February 1, 2013 RobG - thanks! Sorry I couldn't reply sooner. I will search harder, but I didn't find msp430g2553.h the last time I looked through the CCS files. Probably an operator error. Thanks again. 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.