Using Nokia LCD


+ Reply to Thread
Page 1 of 8 12345 ... LastLast
Results 1 to 40 of 301

Thread: Using Nokia LCD

  1. #1
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    81

    Default Using Nokia LCD

    Hi all,

    I have noticed recently that LCD displays from Nokia phones (6310, etc.) are being used in PIC projects.

    I have collected datasheets and before I loose more hair I wondered if anyone has written PBP code to drive this display?

    Any snippets of code or hints would be appreciated.


    Thanks,
    Bob

    Edit from Moderator:
    A Wiki has been created for one solution for the Nokia 3310 display from a few of the posts in this thread. It can be found here: http://www.picbasic.co.uk/forum/cont...Nokia-3310-LCD.
    Last edited by ScaleRobotics; - 8th June 2010 at 14:59.

  2. #2
    Original's Avatar
    Original Guest

    Default Nokia

    Try here:

    Is in CCS C code not picbasic pro though!

    http://users.skynet.be/bk317494/

    INIT_LCD:

    SSPSTAT.6 = 1 'CKE
    SSPCON.0 = 1 'TCK / 16
    SSPCON.5 = 1 'ENABLE MSSP

    HIGH CMD_DAT 'COMMAND / DATA LINE
    HIGH LCD_C_S 'LCD CHIP SELECT
    HIGH LCD_PWR 'LCD POWER ENABLE
    LOW LCD_RST 'LCD RESET LINE
    PAUSE 20
    HIGH LCD_RST

    LOW CMD_DAT

    SSPBUF = 33 'EXTENDED COMMAND SET
    PAUSE 1
    SSPBUF = 200 'SETUP VOP
    PAUSE 1
    SSPBUF = 19 'SETUP BIAS
    PAUSE 1
    SSPBUF = 32 'NORMAL COMMAND SET
    PAUSE 1

    SSPBUF = 9 'TURN ON ALL SEGMENTS
    PAUSE 100

    SSPBUF = %00001100 'DISPLAY NORMAL
    PAUSE 1

    HIGH CMD_DAT ' GET READY TO SEND PIXEL DATA
    HIGH LCD_C_S ' DESELECT LCD

    RETURN
    Last edited by Original; - 27th March 2004 at 00:18.

  3. #3
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    81

    Default

    Thanks,

    Thats enought to get me started. I will post the code here once I have finished it.

    Thanks,
    Bob.

  4. #4
    Original's Avatar
    Original Guest

    Default nokia lcd

    Here's one submitted on the Proton Picbasic site.
    Attached Files Attached Files

  5. #5
    Hawkesy's Avatar
    Hawkesy Guest

    Default

    Hi all,

    I have just got my Nokia 5110 LCD working, I tried the ASM code from Berty's page (http://sandiding.tripod.com/Bertys.html), however I had problems getting it going. I re-wrote the code using PBP, now I can display stuff. It is very code intensive as the display is dumb and you have to set each pixel. I used a PIC16F628 and the Shiftout command. I will attach the .BAS file. If anybody wants to improve the code please do I would be interested in any improvements. i would also like to know how to use a lookup table to display pre defined characters.

    Cheers
    Attached Files Attached Files

  6. #6
    Hawkesy's Avatar
    Hawkesy Guest

    Default

    Oh yeah here is a txt file for the charater set and their associated hex codes.
    Attached Files Attached Files

  7. #7
    Join Date
    Jan 2004
    Location
    Thessaloniki , GREECE
    Posts
    61

    Talking nokia_lcd_pbp_pro code

    Hi!
    Guys
    I have already smth ready for you (I think)
    two months ago I tried to figure out a way to drive a nokia
    LCD using just a pic and Picbasic pro!
    Here is the good news: SUCCESS

    As i am at work now, as soon as I find some time I will dig-out and send you the simple schematic and of course the source!
    Wait till then...
    See you
    P.S As I can remember the only limit was that you need a lot of eeprom space to 'throw in' the character bitmap mask data.

  8. #8
    Join Date
    Jan 2004
    Location
    Thessaloniki , GREECE
    Posts
    61

    Arrow Picbasic pro code !

    Hi,Guys!

    At last I managed to dig out the infos you want.
    I attached the pbp source for anyone interested
    Also I have written a very good utilty in VB (included in zip)that
    helps you create the graphic data you can inport in
    pic basic in order to diaplsy bitmap images on the nokia lcd!

    I hope you find then usefull

    )
    Also included is the connection to nokia lcd

    NOTE:You MUST unzip the file in your c:\matrix , in order
    to run properly!
    Attached Files Attached Files

  9. #9
    Tim B's Avatar
    Tim B Guest

    Default

    If you want a font to bit map converter have a look at the one written for PPrint.

    http://users.picbasic.org/Howto/PPRI...le_fonts_o.htm

    Tim

  10. #10
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    81

    Default

    Many thanks for all the replies, I have written some code but it needed tidyed up before posting. But it will now gather dust on the hard drive.

    look forward to building something (even an egg timer!) just to try the code.

    Thanks,
    BobP

  11. #11
    stu746's Avatar
    stu746 Guest

    Angry

    been trying to get this working for a while now, i am beginning to think my lcd does not work or maybe i damaged it when soldering it,

    should the lcd turn black or anything when power is applied?

    i used bitmaniacs code and compiled it for a 16f877a but the lcd does nothing when I power up

    i also have a nokia 6610 lcd if anyone has a circuit and any code to get this working?

    thanks for any help

    Stu

  12. #12
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92

    Smile

    Hi Bob,

    the same thing happened to me this weekend !


    As I can not find the 16F648 to buy here in Brazil, I´m using the 16f877 to do the tests.

    I Just removed the CMCON line from the code and changed the cristal to 10 Mhz, but the display still not responding.

    I have conected the Vout pin to Gnd via a 1 uf Cap.

    I´m powering up the display with 5 V (maybe I should change to 3,3v)

    I have seen other project powering up the display with 5V with out problems.

    After some hours testin the circuit and the software with no success, I decided to test another display. But the results were the same... a blank display.

    If could someone help us, it will be apreciated.

    Regards !

    Sérgio

  13. #13
    stu746's Avatar
    stu746 Guest

    Default

    Hi Sérgio,

    seems like you are having same problem as me, did u manage to get it working yet?

    i am using 5v too and am unsure wether this is the problem, but i have seen a few circuits using 5v.


    Stu

  14. #14
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92

    Default

    Hi Stu,

    I'm still trying... but the display still blank, showing nothing, even a small flash when I turn on the 5 Volts.

    I got two more displays, but they are 9 pin version. I will connect them using the mobile's main board 8 pin (in the PCI's Back).

    Other weird behavior I'm facing is the fact of the 877, sometimes, don't start. I have to wait for some minutes and try again.
    I don't have much experience in electronics, as I'm just a curious but a behavior like that is really strange.

    TInight I will try the other dispplay type and if I get some good result, don't worry, I will let you know ! ! !

    Regards.

    Sérgio Pinheiro (Brazil)
    ps. sorry for my bad english... portuguese is my mother language...

  15. #15
    stu746's Avatar
    stu746 Guest

    Default

    Hi again,

    yeah i have problems like that with pics sometimes, i usually find it is the batteries gowing flat and need to change them.

    I also have one of the 9 pin versions from a nokia 5110 I think, it seems impossible to solder to the lcd, so i tried soldering to the back of the pcb, but i could not trace one of the connections, i took a bit of a guess in the end as i think it is connected to the lcd via a capacitor.

    but could not get this working any better. let me know how u get one, i am begining to think i need a better power suplpy.

    Stu

  16. #16
    Join Date
    Jan 2004
    Location
    Thessaloniki , GREECE
    Posts
    61

    Question !

    Hi Guys
    Well I see that you have problems with F877 andmy code
    I will try and re-try my code on an F877 to see what happens
    I hope to find some time this week to try and find out what happens)

  17. #17
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92

    Default

    Hi People,

    Alexandros, your help will be really apreciated.

    Well, in the link below, there's some explanation about on how to connect the nokia display to the pc's printer port in order to show Winamp's information.
    I Know that it'is not what we want but there's some explanation about the different types of Nokia's LCD (8 and 9 Pins)

    http://serdisplib.sourceforge.net/ser/pcd8544.html

    And for those who can read and/or undestand spanish, the link bellow show how to connect a Pic to a COLOR nokia's LCD (Epson Controller). The code is in Pic CCS.

    http://www.comunicom.com.py/juno/3595/

    The link bellow is the original code used by the spanish guy above and his page is in English (source code in HiTec C)

    http://67.15.78.55/~spiral/colorlcd/colorlcd.html


    My idea is get the monochrome working first and change the code and work with the color version.
    The Nokia's LCD are getting cheap, even the color modules, and I think they could be a very good option for some projects, like meters and machine monitors as we can buy them for a good price and every cell phone service store havem them to sell. In other hand, graphical displays are not very easy and, sometimes, expansive.

    My best regards to all

    Sérgio Pinheiro (Brazil)

  18. #18
    stu746's Avatar
    stu746 Guest

    Talking

    Woohooo!!!

    got it workin at last with a 6110 lcd

    it was just the contrast setting in the code!

    i had tried changing it ealier, but i changed the last number only

    i now have it set at d1 and works great

    it now reads

    SHiftOUT Lcd_SDA , Lcd_CLK , MSBFIRST, [ $21,$d1,$20 ]

    i hope this is some help to others as it was driving me nuts

    i used a 16f877a in the end and also used 4.5v, so 3.3 is not required.

    Stu

  19. #19
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92

    Default

    Hi Stu,

    Nice tip !

    I ´ll try this tonight.

    thank you.

    Sérgio Pinheiro

  20. #20
    stu746's Avatar
    stu746 Guest

    Default

    just tried with a display from a 3310 again and worked great with the contrast changed

  21. #21
    Join Date
    Jan 2004
    Location
    Thessaloniki , GREECE
    Posts
    61

    Default nice!

    Hi! Guys
    I have just finished verifying my code with 16f648 and works Fine!
    I was just about to mention to check lcd initilization, contrast, etc but you have already found it by yourself so.... ALL is FINE!

    I hope you have success make it work with F877
    Nokia lcds is a perfect option for projects.
    Also download Nokia lcd pdf it will be very useful for seting differnet parameters to lcd

    I am here for any help.

  22. #22
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92

    Default

    Hi Guys,

    I changed the contrast value and guess what....

    It is working ! ! !

    thank you Alexandros and Stu

    soon I will try a color display, and if I get it working fine I will let you know here in the forum

    Just one more thiing : Have you ever faced problems with Pic's in a protoboard ?

    I just can not make it working. It seems to have some parasite capacitancce between the holes.
    I had to move the project to a experimental PCB and make all the soldering.

    Thank you again

    Sérgio Pinheiro

  23. #23
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    at wich frequency??? 20MHZ, on protoboard it's a common problem due to the capacitance of your protoboard. In many case, you can simply remove the capacitor around your crystal. and the problem will be fix .... on proto only.

    Monitoring your crystal oscillation amplitude with/without capacitor with a scope (10X probe or bigger) will teach you more.

    Also you must add 0.1uF and 10uF tantalum, close to your PIC.
    Last edited by mister_e; - 27th January 2005 at 02:39.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  24. #24
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92

    Default

    Hi Steve,

    thank you for your advice.

    I`ve moved my circuit from the ProtoBoard to a PCB (universal one, with isolated holes), reduced the crystal speed to 10 Mhz and now, everything is soldered.
    Just the power supply lines are a bit long (I´m using a regulated 5 V Power supply).

    I still have problems to make the 16F877-20 and the 16F877A working. I have to touch the PIC with my fingers many, many times to make it working ! ! ! really strange...

    I tried to substitute the crystal for a ressonator too... but I got the same problem...

    Is there another option rahter than the Tantalum Caps ?

    Is this problem related to the Power supply or to the Crystal Speed ? (maybe both ?)

    Thanks

    Sérgio Pinheiro

  25. #25
    rastan's Avatar
    rastan Guest

    Default

    Originally posted by srspinho


    I still have problems to make the 16F877-20 and the 16F877A working. I have to touch the PIC with my fingers many, many times to make it working ! ! ! really strange...

    Hi, just noticed this, I had many problems all over the place to do with touching the pic to make it work, with serial comms, LCD etc etc.

    It turned out that i did not connect MCLRE. it was floating. so it never worked untill my static charge from my fingers pulled the pin high. Also check that other main pins arnt floating. (by main i mean not output/input pins.)

    capacitors from +V to Ground near the pic also help. They basically filter out noise from the powerline/regulator. 100nf usually do the trick



    phil

  26. #26
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92

    Default

    Hi Phil,

    thank you for your tips.

    I will try them tonight

    Regards.

    Sérgio Pinheiro

  27. #27
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92

    Question Drawing on the LCD

    Hi everyone !

    after some good results working with the nokia LCD, I decided to wite a routine in order to draw an small histogram in the Nokia´s LCD.
    But, after reading the PCD8544´s datasheet, i discovered that the LCD doesn´t have a direct mode wich allow us to draw on it pixel by pixel, and when we need to set a single pixel, we need to know its other 7 neighbour pixels.
    Is taht right ?

    Do I need to read the memory first and make some logical operation with the bits to draw what I want ?

    Have someone developped a routine to draw lines (for example) on this LCD ?

    thank tou

  28. #28
    Tim B's Avatar
    Tim B Guest

    Default

    PCD8544 will not let you read the screen so the best you will ever be able to do is keep a copy of the screen in the PIC's ram and then dump the whole screen to it at once. The data rate to these devices is slow though so you will not want to do it often.

  29. #29
    ice's Avatar
    ice Guest

    Default

    Hello,
    I am trying to interface the Nokia 3310 LCD to a PIC16F876A.

    Im using bitmaniacs schematic/code
    Im running on a 16Mhz crystal.

    I tried everything possible mentioned in the last posts
    change the contrast from $a7 to $d1

    Theres no response on the LCD..doesnt even turn dark..

    Is there anything im missing out.
    Thank you

  30. #30
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    ice,

    attached is a working piece of code to play with.
    (Tested on a 16F877A)
    Attached Files Attached Files
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  31. #31
    ice's Avatar
    ice Guest

    Default

    Thank you Nav,
    but it still shows no response..i tried it with 2 displays with the circuit as in bitmaniac's

    are there any other values ,other than $d1 which i can use to adjust contrast?

    Ive tried changing sll the other parameters like bias,temperature coeff..

    Regards,

  32. #32
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    ice,

    the code example is tested and working.

    There must be something wrong in your Hardware.

    could you post your schematic?
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  33. #33
    ice's Avatar
    ice Guest

    Default

    Nav..
    It's the same schema as bitmaniac had given..(18th sep 2004)

    I redid the connections according to the program u gave..

    the schematic is attached

    Thanks!
    Attached Images Attached Images  

  34. #34
    pcapelo's Avatar
    pcapelo Guest

    Question Nokia Lcd

    Hello friends, excuseme for my english, it's not my language...

    It's so interesting to drive nokia LCD's, but i have questions:

    1) The nokia LCD has an internal controller, or are you controlling directly the crystal display???
    2) If in the fact it have a controller, where can i find information about how to drive my LCD. I have LCDs of nokia 8260, nokia 5120, nokia 6120... there are TDMA cell phones and I don't know what type of LCD they have.

    Help me please

    Thanks

    Patricio Capelo
    [email protected]
    Cuenca - Ecudor

  35. #35
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    ice,

    please doublecheck your hardware setup.

    I have only a small 100nF cap on Pin 7 (VOUT)
    and Pin 5 (SCE) is directly tied to GND.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  36. #36
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    Quote Originally Posted by pcapelo
    ...where can i find information about how to drive my LCD.
    Help me please
    All Information you need can be found on this thread.
    Check the links and attachment posted here.
    and see: THIS
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  37. #37
    ice's Avatar
    ice Guest

    Default works, but display not clear

    Nav,
    I got ur code to work on a 873A.. i can move the cursor position to any place on the screen ..however,the digits which have to be displaying are all boxed..but i can notice the numbers changing...also the display keeps flickering..
    I tried changing the init value in ur code too...but i cant seem to find the optimal ones..

    Thanks alot

  38. #38
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    ice,

    to be honest, the code is not mine,
    it's is more a combination if things I have cut and pasted
    for testing purposes.

    I'll have a deeper look into it when I find time.

    BTW.
    I'm running the LCD @ 3.3V!
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  39. #39
    pcapelo's Avatar
    pcapelo Guest

    Question

    Quote Originally Posted by NavMicroSystems
    All Information you need can be found on this thread.
    Check the links and attachment posted here.
    and see: THIS

    Thanks so much for your help, but I need more help...

    I'm talking about the specific models of LCDs that you can found in nokia TDMA cell phones: Nokia 8260,Nokia 5120, Nokia 3320...

    I seen the photos of the projects and i can see some diferences with my own LCDs, so my question is if your LCDs have an integrated controller or are you driving directly the crystal display, without an LCD's internal controller that can have communication with the external PIC micro?

    Thanks again...

  40. #40
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    ok, here are some links:

    http://serdisplib.sourceforge.net/ser/pcd8544.html
    http://sandiding.tripod.com/lcd.html
    http://67.15.78.55/~spiral/colorlcd/colorlcd.html
    http://nokiaport.de/pinouts/pinouts.htm

    most of the monochrome NOKIA LCDs have an embedded PCD8544 controller (PHILIPS)

    If you google for NOKIA LCD you'll find many more.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



Similar Threads

  1. Nokia COLOR LCD PicBasicPro 2.50a example code
    By skimask in forum Code Examples
    Replies: 49
    Last Post: - 28th September 2011, 01:43
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts