Jump to content
43oh

(Universal) Color LCD graphics library


Recommended Posts

 

Building configuration: Nokia6100 - Debug 
Updating build tree... 
colorLCD.c  
Warning[Pe223]: function "_delay_cycles" declared implicitly C:\Users\Cesar Corsico\Dropbox\UFPR 2012-2\TE124\MSP430-cesar\MSP430-cesar\workspace001\Nokia6100\colorLCD.c 804 
main.c  
Warning[Pa050]: non-native end of line sequence detected (this diagnostic is only issued once) C:\Users\Cesar Corsico\Dropbox\UFPR 2012-2\TE124\MSP430-cesar\MSP430-cesar\workspace001\Nokia6100\main.c 1 
Warning[Pe223]: function "_delay_cycles" declared implicitly C:\Users\Cesar Corsico\Dropbox\UFPR 2012-2\TE124\MSP430-cesar\MSP430-cesar\workspace001\Nokia6100\main.c 73 
Warning[Pe223]: function "_bis_SR_register" declared implicitly C:\Users\Cesar Corsico\Dropbox\UFPR 2012-2\TE124\MSP430-cesar\MSP430-cesar\workspace001\Nokia6100\main.c 75 
Warning[Pe223]: function "_delay_cycles" declared implicitly C:\Users\Cesar Corsico\Dropbox\UFPR 2012-2\TE124\MSP430-cesar\MSP430-cesar\workspace001\Nokia6100\main.c 98 
Warning[Pe223]: function "_delay_cycles" declared implicitly C:\Users\Cesar Corsico\Dropbox\UFPR 2012-2\TE124\MSP430-cesar\MSP430-cesar\workspace001\Nokia6100\main.c 115 
Warning[Pe223]: function "_delay_cycles" declared implicitly C:\Users\Cesar Corsico\Dropbox\UFPR 2012-2\TE124\MSP430-cesar\MSP430-cesar\workspace001\Nokia6100\main.c 123 
Warning[Pe223]: function "_delay_cycles" declared implicitly C:\Users\Cesar Corsico\Dropbox\UFPR 2012-2\TE124\MSP430-cesar\MSP430-cesar\workspace001\Nokia6100\main.c 132 
Warning[Pe223]: function "_delay_cycles" declared implicitly C:\Users\Cesar Corsico\Dropbox\UFPR 2012-2\TE124\MSP430-cesar\MSP430-cesar\workspace001\Nokia6100\main.c 155 
memory.c  
Linking 
Error[e46]: Undefined external "_delay_cycles" referred in main ( C:\Users\Cesar Corsico\Dropbox\UFPR 2012-2\TE124\ 
MSP430-cesar\MSP430-cesar\workspace001\Nokia6100\Debug\Obj\main.r43 ) 
Error[e46]: Undefined external "_bis_SR_register" referred in main ( C:\Users\Cesar Corsico\Dropbox\UFPR 2012-2\ 
TE124\MSP430-cesar\MSP430-cesar\workspace001\Nokia6100\Debug\Obj\main.r43 ) 
Error while running Linker 
 
Total number of errors: 2 
Total number of warnings: 9 

 

 

I did the test again and now gave compile error.
I corrected this error by adding lines"_" the error that occurred, he stopped giving the error but still did not work.
He comes to flashing the LCD changing the background color the same color put back later.

still did not work here. Someone help me?

Link to post
Share on other sites
  • Replies 127
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

NOTE: Those files are not current as of May 5th 2013. See the first post for the latest. PCF8833 (Nokia 6100) SPFD54124B (Nokia 6085 and 6101) ST7735R (JD-T1800, 1.8" LCD) HX8340B (BTL221722, 2.2" wi

Just FYI. In a couple of weeks, I will be updating this library with the following:   support for HX8340 (2.2" LCD) support for ILI9225 (2.2" LCD with touch panel) landscape/portrait switch most

New versions are here   UPDATE: Sep 3rd 2013 New way to configure dev boards Works with TI's G2 LaunchPad (G2553,) and my G2955, F5172, F5510, F5529 dev boards. Just one line change to switch bet

Posted Images

For Everyone:

 

To improve the performance of Sparkfun LCD BreakBoard color with Nokia 6100 (11062) with the controller PCF8833, you must change the operating mode to 16bits.

Below is some information with pictures of how to make this change and how to set PCF8833.

 

colorLCD.h

colorlcdhinfo.png

 

colorLCD.c:

colorlcdcinfo.png

 
Now you had a much better performance of colors, colors more vibrant and visible on the screen.
 
Have fun.  :smile:
Link to post
Share on other sites

 

To write the text I do drawString (x, y, "text")
but how do I write here instead of a text that I have a variable in the program after a calculation processing.

 

After searching:

 

Use:

 

 

 

#include <stdio.h> //require for sprintf

char buffer[];
value=50;

sprintf(buffer,"R:%ld",value);

drawString(x, y, buffer);
 

:smile:

Link to post
Share on other sites
  • 3 weeks later...

Then connect the pins as follows: CS - P1.0 SCK - P1.5 DIO - P1.7 RESET - not using reset, tie it to any available pin on your LaunchPad and add a piece of code to reset your LCD before configuring. Alternatively, you can just tie it to Vcc. You must also connect Vcc and GND.

// pins

#define LCD_SCLK_PIN BIT5             // SCK

#define LCD_SCLK_PORT P1OUT

#define LCD_SD_PIN BIT7                 // DIO

#define LCD_SD_PORT P1OUT

#define LCD_SD_PORT_IN P1IN

#define LCD_SD_DIR P1DIR

#define LCD_SCE_PIN BIT0               // CS

#define LCD_SCE_PORT P1OUT

#define LCD_DC_PIN BIT4                 //  ?  -   What is this? And do this for PCF8833?

#define LCD_DC_PORT P1OUT

Link to post
Share on other sites

Thanks. But it is used in the code, regardless of the type of controller:

 

 

// code duplication, but we are saving clock cycles by not passing dataCommand
void writeData(u_char data) {
    u_char c = 0;
    LCD_SELECT;
#ifdef SPI9BIT
    LCD_SD_OUT_HI;
    LCD_CLOCK;
#else
    LCD_DC_HI;
#endif
    while (c < 8) {
        (data & 0x80) ? (LCD_SD_OUT_HI) : (LCD_SD_OUT_LO);
        LCD_CLOCK;
        data <<= 1;
        c++;
    }
    LCD_DESELECT;
}
 
// code duplication, but we are saving clock cycles by not passing dataCommand
void writeCommand(u_char data) {
    u_char c = 0;
    LCD_SELECT;
#ifdef SPI9BIT
    LCD_SD_OUT_LO;
    LCD_CLOCK;
#else
    LCD_DC_LO;
#endif
    while (c < 8) {
        (data & 0x80) ? (LCD_SD_OUT_HI) : (LCD_SD_OUT_LO);
        LCD_CLOCK;
        data <<= 1;
        c++;
    }
    LCD_DESELECT;
}
 
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...