Go Down

Topic: graphical lcd (nokia 3310) (Read 9758 times) previous topic - next topic

kuuk

hello you all,

i got my arduino board last week and am now busy understanding and remembering all the basics of electronics...the following is thus still beyond what i am capable of.  :-[

anyway, does someone of you know if it's possible to control an LCD taken from a nokia 3310 phone with arduino? directly?

there is widespread information and how-to's on using this display in DIY robot/interface projects with various setups and microcontrollers. but nothing that i could understand.
see http://www.amontec.com/lcd_nokia_3310.shtml for a rough description.

the display comes complete with a philips controller, it's pure graphical, which means that all pixels are controlled seperately. i don't mean to play movies on this thingy but just switching between a few graphics for output would be very practical and cool to many of us.

i'm having two old 3310's laying around here. and you can get these phones for less than 10euros on eBay!

any answers and explanations how it could be done (or why not) are appeciated.

hope to hear from you.

best wishes from berlin,

kuk



admin

#1
Mar 16, 2006, 05:18 pm Last Edit: Mar 16, 2006, 05:21 pm by admin Reason: 1
This is some completely untested code that I had ported from C. the display we used was broken or something
but the orginal C code was found on the internet and probably working
i will find the original author of the code and credit him/her

http://www.potemkin.org/cms/Pid/NokiaLCD

massimo


kuuk

#2
Mar 16, 2006, 05:50 pm Last Edit: Mar 16, 2006, 05:51 pm by leKuk Reason: 1
hi massimo,

thanks for this really fast reply. i'm overwhelmed. sadly i won't be able to try this until next week.


how did (or would) you connect the display to the board? will i need more than a few resistors to adapt the voltage?

i'm looking forward to diving into this.


best,
kuk

at the "hack a day" blog was a while ago a post which is mayby interesting ...
http://www.e-dsp.com/controlling-a-color-graphic-lcd-epson-s1d15g10-controller-with-an-atmel-avr-atmega32l/ never tried it ... but the good thing is they using a new display from SparkFun http://www.sparkfun.com/commerce/product_info.php?products_id=569 which is very cheap.
good luck.

bene

Oliver Keller

you can connect it like shown here, but with one more diode for roughly 3 Volt:
http://ulrichradig.de/site/atmel/avr_mmcsd/gfx/MMCSDSCH.JPG
(thats actually for a 3,6V MMC/SDC card, but the interface is the same, SPI Bus...)
be carefull when soldering, the metal spring-contacts are really tiny. here's info on how to take the LCD apart from the phone: http://serdisplib.sourceforge.net/ser/pcd8544.html
I'll try massio's code soon, too. If it won't work, I've allready made a C code for msp-gcc that could be easily ported. I got my displays also very cheap (as replacement parts, it's the same for nokia 3310, 3330 6210 etc., see link) from ebay.

kuuk

hej oliver,

did you manage to run the display?

i tried with no success.  this is how i interpreted massimo's code and did the pin setup using (not exactly) the resistors from your graphic:

int LCD_POWER         =         1;  // goes to display pin 1 POWER FOR THE LCD
int LCD_DC_PIN         =        2; //   goes to display pin  4  Data Command
int LCD_CE_PIN         =        3; //   goes to display pin 5  /CS   active low chip select ??
int SPI_MOSI_PIN      =       4; // goes to display pin  3  Serial   line
int LCD_RST_PIN       =       5; //  goes to display pin 8   /RES RESET
int SPI_CLK_PIN        =       6; //goes to display pin  2  CLOCK

i'm not too sure if i did right with the resistors. could you explain to me the use of the diode?
are you sure about the values of the resisitors or do you think it could work without them? i read about people using the display with a 5V source.

no reaction from the display at all times.

kuk

Oliver Keller

I still had no time to test the lcd with the given code by myself. The diodes are just for lowering the voltage (each diode burns 0,7 V) since that LCD is usually powered with 3,3V.
I don't know if it works with 5 volt, too. If so, it should also work without any resistors.

kuuk

Quote
I still had no time to test the lcd with the given code by myself. The diodes are just for lowering the voltage (each diode burns 0,7 V) since that LCD is usually powered with 3,3V.
I don't know if it works with 5 volt, too. If so, it should also work without any resistors.


hi oliver,

nice to read you're still interested though. i've been tinkering and trying whole last week.

first thing: the code from massimo seems to be to big for my board. i shortend the fontLookup array to just 26 small letters to make it run.

twice i happened to see something on the display, but i couldn't reproduce this. the first time the screen went all black. the second time (yesterday) i saw a horizontal line from left to right. i guess that's what it supposed to show from the main loop() in the code.

my setup is the following:


i tried it with up to five diodes since i measured exact 2,7V on a working 3310 phone. the voltage in my setup with 3 diodes is still 3,6V.

could it be a question of ampere?
maybe it's something with the clock timing? anyone knows how to debug something like this???


kuk

Massimo Banzi

don't use the diodes... they're not reliable .. I think I burned one of those once using exactly that technique.
use a proper 3.3v regulator

like an lm3940 or something (good capacitor required with this part, read the datasheet)


kuuk

Quote
don't use the diodes... they're not reliable .. I think I burned one of those once using exactly that technique.
use a proper 3.3v regulator

like an lm3940 or something (good capacitor required with this part, read the datasheet)



i'll be getting me a proper regulator. but i still don't really understand all this. what's the difference between
a)   using diodes to "burn" the volts
     or
b)   using an lm3940 or similar

???

is it just a matter of proper regulators being more robust?

or why (for example) can i not just "redirect" the 1,7 volts to ground as i am doing with the other pins using resistors?
(that's i'm doing with the resistors or am i missing something?)

i really don't have the feeling that i know what i am doing :-/

still i keep checking my diodes with my cheap multimeter. they seem ok :-)

i thought of maybe finishing (this) my first arduino project for an exhibition about energy consumption. just a lowfi-interactive 10 frame animation on the display inside a slide viewer. with only 2 weeks left i wonder if i'm still miles away from a solution or just one diode/voltage regulator.

???

thanks for your help so far!

Oliver Keller

lekuk, the problem is that voltage drop over a resistor depends on the current. With a diode the volatge drop is in theory independent from the current (practically, as you observerd, not really). If you know how much current the LCD draws, you can in deed calculate the resistor for 3.3Volt (R=U/I with U=5-3,3V). But that's even worse compared to the diodes, because the current the LCD draws will allways depend on the volatge it's driven by! And the resistor must be able to handle the electrical power, that it should drop-out.
Think of a regulator as a set of diodes/transistors that output a certain voltage level independent from the current that's drawn on the output. But, like a resistor, they just "burn" the difference voltage (i.e. create heat!).

One thing I don't understand in your drawing. Why do you connect the LCD Supply pin (Vdd) with an digital IO of Arduino? Just connect it with 5V. Maybe the problem is, that the current the LCD needs is above what an arduino pin can handle.

Oliver Keller

well, I mean, connect the LCD Vdd pin with the diodes or a regulator to 5V... :-)

kuuk

thanks oliver, i think i'm getting it. very well explained!

the reason i'm connecting the lcd power supply pin to a digital IO of arduino is that i wanted to be able to control when the diplay is powered. i think i read somewehere that (for initialisation) the lcd might expect a pull on the /RESET shortly after it is powered on.
after all this was just for testing purposes.

is there a difference between an I/O port set to HIGH and the 5V out on arduino?

BTW i love the "stay hungry, stay foolish" speech :-)

kuuk

i need some sleep now. just to let you know:

i've been writing a step-by-step code from scratch. sending each bit manually one after the other , sending clock pulses in between and pulling on the right pins at the right time in a million-lines-program. (whoops, only about 300 lines. but that sounds too easy). i recommend this to anyone trying to debug and understand something like this. at first i feared the work, but in the end i could have saved a lot of time tinkering with the wiring.

@oliver: your wiring suggestion works like a charm.

i now started debugging the code that massimo threw in. i'll post my results. have to get into c and bit manipulation. already learned a lot. what i know so far:
- LCD_DC_PIN has to be low not high when sending commands to the display (and HIGH when sending data)
- "UpdateLcd= false;" seems to hang the program, don't know why


for my setup (see wiring above), the contrast settings lead to an all black display! if anyone could help me understanding
- temperature coefficient
- bias system
and how to set the right
- operational Voltage (V op) , which i mean by contrast-setting

see http://www.myplace.nu/mp3/files/pcd8544.pdf . the datasheet for the chip which is integrated in the display module.

i tried different values for each. it works by chance, but hey, i'm here to learn.

good night,
kuk

fallen

#14
Mar 31, 2006, 02:59 pm Last Edit: Mar 31, 2006, 03:02 pm by fallen Reason: 1
Hi ! leKuk

I think you can try : http://www.flickr.com/photos/fallens/120708373/

we can make it work use this schematic , but I can't make sure that Arduino can work at 3.3v if we change 7805 to others.

I hope this is helpful !

and the code of massimo :

//  Mega8 port B pinout for LCD.
int LCD_DC_PIN         =        1; //  PB0
int LCD_CE_PIN         =        2; //  PB2
int SPI_MOSI_PIN       =        3; //  PB3
int LCD_RST_PIN        =        4; //  PB4
int SPI_CLK_PIN        =        5; //  PB5

I think you should not to use pin1 , and if as "PB0 PB2 PB3 PB4 PB5 " in Arduino is " pin8 pin10 pin11 pin12 pin13(with the LED in Arduino,don't use)" but I don't think it's the problom , just we use PB to make it work that time , and have not try at other pin yet.

Go Up