Arduino Forum

Forum 2005-2010 (read only) => Hardware => Interfacing => Topic started by: tkj on Mar 14, 2009, 02:08 pm

Title: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Mar 14, 2009, 02:08 pm
Hi.
I've finally got the Nokia LCD i've ordered from Sparkfun: http://www.sparkfun.com/commerce/product_info.php?products_id=8600
Then i followed the guide on Arduino Playground: http://www.arduino.cc/playground/S1D15G10NokiaLCD/S1D15G10NokiaLCD and made the transistor voltage divider using


Then i used the 3V3 pin on the Arduino to get the 3.3V, and then i connected everything as shown.
Then i programmed the Arduino using the example code, and when it was programmed nothing happend!
The LCD was only Purple and hummed very much (caused by the backlight StepUp converter)

I have tried to find the problem, but I can't!
If i disconnect the LCD and the I/O lines from the Arduino, and then connect to test the voltage deviders, the output is 3.25-3.27V when I apply 5V - so no problem there!

Best Regards
Thomas Jespersen
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Mar 18, 2009, 11:03 pm
Have anyone worked with this board and display from Sparkfun?
Have anyone worked with the sample code from Arduino Playground?
Have anyone got it working (Board connected to Arduino as shown)?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: weirdo557 on Mar 19, 2009, 02:46 am
the lcd draws around 324 milliamps at 3.3 volts. the 3.3v pin can only supply 50 milliamps, you might need some external voltage regulator to power it.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Mar 19, 2009, 09:58 pm
You think that could cause the problem?
How much can the 5V then sink, because i have an LD33V (3V3 Voltage Converter)
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Mar 21, 2009, 12:28 pm
Now i've tried with an LD33V and it still doesn't work :(
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: IanH on Mar 21, 2009, 09:47 pm
You'd still be at 214 milliamps right?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Mar 21, 2009, 09:50 pm
214 milliamps, 324 milliamps - now I'm confused!
I don't know how much it draws, but I'm using an external power supply, an LD33V for the 3.3V, and the 5V on the Arduino for the Backlight.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: KioseusZnook on Mar 21, 2009, 10:15 pm
I've only had a quick read and it's hard to grasp from your words what you've done already so I may be wrong here; as you're now using two separate power supplies (the external 3V3 and the Arduino's 5V) in the same circuit have you connected both of their GND (0V) rails together?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Mar 22, 2009, 12:29 am
Yes I have.
You know, the 5V and ground from the Arduino is going into the LD33V, which then produces a 3.3V signal!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: weirdo557 on Mar 22, 2009, 01:59 am
is it still purple and humming?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Mar 22, 2009, 08:58 am
Purple/Blue, yes, it's the startup color.
And it's still humming, as it's the backlight voltage converter!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Mar 25, 2009, 05:53 pm
Aren't there anybody on this forum who have connected the Nokia LCD Board from Sparkfun to the Arduino, and then got it showing something?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Apr 01, 2009, 08:50 pm
Help please!!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on May 03, 2009, 08:10 pm
Please, if anyone have got it working, please tell me/us how!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: snahl on May 05, 2009, 03:57 pm
Hi,
I've got the Nokia 6610 LCD Display from http://www.nuelectronics.com and it works pretty well for me.
Same as http://www.sparkfun.com/commerce/product_info.php?products_id=8683

Even though my application uses a slightly different LCD Module, nevertheless I thought I give you this hint - it might get you a step further.
The Nokia 6610 (from nuelectronics.com) works only with the ARDUINO IDE 0011.
More details about this project here at:http://www.halo-photographs.com/remote-shutter-release-timer/.

For my part, when going through the menu-pages ARDUINO resets itself. Probably an issue with variables - don't know yet. Hints are highly appreciated.

Please let me know if this helped you to get a step further.

Rgds, Hans.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: average_male on May 15, 2009, 07:04 am
I can post my HEX file here and you can upload it to your arduino to see if its code or set up. Please note that I used the Phillips driver code using this pin setup:

#define SPIPORT PORTB
#define SPIDDR DDRB
#define CS 2
#define CLK 5
#define SDA 3
#define RESET 4


Hex File: http://ukohtq.blu.livefilestore.com/y1pwwnuqLbNseHMCfTA2-dL3KM9N5d6R316OJcUm7VCXRDCVzKEzf02Op1zehGc-TH0cugAJbW3J5oi8izxMJSEHg/Nokia_Phillips_1.hex?download

Based off of the work of Thomas Pfeifer at: http://thomaspfeifer.net/nokia_6100_display_en.htm
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on May 15, 2009, 07:20 am
@Moe Howard 2000
Thanks, but the Sparkfun module is using the Epson driver!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: zooto68 on Jun 12, 2009, 01:31 pm
Did you manage to get this going? I was considering getting one of these but not if you have had trouble.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jun 12, 2009, 02:24 pm
Nope, I didn't get it working!
I don't know if it's me who isn't connecting it properly (I've tried both the resistor and transistor method without luck), or if it's the display which isn't working :(
I haven't tried the 74LC chip method though!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jun 27, 2009, 10:45 pm
I got the same problem here, I've tried a few different external power supplies and still only get a blank screen. No humming for me though, lol.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jun 29, 2009, 03:18 am
Well turns out it was my wiring is why my screen wasn't working! I have the LCD with the Epson driver, and has a voltage booster on board so no need for the external power supply!
I got it connected and was able to type whatever I want, with the like 12 colors the code had. Now my problem is.. I don't understand all of the code, was hoping there was a library out, I found one, but for some reason it's not working with the Arduino IDE I have.
http://blog.lukrop.bplaced.net/archives/Nokia-6610-LCD-+-Arduino.html

But the one that does work, doesn't have any libraries, and I just don't have the experience under my belt to make a library yet :P
http://gravitech.us/MicroResearch/Others/LCD6100/LCD6610_Arduino.pde
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jun 29, 2009, 09:21 am
This one isn't Arduino code (http://blog.lukrop.bplaced.net/archives/Nokia-6610-LCD-+-Arduino.html)
It's C code which can be compiled with WinAVR for example!

I will take a look on the other.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: zooto68 on Jun 29, 2009, 05:15 pm
Arduino Code = C Code
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jun 29, 2009, 06:13 pm
Haha, I'm so very confused now!

So, that was or wasn't Arduino code?

The only real issue I've had so far, is getting a good library. I've gone over the library writing tutorial a few times, and it seems pretty easy. Until I take a look at longer code that I'm trying to break down into a library, I get overwhelmed.
The second link I posted earlier, the code works, but it's more just sample code, no real useful commands. And I wasn't able to set a background color. Maybe it's just my in-experience.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jun 29, 2009, 07:15 pm
Arduino Code is C code - Yes.
But the code you found that can't be compiled with the Arduino compiler is real C code - Arduino Code is an easier version of C (you don't need to include a lot of extra ATMEGA compiling related things)
When you click Compile in Arduino, your Arduino code is compiled to real C code, and then afterwards compiled to a HEX!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jun 29, 2009, 07:19 pm
Oh.. haha, smooth.. go me :)
So, if that's the case, what about the zip files on the site? Those aren't Arduino compatible either?

I haven't actually tried the code it self so had no idea, but only because I haven't gotten the "libraries" to work. Or what I think/thought are libraries.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jun 29, 2009, 07:24 pm
I'm not sure if the Libraries is Arduino compatible, but I don't think!
But I'm sure that the code snippet can't be used, as this line "#include <WProgram.h>" is allways added before HEX compiling, as that's the ATMEGA HEX Compiling Settings.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jun 29, 2009, 07:36 pm
Well, from the pictures and what the guy says, it's all based on the Arduino setup. He said the library was written for the Arduino platform, not 100% sure if that's the same as the Arduino IDE (Assuming they're different)
I could have it all mixed up and be completely wrong, cause I don't have any technical idea of what's going on. I just read and hope it's right, lol :)
Thanks for taking the time to help me try understand :D Much appreciated.
Here's the setup the guy used with his LCD, using those Arduino files, but it was quite a while ago, so I'm not sure how the updated IDE would affect it.
(http://blog.lukrop.bplaced.net/uploads/aufbau.jpg)

Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: zooto68 on Jun 29, 2009, 08:07 pm
The Arduino is programmed in bog standard C, no different than any other C. It is based around the AVR-GCC libraries. What it does have is abstractions for the more 'advanced' stuff, i.e. port access, etc. and all they are is libraries sitting on top of C to make things easier for the user. Apart from that, any standard C program will work. If the C is for a different microcontroller you would obviously need to port it over to the hardware you are using, i.e. The Arduino.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jun 29, 2009, 08:27 pm
Oh, thanks for that information Mike Mc.
It's good to know another time ;)

So the library CaptainObvious has found can be used with Arduino IDE? Then why can't it be compiled?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jun 30, 2009, 02:33 am
Indeed, thanks alot Mike, makes alot more sense now.

I'm with Thomas on this one, confused why it won't work, but I have a few theories. I'm assuming because it's old code and just needs to be updated, but I'm optimistic.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: zooto68 on Jun 30, 2009, 11:25 am
It should compile fine. Has he installed those external libraries first?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jun 30, 2009, 11:26 am
CaptainObvious - Yeah, I think soo too..
The Arduino IDE has changed alot the past, so that could be the problem why it can't be compiled!
But who is willing to recode the library for use with the newer Arduino IDE?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jun 30, 2009, 08:19 pm
Thomas, you took the words right out of my mouth!
Haha, I've been trying to spend some extra time, creating and breaking down some libraries to try get a feel for em. But with as new as I am to code, it's just more confusing than anything.
And I'm wondering if it would be better to start with pre-exsisting library codes, or use the new sketch that actually works to start a new library. Regardless! I won't stop till I find an easier way to use my LCD! :D

And with the sketch I'm using right now, I have no idea what so ever how to use input values and print them on the screen :/
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jun 30, 2009, 10:22 pm
The sketch you are using, which works, is pretty easy to convert to a library.
I will give it a try :)
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jun 30, 2009, 10:42 pm
@Mike Mc: Installed external libraries? Not really sure  :-? I just downloaded the zip file and extracted it to arduino0016/hardware/libraries  in a folder, then get all the errors.

@Thomas J: Muchos gracias! I've been trying, based on some of the tutorials for building the libraries but I think I just need more understanding of code ::)

I just ordered my 2nd Arduino, and another 328 upgrade chip, along with some 433mhz RF kits, oo lala! :D
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jun 30, 2009, 10:51 pm
Library is finished - and it can compile without problems.
I can't test it though, as I haven't connected my LCD yet, and I don't want to right now!

I will upload the code to my homepage (http://elec.tkjweb.dk/blog) in a moment...
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jun 30, 2009, 11:26 pm
I thought it would compile fine, but it didn't - my bad  :-X
It's made to a correctly library, but you get theese errors when you start Arduino - and I can't solve it myself...

Code: [Select]
NokiaLCD.cpp:195: error: no 'void NokiaLCD::shiftBits(byte)' member function declared in class 'NokiaLCD'
NokiaLCD.cpp: In member function 'void NokiaLCD::sendData(byte)':
NokiaLCD.cpp:259: error: 'shiftBits' was not declared in this scope
NokiaLCD.cpp: In member function 'void NokiaLCD::sendCMD(byte)':
NokiaLCD.cpp:275: error: 'shiftBits' was not declared in this scope


You can download the library (with example) here: http://elec.tkjweb.dk/blog/wp-content/uploads/NokiaLCD.zip
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jun 30, 2009, 11:36 pm
Omg, haha, you sir.. are amazing!
I looked in the NokiaLCD.h file, and turns out you missed your F in Shift bits on one of the defines.. put in the F and it compiled fine!

Now to start experimenting, thanks again, very much!! I may be asking later how to add commands to the library. :D but for now, need to try!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jun 30, 2009, 11:42 pm
You're right - I've missed that :P
So, is it working?

I've re-uploaded the working library (with example) here: http://elec.tkjweb.dk/blog/wp-content/uploads/NokiaLCD.zip
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jun 30, 2009, 11:48 pm
Yes! It's working like a champ!
Already have my arduino and the lcd hooked up on a breadboard, so just plugged in, uploaded sketch and badabing bada boom!

I did a quick search, and I'm sure I looked for the wrong thing, but is there a way to turn read values from the board into the spi bits? Or whatever it is I need to input them on the screen?
I'm just looking to do some basic interfacing right now.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jul 01, 2009, 12:09 am
If you want to for example take a an Analog read and print it on the screen, you can add this code to the bottom of the example (before the close bracket)

Code: [Select]
// Put this at the top - just about the void setup()
int analogValue;
char analogString[4];

// Put this just before the last closing bracket - just after the nokiaLcd.lcd_clear(BLACK,0,0,131,131);
analogValue = analogRead(0);
itoa(analogValue, analogString, 10);
strcpy(text,analogString);
nokiaLcd.lcd_draw_text(YELLOW, BLACK, 35, 5, text);

delay(2000);
nokiaLcd.lcd_clear(BLACK,0,0,131,131);


Also, please tell me how you connected the display to the Arduino? If you could, please take some pictures of your Arduino and the breadboard!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 01, 2009, 01:20 am
Awesome, works perfectly, thanks again! Well while I'm posting to such a skilled coder, haha :) how do I go about changing the background color?
Now, with the sample sketch, and any time I clear the LCD every 2 seconds or so, the background will stay black when it's displaying the text, but the screen resets every 2 seconds, I'm sure there's an easier way!

And I would take pictures.. haha I just tried and let's just say my pictures aren't worth nearly a thousand words.. :P
I couldn't even make out what half of the stuff was in the picture, haha I tried semi-close and far away, was either too blurry or just too far away.
Though, I will explain how I hooked up the pins! (And be advised, the LCD I purchased has an onboard dc-to-dc booster (lol think thats the right word) where alot of the 6610s need an external power supply.)

Arduino            
Digital pin 2: BL (Back Light controller)          
Digital pin 3: CS (Chip Select)
Digital pin 4: SCLK (Serial Clock)
Digital pin 5: SDATA (Serial Data)
Digital pin 6: RESET (lol, Reset!)
Arduino 5 Volt : VCC (Power), And VBL(Voltage Booster for 7v backlight)

Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 01, 2009, 03:38 am
Woot!
I have a very-ghetto "Etch-a-Sketch" sketch at the moment! Complete with X and Y indicator!
Code: [Select]
/*
 Nokia LCD Demo - A demo using the NokiaLCD library for a Nokia LCD with the epson driver.
 Created by Thomas Jespersen, July 2009 (Originally Arduino Sketch by Gravitech.us)
 Released into the public domain.
 Edit by CaptainObvious - Ghetto Etch A Sketch
*/

#include <NokiaLCD.h>

// Nokia LCD Setup settings
#define RED                  0xE0
#define GREEN                  0x1C
#define BLUE                  0x03
#define YELLOW                  0xFC
#define MAGENTA                  0xE3
#define CYAN                  0x1F
#define BLACK                  0x00
#define WHITE                  0xFF
NokiaLCD nokiaLcd;

int potPin = 2;    // X Position
int potPin2 = 3;   // Y Position
int lcdDraw = 0;    
int lcdDraw2 = 0;  
char analogString[4];
char analogString2[4];

void setup()
{
 DDRD |= B01111100;   // Set SPI pins as output
 PORTD |= B01111100;  // Set SPI pins HIGH
 
 nokiaLcd.lcd_init();
 delay(500);
}

void loop()
{
char text [50];   // Not 100% sure if this is text size or what
analogRead(potPin);
analogRead(potPin2);

itoa(lcdDraw, analogString, 10);   // Not really sure what itoa is, but it's important!
itoa(lcdDraw2, analogString2, 10);

strcpy(text, analogString);     // First pot # input, printed in BLUE
nokiaLcd.lcd_draw_text(BLUE, BLACK, 100, 115, text);
strcpy(text, analogString2);    // Second pot # input, printed in RED
nokiaLcd.lcd_draw_text(RED, BLACK, 100, 105, text);

lcdDraw = analogRead(potPin)/8;
lcdDraw2 = analogRead(potPin2)/8;

nokiaLcd.LCD_put_pixel(RED, lcdDraw, lcdDraw2);


}


Will be adding a button to clear screen shortly, and when it shows the position, once it's above 100, 3 Digit spots open, and the last digit is filled with a 0 if it's below 100. So anything that's < 100, will show up as "990" when it should be 99, "420" when it should be 42, etc.
But other than that, I can't thank you enough Thomas!
I'm also hoping to add a menu option, be able to choose etch a sketch or a couple other ideas, but first things first!

Much appreciative,
Captain O!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 01, 2009, 08:14 am
Well I've been becoming an artist over night! (hardly)

Now I'm stuck with creating a menu, or menus! (And many other things but this feels important) I'm guessing I'll be editing my .cpp and actually code in the screens, I'm just not sure how to use words as input? I guess? Being able to highlight my selection as I scroll up and down. Using either 2 buttons for up and down, 1 for select, or just a potentiometer I'm using for drawing, for a menu selection tool.

I got down how to change the background color of text only, not the background color of the whole LCD. So animating the highlighting would be easy, just coding the selection part is my problem! Not even sure what to ask, or where to begin, hope I got it out right!

Thanks in advance!
:D
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jul 01, 2009, 09:59 am
Sounds good... Very nice project you've made :)
About the connection, don't you need any voltage converter for the different lines? Aren't the display running on 3.3V!
I have a display with voltage booster for the backlight too - http://www.sparkfun.com/commerce/product_info.php?products_id=8600

About the backlight color, you can use (change, as it's already in the code) this code line.
Code: [Select]
nokiaLcd.lcd_clear(BLACK,0,0,131,131);
The lcd_clear command just makes a square box with the color,x1,x2,y1,y2 parameters! I hope you understand that  :P

Also, I can see that you don't know what the "itoa" command is.
It's a integer to string command, which converts a integer to a string so it can be used as a char* parameter.
There is also the "atoi" command, which converts a string (char*) with numbers into a integer value.

Sprintf can do the same as both of them, but it use 1.5K of code, while theese only use a couple of bytes :)
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 01, 2009, 10:12 am
Actually I have both the BL and VCC connected to 5v. No problems so far, hope I don't damage anything  :-X

Well, when I use the lcd_clear command, it does just that, it clears. When I have any information on the screen, it just looks like it's flashing because it keeps looping, and if I put in a delay, it just flashes, but slower. :P

And yes I understand the parameters, I think, haha battle ship! :) But minus the letters. As for the itoa, doesn't make too much sense to my noobness at the moment, but slowly but surely everythings making more sense. :)
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jul 01, 2009, 10:24 am
You can change the X1,X2,Y1,Y2 parameter to only clear an area... So if you want to flash the background of only a little area (making a flashing box) you could do this:
Code: [Select]
nokiaLcd.lcd_clear(BLUE,0,0,10,10);
delay(200);
nokiaLcd.lcd_clear(GREEN,0,0,10,10);
delay(200);


But wouldn't this works for flashing the background of the text?
Code: [Select]
nokiaLcd.lcd_draw_text(WHITE,BLACK, 100, 105, text);
delay(200);
nokiaLcd.lcd_draw_text(BLACK,WHITE, 100, 105, text);
delay(200);


Also please tell me, is it the same display you have, as I have?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 01, 2009, 10:45 am
Actually, I have the 6610, I believe the one you're using is the 6600. I read your first post, I have the same controller as yours. Well here, check this website, it has everything I started with lol the newbie code, and there are some amazing PDFs
http://store.gravitech.us/13secogrlcd.html
There's a like 130 page tutorial on how to write code for the LCD driver, but it's just way above my head.

And @ the flashing, I don't want it to flash! haha, I'm just looking for a background color. (I just fixed it, turns out I had the lcd_clear in my loop.. so no wonder it was going to flash really fast)!

Using nokiaLcd.lcd_clear(BLACK, 0, 0, 131, 131);
The background does turn black, but it blinks very fast, not a background.

EDIT:
Oh, ... reading the main reason for this post, lol
When I was hooking up the screen for power, uh, I'm not sure if it would be parallel or series, but I ran 5v to the power rail on the bread board, and spread the power out there, including both the VBL and VCC. And of course, did the same with ground.  
When I tried using resistors and even the transistor, I had problems. But I couldn't get anything to show up at all with the tutorial on the Arduino website for the Epson controller.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jul 01, 2009, 11:28 am
Your display is a 3.3 to 5V display which is very nice.
You can just connect it directly to the Arduino - so you are pretty lucky as I can't! :D
It because it has an 74LCX245 onboard, which is a Voltage Converter...
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 01, 2009, 11:12 pm
Ah, I thought I posted that earlier somewhere.
But I also paid $40 after shipping, and I got it within 3 days.

Stupid voltage converters.. :X
Do you know of any code I could take a glance at and figure out how to set up a menu? I tried looking through the Nuelectronics Nokia shields library, but yeah.. no good! :D
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jul 02, 2009, 12:04 am
I won't make your projects :P
But I will help you getting started, and that's what I've done so far...
Now, try on your own - you have a complete library to use  :o
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 02, 2009, 12:16 am
Haha, no no! I thank you much! I'm trying to learn as much as I can, I'd rather you not make it :D

I'm just a little confused on where to start with making a menu, haha but that's part of the game I suppose! :D
Well wish me luck! :)
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: blip on Jul 05, 2009, 07:40 am
Hey guys, I gave this a spin using one of the sparkfun Nokia LCD boards.  It sorta works - I'm getting garbled blue and white junk on the lcd. I can make out the text - just.

