pcesar12 0 Posted February 20, 2013 Share Posted February 20, 2013 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? Quote Link to post Share on other sites
pcesar12 0 Posted February 21, 2013 Share Posted February 21, 2013 i try connect CS - P1.0 SCK - P1.5 DIO - P1.7 i solve the _delay_cycles problem but not working i see only dark blue screen. damn need help. Quote Link to post Share on other sites
pcesar12 0 Posted February 21, 2013 Share Posted February 21, 2013 worked, now only thing I'm finding strange is that the screen light starts strong and go weakening, will not give up almost to see some information about light? color problem mbed version: msp430 version: why bad color in msp 430? Quote Link to post Share on other sites
pcesar12 0 Posted February 21, 2013 Share Posted February 21, 2013 Hey i try put setColor16(COLOR_16_GREEN); drawString(5, 5, "TESTE TESTE TESTE"); and i see RED COLOR IN LCD o.O OMG what is happening? Will the color mapping for the PCF8833 is wrong? Quote Link to post Share on other sites
RobG 1,892 Posted February 22, 2013 Author Share Posted February 22, 2013 Use 8 bit color with PCF8833 (setColor(color).) I don't think I ever used other color depths on PCF8833 based displays, so you will have to figure out how to map them. pcesar12 1 Quote Link to post Share on other sites
pcesar12 0 Posted February 24, 2013 Share Posted February 24, 2013 I managed to fix, I made a new configuration for the PCF8833 now he is running in 16-bit is much better colors, then step guidelines on how to do this. Quote Link to post Share on other sites
pcesar12 0 Posted February 26, 2013 Share Posted February 26, 2013 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. Quote Link to post Share on other sites
pcesar12 0 Posted February 26, 2013 Share Posted February 26, 2013 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 colorLCD.c: Now you had a much better performance of colors, colors more vibrant and visible on the screen. Have fun. Quote Link to post Share on other sites
pcesar12 0 Posted February 27, 2013 Share Posted February 27, 2013 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); Quote Link to post Share on other sites
Bujhm666 0 Posted March 15, 2013 Share Posted March 15, 2013 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 Quote Link to post Share on other sites
RobG 1,892 Posted March 15, 2013 Author Share Posted March 15, 2013 DC is data/controll. PCF8833 uses 9 bit SPI so DC is not used (bit #9 is used for this.) Quote Link to post Share on other sites
Bujhm666 0 Posted March 15, 2013 Share Posted March 15, 2013 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; } Quote Link to post Share on other sites
RobG 1,892 Posted March 15, 2013 Author Share Posted March 15, 2013 When using PCF8833, you define SPI9BIT which is used in the conditional below. #ifdef SPI9BIT LCD_SD_OUT_HI; LCD_CLOCK; #else LCD_DC_HI; #endif 9 bit SPI will set data pin and generate clock, 8 bit SPI will set DC pin. Quote Link to post Share on other sites
Bujhm666 0 Posted March 16, 2013 Share Posted March 16, 2013 Understood. Thank you again. Quote Link to post Share on other sites
spirilis 1,265 Posted March 20, 2013 Share Posted March 20, 2013 Rob- Can I copy your font_5x7.h? Want to use it for my Okaya (ST7579) lib for my Renesas RX projects. I'll keep your authorship info in the file. 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.