Arduino Forum

Forum 2005-2010 (read only) => General => News => Topic started by: nuelectronics on Jul 23, 2009, 07:39 pm

Title: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: nuelectronics on Jul 23, 2009, 07:39 pm
We have developed a new shield based on the popular Nokia 3310 graphic LCD.  Nokia 3310 LCD is low-cost, monochrome LCD with 84x48 display.  It also has a 5-direction joystick and 4 blue backlight LED.    

Schematic, library & example application can be downloaded from our website - http://www.nuelectronics.com/

Here are a couple of photos of this shield  :) --

(http://www.nuelectronics.com/estore/images/nustore/Nokia_3310_2.jpg)

(http://www.nuelectronics.com/estore/images/nustore/Nokia_3310_1.jpg)
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: TonyD on Jul 24, 2009, 11:21 am
Looks great 8-)  

nice price as well
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joyst
Post by: TeamMCS on Jul 27, 2009, 05:54 pm
That looks likea great LCD with a fairly reasonable price tag (would be nice to see a lower P+P).


One request I do have is the supporting code isn't well documented. It's hard to understand how, for example, to draw from pixel to pixel or maybe a line for example.

Can you provide any additional code?


[edit]
Oh in addition, have you considered making some kind of chassies with some kind of connector cables? It would be nice to be able to setup more perminant versions of your products.

Cheers
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: udoklein on Jul 27, 2009, 10:01 pm
Yes, this is definitely something I would be looking for as well. A decent enclosure that fits an Arduino, an LCD display, a battery, a joystick navigation, 4 additional buttons and some place for adding connectors. This would be a killer.

For my projects the biggest issue is actually finding a decent enclosure and then drilling all the holes. If something like this would exist prefabricated I would be more than happy to buy it.
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: kellykel on Jul 28, 2009, 02:46 am
So you can add anything else. ;D
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joyst
Post by: TeamMCS on Jul 31, 2009, 11:29 pm
@NuElectronics: The lcd.LCD_3310_set_XY has no effect. Can you take a look at your code? Without comments I'm lost

Just for your information. I want to turn on a particular pixel so I can draw without the need of a bitmap
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: beanoman on Aug 01, 2009, 07:43 am
I keep forgetting this thread, but the product looks quite nice, and I have been working on two libraries for the 3310. One is a simple text only one, it can be used exactly like a 16x2 or similar character LCD but with 14x6 characters. The other one is a very heavy one that can do all the things the KS0108 library does and a bit more, like lines, rectangles, ellipses, font upscaling, windowed clearing and inverting, and so on, using about 550 bytes of ram. Also have a python script that makes a header file with an array from a monochrome bitmap. Both libraries can get those bitmaps on the screen although the simple one can't 'edit' them nicely. Anyways, both should be done pretty soon, I just need to get the code cleaned up.
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: TeamMCS on Aug 01, 2009, 10:18 am
Good man, that would be really helpful.

I was hoping to develop some simple games so I can work on my memory consumption on my own libraries.

I did manage to make some progress on the set_xy. That *actually* means cursor GOTO. I'll post the code later but the location needed a mask on it.

In addition, you need to write a byte to make it display anything. Obviously a byte includes 8 bits which means you have 8 pixels you must also set each time you set your selected pixel.

I'm eager to here from NuElectronics. Turns out he's only around the corner from me based on the return address!
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: Gagarien on Aug 24, 2009, 09:02 am
Hi Guy's/Gals I need some help Pleaze. First I'm still learning so bear with me. My end goal is to have the shield display "functions" like a temp reading say from a LM35 but I'm stuck.

The sample code shows how to compile a menu and use  LCD_3310_write_string ,LCD_3310_draw_bmp_pixel etc.

Can some one please explain the charmap sample and LCD_write_byte as per the library. Or maybe guide me to a link were I can learn more.

It would seem that the Nokia_3310_lcd library is more developed, but that just confuse me more as it is written for the color display.

Also the display from this shield is a Nokia 5110 right and not a 3310?

Thanks
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: nuelectronics on Sep 03, 2009, 09:34 am
The LCD uses the Philips PCD8544 chip, it is compatible with the 3310 LCD.  Here is a link of the PCD8544 datasheet -
http://www.nxp.com/acrobat/datasheets/PCD8544_1.pdf.   Accessing individual pixel on the LCD is a bit tricky, because the LCD control chip is organized in 84 x 6 bytes (= 84 x 48 pixels).  Therefore a local buffer is needed for pixel read/write, and updating the LCD.   I am in a process of developing the graphic library (most of the code is working).  Will publish the code as soon as I can  ;D
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: Gagarien on Sep 07, 2009, 02:15 pm
Thanks that would be of great help for a noob like me! Standing by.
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: CM3_OS on Sep 07, 2009, 03:26 pm
very good
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: CM3_OS on Sep 07, 2009, 03:26 pm
There has a MP3 programmer run on SAM3U-EK which could play .wav and .mp3 audio file.
The programmer base on a free OS called Coos,it is similarity to RTX and UCOS.

You can get the source file of MP3 programmer from http://www.coocox.org/EXAMPLE/SAM3U_MP3_CoOS.htm
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: volvodani on Oct 04, 2009, 04:44 pm
I´m also an owner of this display. I made some teste and it´s work fine. But i´ve a porblem how can I display som "int"value like the one i get from analog read. The Libary said there ist only CHar or byte to display. In my tests i con only display singele dots wich blink´s like an binary code.

Thx for help
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joyst
Post by: maujabur on Jun 24, 2010, 07:48 am
I just ported a routine to plot ellipses (the ks0108 library didn't have one) - maybe you could use, just changing the function Plot4EllipsePoints

Code: [Select]
void PlotEllipse(long CX, long  CY, long XRadius,long YRadius, int color) {
// portted the algorithm found at
// http://homepage.smc.edu/kennedy_john/belipse.pdf
// by John Kennedy

 long X, Y;
 long XChange, YChange;
 long EllipseError;
 long TwoASquare,TwoBSquare;
 long StoppingX, StoppingY;
 TwoASquare = 2*XRadius*XRadius;
 TwoBSquare = 2*YRadius*YRadius;
 X = XRadius;
 Y = 0;
 XChange = YRadius*YRadius*(1-2*XRadius);
 YChange = XRadius*XRadius;
 EllipseError = 0;
 StoppingX = TwoBSquare*XRadius;
 StoppingY = 0;

 while ( StoppingX >=StoppingY ) //first set of points,y'>-1
 {
   Plot4EllipsePoints(CX,CY,X,Y,color);
   Y++;
   StoppingY=StoppingY+ TwoASquare;
   EllipseError = EllipseError+ YChange;
   YChange=YChange+TwoASquare;
   if ((2*EllipseError + XChange) > 0 ) {
     X--;
     StoppingX=StoppingX- TwoBSquare;
     EllipseError=EllipseError+ XChange;
     XChange=XChange+TwoBSquare;
   }
 }
 //{ first point set is done; start the 2nd set of points }

 Y = YRadius;
 X = 0;
 YChange = XRadius*XRadius*(1-2*YRadius);
 XChange = YRadius*YRadius;
 EllipseError = 0;
 StoppingY = TwoASquare*YRadius;
 StoppingX = 0;
 while ( StoppingY >=StoppingX ) //{2nd set of points, y'< -1}
 {
   Plot4EllipsePoints(CX,CY,X,Y,color);
   X++;
   StoppingX=StoppingX + TwoBSquare;
   EllipseError=EllipseError+ XChange;
   XChange=XChange+TwoBSquare;
   if ((2*EllipseError + YChange) > 0 ) {
     Y--;
     StoppingY=StoppingY- TwoASquare;
     EllipseError=EllipseError+ YChange;
     YChange=YChange+TwoASquare;
   }
 }
}; //{procedure PlotEllipse}

void Plot4EllipsePoints(long CX,long  CY, long X, long Y, int color){
 GLCD.SetDot(CX+X, CY+Y, color); //{point in quadrant 1}
 GLCD.SetDot(CX-X, CY+Y, color); //{point in quadrant 2}
 GLCD.SetDot(CX-X, CY-Y, color); //{point in quadrant 3}
 GLCD.SetDot(CX+X, CY-Y, color); //{point in quadrant 4}
}

Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: GnobarEl on Jul 15, 2010, 10:38 am
Hi,
can i have free pins with 3310 shield?

I mean, witch pins are free? how can I connect them to other devices?

Thanks!
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: slewfoot on Jul 19, 2010, 08:54 pm
Is there a U.S. distributor of this product by chance?
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: maujabur on Jul 19, 2010, 08:58 pm
I think Sparkfun has that...
If not, at least the LCD module you can get there, I'm sure
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: slewfoot on Jul 19, 2010, 11:19 pm
Looks like they have the LCD module, but not the one with the integrated joystick.  :(

Thanks your post, maybe there's something else here I can use instead!
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: maujabur on Jul 19, 2010, 11:24 pm
@Slewfoot303 what do you plan to do? And what are your electronic skills? I'm planning to interface some of those displays, but I'll grab them from the old phones.  Maybe with a proto shield and a joystick like this:

http://www.sparkfun.com/commerce/product_info.php?products_id=9032


you could get it going...
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joyst
Post by: slewfoot on Jul 19, 2010, 11:36 pm
I was just introduced to the Arduino by this thread:

http://www.nano-reef.com/forums/index.php?showtopic=206246

My electronics skill is nil, but my father-in-law is an electronics guru (30+ years in AT&T's hardware R&D department) and has agreed to help out, I'm just trying to locate parts at the moment.  :)

And, obviously I'm in this to learn and to pick his brain while I can...

Thanks for the help!
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: slewfoot on Jul 19, 2010, 11:40 pm
Oh, and not to sound like a complete leech, if we're able to get this project going I'll be developing the software - that's my contribution to the project.  :)
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: novice on Aug 02, 2010, 01:20 pm
Hi nuelectronics,

nice product, and very reasonable pricing.
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: KRavEN on Sep 06, 2010, 07:04 am
I got this from the UK to Texas in just a few days so no worries about overseas shipping for those of you weary about it.

I am having a problem getting it to work with the arduino mega board though.  Does anyone have know what mods need to be made to get it working on the mega?
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: slewfoot on Sep 06, 2010, 04:29 pm
I ordered one too and it was shipped and arrived in Colorado in good order in a reasonable time (roughly a week).  Was very pleased with the service from Nuelectronics, thank you.
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: Nadir on Sep 06, 2010, 05:19 pm
KRavEN,

Shield uses the SPI, Duemilanove SPI pins are 10,11,12,13 but Mega SPI pins are 50,51,52,53. You may solve with this solution. http://mcukits.com/2009/04/06/arduino-ethernet-shield-mega-hack/
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: KRavEN on Sep 06, 2010, 05:30 pm
I was hoping I could do it all in software like this: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1253831901 but I'm not seeing how to directly translate the mods in that thread to the n3310_lcd.h and n3310_lcd.c files.
Title: Re: Low-cost graphic Nokia 3310 LCD shield & Joystick
Post by: DE8MSH on Dec 16, 2010, 05:48 pm
Hello,

ist there any nokia3310.h with a smaller font than 7x8? need 5x6 for eg.