I'm assuming these are still shipping with the Epson controller.

Who's tried the Sparkfun board - did you hook up the pin 2 to anything?

#define BL 2          // Digital 2 --> BL
#define CS 3          // Digital 3 --> #CS
#define CLK 4         // Digital 4 --> SCLK
#define SDA 5         // Digital 5 --> SDATA
#define RESET 6       // Digital 6 --> #RESET

Any ideas anyone? It's got me puzzled!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: blip on Jul 05, 2009, 07:55 am
Hmm. Gravitech had some smaple code for the Philips controller. That just gives me blue screen, so I've definitely got Epsons. I have two and they are both doing this.

I've tried it on two different 3.3v Arduinos, re-did my wiring. Same results.  I can see that even with the backlight powered off, the same thing is happening, so I don't think it's noise related.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 05, 2009, 08:31 am
I'm not sure if none of them have the dc-to-dc converter, but the couple people I talked to, didn't include it.
I got mine from Gravitech.us and it came with the voltage booster (dc-to-dc converter), boosting 3.3v or 5v to 7v, which is what is required for the backlight.
So you may have to try out the tutorial from the Arduino website, trying to hook up the power as suggested
http://www.arduino.cc/playground/S1D15G10NokiaLCD/S1D15G10NokiaLCD

But, if you've read through this post completely, you'll see that somebody else tried to hook up all the voltage dividers and whatever else is on that page, and didn't have any luck.
So I'm not 100% sure as far as the sparkfun LCDs go.
But, I did have the same issue, just a black screen, but that was before I hooked up the VBL (power-boosting backlight) and the VCC to the same power supply, then I got the lame gravitech blinking sample!
Also, try a second power supply for the VCC, but BL on the arduino still.

Best of luck.

EDIT: You said you tried the Phillips sample code, but what about the Epson sample code? PS, you can thanks Thomas J for the LCD library for the epson controller, scroll up a bit and download it.
http://gravitech.us/MicroResearch/Others/LCD6100/LCD6610_Arduino.pde  I just uploaded this, and followed the pin setup from the sketch, didn't work my first time.. I disconnected it, tried again the next day, and worked.. must've missed something when I was connecting it, haven't had any issues since.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: blip on Jul 05, 2009, 01:08 pm
The Sparkfun board has the voltage booster for the backlight - it's almost the same setup as the Gravitech one. The fact that there is something getting through to the LCD controller...enough to get some text on there, but the colors and stuff seems all screwed up has got me baffled. I hope there is not some problem with this batch or something.

Ive tried a few different combinations with power supplies, no change.

You've given me hope, I'll pull it all apart and hook it up again from scratch in the morning. Over it for today. >:(

BTW - I'm using teh latest version of the IDE (Arduino-0016) is that what you guys are running?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 05, 2009, 03:12 pm
What do you mean the colors seem screwed up?

Unplugging and plugging in the board from the Arduino (or breadboard, from 5v to Arduino in my case), caused funky colors, and even 1 line of LCDs to be.. brighter than the others, but again, the brighter line hasn't showed up and no funky colors!
But I don't unplug it without unplugging the Arduino anymore, had me skurred I ruined a line.
What do you mean by getting messed up colors? Just like, red not showing up as red? etc.

And if you have the voltage booster, no external circuitry should be needed, where do you have your VBL setup? (the voltage booster) Make sure that's in 5v or 3.3v, and make sure the VCC and VBL are on the same voltage, I had issues trying to hook up the VBL on 5v, and VCC on 3.3v.
Sorry if any of this seems really obvious but it's those obvious things that usually get me in the end :D Just trying to give perspective from my issues.

I'm using 0016 as well. I would contact Sparkfun and give them the heads up.. they're really good at taking care of customers. I've yet to get a bad item from them.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: blip on Jul 06, 2009, 03:18 am
(http://blip.com.au/images/nokia.jpg)
Strange thing is that the image is solid and flips back and forward like the demo should, just that it's all junk.

I've dropped Sparkfun support an email.

I tried putting decoupling capacitors on the power, tried some terminating resisitors on the data lines. Frustrating.

I can'd find an example of anyone directly interfacing a 3.3v arduino/atmel  to this board. ThomasJ is using a 5v board with interfacing. Wah.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: blip on Jul 06, 2009, 04:23 am
Just tried it with a 5v Arduino, but ran all the data lines through logic level converters to get them down to 3.3v...and the results were..THE SAME. :-[
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 06, 2009, 04:57 am
Very interesting.. Uhh.. wow.. haha I wish I knew where to even start.. and you're sure you're using the right code?
And it's even displaying upside down.. (unless that's how it's suppose to display)
Yeah, I couldn't get mine to work properly with the 3.3v, everythings connected to 5v for me. And about Thomas, I'm not even 100% sure he's got his setup yet, he hasn't commented about it. :P
Do you have any random brown outs? Where the Arduino resets because somethings drawing too much power.

If you got that far, doesn't really seem like a power supply issue to me. I would give the Nuelectronics Nokia code a try, you may have to change a little bit of code to get it to work.
http://www.nuelectronics.com/download/projects/Nokia_lcd.zip
They're using the 6600, rather than the 6610. I'm not real sure how different the code is, not my best area. (My best area is probably random ranting:D lol)
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: phokur on Jul 06, 2009, 05:36 pm
Hi all, great progress so far. I am also using SparkFun's Nokia lcd with the breakout board. (sku: LCD-08600)
I'm stuck how my pins don't seem to line up with what anybody has posted. I don't have pins labeled BL, SCLK, SDATA, or VCC.
My breakout board has the pins pictured on the site: S1, S2, CS, SCK, DIO, RESET, STAT2, STAT1, STAT0, GND, 3.3V, and VBATT.
Am I missing something?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 06, 2009, 05:55 pm
Well
S1 and S2 = Switch one and Switch two (the two extra buttons)
SCK = SCLK
STAT 0 through 2 = Looks like the pins for a tri-color LED
Not really sure about DIO

But I just searched the Sparkfun forums, try this out guys.

See if this works for you! One person said he had the LCD showing up, upside down.. another person had every color show up as purple. A few slight changes in code looks like it might help.

Best of luck!

http://forum.sparkfun.com/viewtopic.php?t=13409&highlight=nokia+6100
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: phokur on Jul 06, 2009, 08:23 pm
Ok, got it working (although I'm having the same issue with garbled output for now). For anybody who has the same board as myself from SparkFun.
Arduino    LCD08600
N/A          S1 (Pushbutton 1)
N/A          S2 (Pushbutton 2)
Pin 3        CS (Chip Select)
Pin 4        SCK (Serial Clock)
Pin 5        DIO (Serial Data)
Pin 6        RESET (Reset)
N/A          STAT2 (Green Status LED)
N/A          STAT1 (Blue Status LED)
N/A          STAT0 (Red Status LED)
Gnd         GND (Ground)
3V3         3.3V (Power)
3V3         VBATT (Backlight Power)
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jul 07, 2009, 09:52 am
Hi everybody.
I haven't said much in the past because I'm on vacation, but now I got a computer in an hour!

The board I have is the Sparkfun board with button and Tri-LED. I haven't got it working either, but I would like to point out that the Sparkfun board DOESN'T have a 5V to 3.3V translator, so every data line needs to be converted to 3.3V!
I haven't had any succes with that yet - but I'm hoping someone else who has the same board as me can figure out how to get it working...

This is the board I have: http://www.sparkfun.com/commerce/product_info.php?products_id=8600

Best of luck from Italy (where I am :P)
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: phokur on Jul 07, 2009, 04:24 pm
So I've gotten it to draw solid colors. They're off, I'm not sure what the right hex codes would be, they're just 0-255. RGB should be FF-FF-FF...
Anyway, if you replace the clear function with mine below, although slow, it seems to be progress. I've messed with adding a delay to slow the clock but that didn't make a difference. The resistors I had on hand only allowed me to take the 5v outputs to 2.7v instead of 3.3v. I suppose that could be an issue but I doubt it since I am still displaying something.

Code: [Select]
void lcd_clear(byte color, byte x1, byte y1, byte x2, byte y2)
{
 for(unsigned int i=y1;i<=y2;i++)
{
 for(unsigned int j=x1;j<=x2;j++)
 {
   lcd_draw_text(color, color, j, i, " ");
 }
}
}
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 07, 2009, 04:32 pm
Well keep in mind, under powering something can be just as bad as overpowering it.
Not in all cases, but a general rule of thumb I likes to follow.

But I didn't realize it had to be brought down to a 3.3v logic, that's no fun :X
I'm glad I got the easier bit, I paid a few bucks more, but I'm a newb so the plug-and-plug really helped :D
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: phokur on Jul 08, 2009, 07:54 pm
I fixed my divider so I now have 3.27v, no difference. Here is new lcd_clear code that refreshes much faster.
Still have the colors a little off and the text is distorted. But it's progress...
Code: [Select]

void lcd_clear(byte color, byte x1, byte y1, byte x2, byte y2)
{
 lcd_set_box(x1,y1,x2,y2);
 sendCMD(RAMWR);
 for(unsigned int i = 0; i < (((x2-x1+1)*(y2-y1+1)) / 2); i++)
 {
   sendData((color >> 4) & 0xFF);
   sendData(((color & 0xF) << 4) | ((color >> 8) & 0xF));
   sendData(color & 0xFF);
 }
}
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: phokur on Jul 09, 2009, 02:08 pm
This has made it functional for me. I'm using lcd_clear to manually draw everything and updated my colors as following.

Code: [Select]

 // Data control
 sendCMD(DATCTL);
 sendData(0x00);
 sendData(0x01);
 sendData(0x02);

Code: [Select]

// 12-bit color definitions
#define GREEN                  0xE0
#define RED                  0x1C
#define BLUE                  0x03
#define YELLOW                  0xFC
#define TEAL                  0xE3
#define PINK                  0x1F
#define BLACK                  0x00
#define WHITE                  0xFF
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: phokur on Jul 09, 2009, 03:13 pm
The final piece to the puzzle, the fonts are now working. They're larger then before (not a bad thing).

Code: [Select]

void draw_text_line(byte fcolor, byte bcolor,byte x, byte y,char c)
{
 lcd_set_box(x,y,x,y+15);
 sendCMD(RAMWR);
 for(unsigned int i=0;i<8;i++)
 {
   if (1<<i & c)
   {
     sendData((fcolor >> 4) & 0xFF);
     sendData(((fcolor & 0xF) << 4) | ((fcolor >> 8) & 0xF));
     sendData(fcolor & 0xFF);
   }
   else
   {
     sendData((bcolor >> 4) & 0xFF);
     sendData(((bcolor & 0xF) << 4) | ((bcolor >> 8) & 0xF));
     sendData(bcolor & 0xFF);
   }
 }
}


So to sum up what you need for the SparkFun Nokia 6100 lcd knockoff to work with the arduino is the Gravitech code with my modified lcd_clear, data control, color definitions, and draw_text_line.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jul 12, 2009, 03:07 pm
It's good to see that you phokur have "refurbished" the code, making it faster.
When I get home I'll update the library with the changes...
In the meanwhile I hope others can get their display working using this code - but I still don't think I can get mine working :(

Please help...
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Jul 12, 2009, 03:20 pm
Woot, thanks for the updates Phokur :)
I got a couple questions, I've tried looking up some other libraries from other LCD libraries to see how to create a Menu.. with no luck.. I can generally take some code and tweak it to my own.
I experimented (and failed horribly) with using if  and trying to use some switch  functions, using a potentiometer to highlight text depending on the value.. and a button to start an application of sorts, haha but yeah.. no luck.
If somebody could point me in the right area, maybe some books, videos, anything for my newbness! :D

(I don't understand how the code made the text bigger.. reading all the 0xFFs and << & | throws me off real fast and I get overwhelmed lol:/)
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: cory0023 on Jul 13, 2009, 05:48 pm
I've done a few changes to the code, it now all shows up in the right colors on my screen, its not perfect yet, but is a start. Still working out the locations of drawing boxes. Feel free to add/change it. Major changes were I changed the colors to word type rather than byte, allowing it to send in  full color (reds were absent before in the initial code), I also changed some of the fill sizes, as for some reason, it only filled when i went from 0 to 160 square in my draw window. I've also added a few comments as to what values have an effect in certain commands.

http://freetexthost.com/3o6alqaspk

@CaptainObvious, best place to look is in the example code on the arduino site. If you have any specific questions on how things work, feel free to ask, but IMHO the most fun part about using arduinos is the ability to experiment and find out new things.

Cory
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Jul 25, 2009, 12:35 pm
Hi everybody.
Now I'm home again and I've just set up the LCD project using a 74HC4050 for the level conversion and hurray, it showed me that it was alive!

But still, the LCD shows me the same crap as blip's (look at his image)
Does anyone know how to fix that, or atleast what is causing that?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: jbeuckm on Sep 18, 2009, 11:10 pm
I'm working on and will post a code update here this weekend.  I'm using the Sparkfun breakout board.  Can anyone tell me if using 9V to VBat will hurt the board or LCD?
Thanks! :-/
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Sep 18, 2009, 11:20 pm
I'm not sure, so I won't recommend it!

http://www.spakfun.com/commerce/product_info.php?products_id=569
Quote
?LED Backlight - 7V @ 40-50mA (very bright)

Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Sep 19, 2009, 06:06 am
Definately don't want to put 9v to the board directly. The board should have DC to DC converter to raise 5 volts to the 7v required to run the backlight. (I believe it'll work with 3.3 volts as well)

But any higher than that you're risking it. You can use a voltage divider to bring it down to 5v if you NEED to use the 9v. (Keep in mind, 9v batteries don't have very much power.. you'll have a dead battery fairly quick, especially with an LCD connected, you'd be better off to use multiple AA batteries, or another supply:D)

Well.. I've been using the LCD for a base station for my RF kits, just to use it for debugging. I went through the whole PDF that explains how to interface it in like, 140 pages.. I tried to steal the Circle code from the example, but it's not working as expected. When I try draw the circle, it just draws a line at the top of the LCD, *shrug*.

Also on the LCD controller, it shows that there is some EEPROM you can use, how exciting. But anyways, best of luck!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: jbeuckm on Sep 22, 2009, 06:03 am
Thanks for the tips!  I used a 7805l and powered the screen and arduino fine for a while until the 9v ran out.

I made some optimizations and posted the updated code here: http://www.beigerecords.com/joe/?p=378

Has anyone gotten this thing into 8-bit color mode with the sparkfun breakout board?  I tried a handful of things in setup and have only seen 12-bit mode.


Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: tkj on Oct 11, 2009, 07:30 pm
Hi again.
Now I found my Nokia LCD one more time, connected it, and tried the code again, but I'm still experiencing the same problems as blip (look at his image)
Does anyone know how to fix that, or at least why it is happening?
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: rbrsidedn on Oct 18, 2009, 04:03 pm
If it weighed more and wasn't wired to my computer I would have thrown it across the room.

Loaded up cougar's mandelbrott demo and got the blue screen of nothingness.

Loaded up the gravitech code with phokur's changes and got a sorta kinda good result.  There seem to be bleeding pixels in the middle of the blocks.

with the code below, trying to us the 16bit color interface, I get something more than nothing, but less useful.  With a line in the middle that I don't understand at all.

Code: [Select]
/* Nokia 6100 LCD interface
rev - = basically copy of Gravitech LCD6610 (epson) program

*/

const byte DISON = 0xaf; //Display On, 0 byte
const byte DISOFF = 0xae; //Display Off, 0 byte
const byte DISNOR = 0xa6; //Normal Display, 0 byte
const byte DISINV = 0xa7; //Inverse Display, 0 byte
const byte COMSCN = 0xbb; //Common Scan Direction, 1 byte
const byte DISCTL = 0xca; //Display control, 3 bytes
const byte SLPIN = 0x95; //Sleep in, 0 bytes
const byte SLPOUT = 0x94; //Sleep Out, 0 bytes
const byte PASET = 0x75; //Page Address Set, 2 bytes
const byte CASET = 0x15; //Column Address Set, 2 bytes
const byte DATCTL = 0xbc; //Data Scan Direction, 3 bytes
const byte RGBSET8 = 0xce; // 256 color position set, 20 bytes
const byte RAMWR = 0x5c; //Writing to memory, Data
const byte RAMRD = 0x5d; //Reading from memory, Data
const byte PTLIN = 0xa8; //Partial Display in, 2 Bytes
const byte PTLOUT = 0xa9; //Paritial Display out, 0 byte
const byte RMWIN = 0xe0; //Read and modify Write, 0 bytes
const byte RMWOUT = 0xee; //End (?), 0 bytes
const byte ASCSET = 0xaa; //Area scroll set, 4 bytes
const byte SCSTART = 0xab; //Scroll start set, 1 byte
const byte OSCON = 0xd1; //Interfnal Osciallation On. 0 byte
const byte OSCOFF = 0xd2; //Internal Osciallation Off, 0 byte
const byte PWRCTR = 0x20; //Power Control, 1 byte
const byte VOLCTR = 0x81; //Electronic volume control, 2 bytes
const byte VOLUP = 0xd6; //Inscrement electronic volume control by 1, 0 byte
const byte VOLDOWN = 0xd7; //Decrement electronic volume control by 1, 0 byte
const byte TMPGRD = 0x82; //Temperature gradient set, 14 bytes
const byte EPCTIN = 0xcd; //Control EEPROM, 1 byte
const byte EPCOUT = 0xcc; //Cancel EEPROM Control, 0 byte
const byte EPMWR = 0xfc; //Write into EEPROM, 0 byte
const byte EPMRD = 0xfd; //Read from EEPROM, 0 byte
const byte EPSRRD1 = 0x7c; //Read Register 1, 0 byte
const byte EPSRRD2 = 0x7d; //REad Register 2, 0 byte
const byte NOP = 0x25; //No Operation

//Arduino pins for control of LCD, using all PORTD pins for now
int LCDCS = 3;
int LCDSCK = 4;
int LCDDIO = 5;
int LCDRST = 6;

const byte pmin = 2;
const byte pmax = 131;
const byte cmin = 0;
const byte cmax = 129;


boolean d = true;
int j=1;

#define cbi(reg, bit) (reg&=~(1<<bit))
#define sbi(reg, bit) (reg|= (1<<bit))

#define setCS cbi(PORTD,LCDCS); //Chip select on
#define clearCS sbi(PORTD,LCDCS); //Chip select off
#define clearSCK cbi(PORTD,LCDSCK); //Clock low
#define setSCK sbi(PORTD,LCDSCK); //clock high
#define clearDIO cbi(PORTD,LCDDIO); //data low
#define setDIO sbi(PORTD,LCDDIO); //data high
#define setReset cbi(PORTD,LCDRST); //enable reset
#define clearReset sbi(PORTD,LCDRST); //disable reset

//#define BL0 cbi(PORTD,BL);
//#define BL1 sbi(PORTD,BL);

void lcdData(byte _b){
 setSCK
 clearCS
 setCS
 
 clearSCK
 setDIO
 setSCK
 writeToLCD(_b);
}
void lcdCmd(byte _b){
 setSCK
 clearCS
 setCS
 
 clearSCK
 clearDIO
 setSCK
 
 writeToLCD(_b);

}
void writeToLCD(byte _b){

 clearSCK
 if((_b&B10000000)!=0){setDIO} else {clearDIO}
 setSCK
 clearSCK
 if((_b&B01000000)!=0){setDIO} else {clearDIO}
 setSCK
 clearSCK
 if((_b&B00100000)!=0){setDIO} else {clearDIO}
 setSCK
 clearSCK
 if((_b&B00010000)!=0){setDIO} else {clearDIO}
 setSCK
 clearSCK
 if((_b&B00001000)!=0){setDIO} else {clearDIO}
 setSCK
 clearSCK
 if((_b&B00000100)!=0){setDIO} else {clearDIO}
 setSCK
 clearSCK
 if((_b&B00000010)!=0){setDIO} else {clearDIO}
 setSCK
 clearSCK
 if((_b&B00000001)!=0){setDIO} else {clearDIO}
 setSCK
 
 clearCS
 
}
void setBox(byte c1,byte c2,byte p1,byte p2){
 
 lcdCmd(CASET);
 lcdData(c1);
 lcdData(c2);
 lcdCmd(PASET);
 lcdData(p1);
 lcdData(p2);
 
}

void fillBox(byte color, byte c1, byte c2, byte p1, byte p2)
{
 uint16_t total_bytes1;
 uint16_t total_bytes2;
 uint16_t total_bytes;

 setBox(c1, c2, p1, p2);

 lcdCmd(RAMWR);
 total_bytes1 = (c2 - c1 + 1);
 total_bytes2 = (p2 - p1 + 1);
 total_bytes = total_bytes1 * total_bytes2;
 for (unsigned int i = 0; i < total_bytes; i++){
   lcdData(color);
   lcdData(color);
 }
}

void fillScreen(byte color){
 fillBox(color,cmin, cmax,pmin,pmax);
}

//LCD Initialize------------------------------------
void lcdInit(){
 setReset
 delay(10);
 clearReset
 
 clearCS
 setDIO
 setSCK
   
 lcdCmd(DISCTL); //Display Control ---------------------------------
 lcdData(0x0A);  //CL dividing ratio
 lcdData(0x20);  //130 line display
 lcdData(0x11);  //no inversely highlighted lines
 lcdData(0x01);  //dispersion
   
 lcdCmd(COMSCN); //Com Scan ----------------------------------------
 lcdData(0x01);
   
 lcdCmd(OSCON);  //Oscillator On -----------------------------------
   
 lcdCmd(SLPOUT); //Sleep Out ---------------------------------------
 
 lcdCmd(VOLCTR); //Voltage Control----------------------------------
 lcdData(0x20);
 lcdData(3);
 
 //Temperature Gradient
//  lcdCmd(TMPGRD);
//  lcdData(0);
//  lcdData(0);
//  lcdData(0);
//  lcdData(0);
//  lcdData(0);
//  lcdData(0);
//  lcdData(0);
//  lcdData(0);
//  lcdData(0);
//  lcdData(0);
//  lcdData(0);
//  lcdData(0);
//  lcdData(0);
//  lcdData(0);
 
 //Power Control -----------------------------------
 lcdCmd(PWRCTR);
 lcdData(0x0f);
 
 delay(100);
 
 //Invert Display-----------------------------------
 lcdCmd(DISINV);
 
 //Clear Partial disply data------------------------
 lcdCmd(PTLOUT);
 
 //Autoscroll clearing (I hope)
 lcdCmd(ASCSET);
 lcdData(00);
 lcdData(32);
 lcdData(32);
 lcdData(3);
 
 //Data Scan Direction------------------------------
 lcdCmd(DATCTL);
 lcdData(0x00);
 lcdData(0x00);
 lcdData(0x04); //1 = 8 bit, 2 = 12 bit, 3=12 of 16 bit
 lcdData(0);
 
 //RGB Mapping--------------------------------------
//  lcdCmd(RGBSET8);
//    lcdData(0x00);
//    lcdData(0x02);
//    lcdData(0x04);
//    lcdData(0x06);
//    lcdData(0x08);
//    lcdData(0x0A);
//    lcdData(0x0C);
//    lcdData(0x0F);
//    lcdData(0x00);      // 000 GREEN
//    lcdData(0x02);      // 001  
//    lcdData(0x04);      // 010
//    lcdData(0x06);      // 011
//    lcdData(0x08);      // 100
//    lcdData(0x0a);      // 101
//    lcdData(0x0c);      // 110
//    lcdData(0x0f);      // 111
//    lcdData(0x00);      //  00 BLUE
//    lcdData(0x06);      //  01
//    lcdData(0x09);      //  10
//    lcdData(0x0f);      //  11
 


 lcdCmd(NOP);

 delay(100);

 lcdCmd(NOP);
 fillScreen(0x0F);
 lcdCmd(DISON);
}


void setup(){
 DDRD |= B01111100;   // Set SPI pins as output
 PORTD |= B01111100;  // Set SPI pins HIGH
 
 delay(500);
 
 pinMode(8,INPUT);
 pinMode(9,INPUT);

 
 lcdInit();
 //Make some shit happen
 
 lcdCmd(RAMWR);

 d = false;
}


void loop(){
 d = false;
 byte C = 0xFF;
 int dC=30;
 digitalWrite(11,LOW);
 delay(250);
 fillScreen(C);
 if(C > dC){
   C-=dC;
 }else{
   C=0;
 }
 
}


Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: thoed on Oct 18, 2009, 04:10 pm
When I use Phokur's updates, well, nothing works the same as before.. and not in a good way! lol pixels galore..

I've been trying to implement how to use a BMP.. but that's proving to be a bigger pain in the ass than I normally expected. :P
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: Ro-Bot-X on Oct 19, 2009, 01:35 pm
Hello everyone,

I got the SparkFun Nokia knock-off break out board just like Phokur and I am having the same problems with weird colors and text. After I applied his mods (especially for the text size) I got some results, meaning the text is legible but the colors are all messed up. I am using the library you guys made and I am making the tweaks you guys recommend to see what's working. I have a few questions:

- why aren't we using the hardware SPI?
- why aren't we using the 12 bit color scheme instead of the 8 bit one?
- is there a possibility to flip the image 90 degrees?

I am using diodes and pull-up resistors for voltage converting, unfortunately I did not had shotky diodes handy, so there might be a timing problem for the communication.

Another weird thing, the LCD seems like looping through the DATCTL settings because I got solid color bars (black yellow blue cyan) then garbled color bars (black magenta cyan white) and the text changes colors too. When is garbled, each color bar has vertical lines, one line color, one line black and they alternate from one color to the other, that means if for the first color the black lines (columns) are even, for the second color the black lines are odd. The text appears with vertical lines too, like the LCD has less resolution or something like that. Sometimes the text has red lines above and below each text line. All these are looping over about 15 cycles or so.

At this time I wish I had bought the Nuelectronics Color Arduino Shield instead of the Sparkfun's board or the one CaptainObvious has.
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: Ro-Bot-X on Oct 24, 2009, 02:30 am
Anything new on this? Is anyone making some progress? Should I toss out this color LCD and buy another one that works?

Thanks!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: Ro-Bot-X on Oct 29, 2009, 02:35 am
I gave up on the color settings, so I can actually use the thing on my robot. I finally succeeded writing the code for a scan and display map module. I used the Ping sensor, which makes the objects be wider than they are, but is crazy fast. I wish same speed could be achieved with Sharp sensors. I can post up the code if someone needs it.

Here is a video:
http://www.youtube.com/watch?v=uDAzn4w4WUU

Anyway, looking for ways to properly set up the display, I found this amazing code written in C++ for Mega8, 16, 32... 644. It does everything, but it's a bit over my head to understand it. I would like to port it to Arduino as a library. Can anyone help with this?

Here is the link:
http://www.idleloop.com/robotics/ColorLCD/
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: Tattik on Dec 09, 2009, 12:34 pm
Hi, I'm using this Nokia 6610 LCD (Green PCB -> Epson) over an Olimex board (http://www.olimex.com/dev/mod-nokia6610.html) equipped with a DC-DC converter to have the correct 7V to power the backlight.

I've wired this board to my Arduino Duemilanove working with an AtMega328 and the 0017 version of the IDE.

I'm experiencing the same Blip's and other users problems, that consists in wrong/mismatch visualization of the data sent over the SPI bus.

I'm checking the data over the bus by a logis state analyzer and it seems the data was correct, but I'm still analyzing...

I also checked the new Epson controller datasheet to be sure the command sent to the lcd was correct, but none is working.

Somebody have some news about to control this device?

Today I'll try to compile my simple source code with another IDE version (0011>)... grrr...

Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: Tattik on Dec 15, 2009, 10:52 pm
Hi, finally I was able to correctly drive this LCD. The issues was the following:

1. new Epson LCD are equipped with a new Epson clone controller that doesn't supports 8 bit color driving
2. it's necessary to set the P3 parameter of the DATCTL command to the value 4 instead of 2.
3. new datasheet's revision of the Epson controller (S1D15G10) that can be found via Google search, now contains the info of the point 2 that isn't contained in the old revision (S1D15G00).

More info here:

http://www.idcomm.com/personal/lorenblaney/sparkfun.html

Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: Tattik on Dec 15, 2009, 10:57 pm
Hi, finally I was able to correctly drive this LCD. The issues was the following:

1. new Epson LCD are equipped with a new Epson clone controller that doesn't supports 8 bit color driving
2. it's necessary to set the P3 parameter of the DATCTL command to the value 4 instead of 2.
3. new datasheet's revision of the Epson controller (S1D15G10) that can be found via Google search, now contains the info of the point 2 that isn't contained in the old revision (S1D15G00).

More info here:

http://www.idcomm.com/personal/lorenblaney/sparkfun.html

Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: StaticDet5 on Jan 28, 2010, 11:11 pm
I'm astounded by the work done on this board.

I'm pretty new to Arduino's, and I'm chugging through my first real project (after playing with a bunch of tutorials).

I'm trying to print numerical values generated by the Arduino (Longs):

strcpy(text,"Speed");
nokiaLcd.lcd_draw_text(MAGENTA, BLACK, 7, 90, text);
strcpy(text,"0");  // <--------  I want to replace this "0" with a Long variable
nokiaLcd.lcd_draw_text(CYAN, BLACK, 40, 90, text);

I've tried various methods of swapping out the "0" with the variable velocity.  I keep getting:
error: invalid conversion from 'long int' to 'const char*'
when I replace the line above with:
strcpy(text,shots);

I've tried a couple of other permutations, including changing the next line to:
nokiaLcd.lcd_draw_text(CYAN, BLACK, 40, 90, shots);

I get:
error: invalid conversion from 'long int' to 'char*'

I'm using a Diecimila to drive the board, and so far things have been flawless.  I've looked for ways to "Cast" the variable, but char(shots) doesn't seem to work either.

Thank you
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: amberkrishan on Feb 09, 2010, 11:37 pm
Hi...i got the LCD to show up text and clear up fine. Thank you so much everyone. I was wondering if the library can be used to show photos?

Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: pliable3 on Mar 28, 2010, 03:33 am
Hi. I just got the SparkFun breakout board working wih Arduino.

I used the code from Arduino Playground -- Epson S1D15G10 Nokia LCD (Work In Progress)

I can see the test pattern (Purple Yellow Orange) when I view the display from an angle. But if I look at the display straight-on, all I see is Blue -- or maybe 3 shades of Blue.

Any ideas what I need to do to get display o look right?

Thanks!

-Bob
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: Danijel33230 on May 16, 2010, 04:34 pm
Hello all, I'm still having problem like on blips picture. Ok I solved messed up fonts, but the color... Everything is bluelike, black color is dark blue and yellow doesn't exist at all. It is LCD breakboard from sparkfun I'm using. I don't know what I'm doing wrong. Can someone give any tip to try. Please heeelp :) Thanks!
Title: Re: Nokia 6100 LCD Display - Arduino Playground
Post by: umpteee on Aug 12, 2010, 11:32 pm
Hi All,
I just got the sparkfun nokia LCD working by using phokur's code adjustments and the libraries above. Thanks! I am using a level converter so all the logic lines on the nokia get 3.3V.
I wrote a function to draw circles people might find handy.. It could be improved by adjusting the increment amount in the for loop relative to the size of the radius but here it is.

void draw_circle(int radius, int center_x, int center_y, byte color){
 for(float arg = 0; arg < TWO_PI; arg += 0.05 ){
    int ax = radius * cos(arg);
    int ay = radius * sin(arg);
    byte xpos = center_x + ax;
    byte ypos = center_y + ay;
    nokiaLcd.LCD_put_pixel(color, xpos, ypos);
 }
 
}


Enjoy :)