1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Pic interfacing with Nokia 3310 lcd

Discussion in 'Microcontrollers' started by Myrmidon, Oct 7, 2007.

  1. Myrmidon

    Myrmidon New Member

    Joined:
    Oct 7, 2007
    Messages:
    28
    Likes:
    0
    Greetings all!

    Just new to the forums and they look like a good collection of friendly people. :)

    I have, perhaps a simple question but it's one i can't find answers to and i'm not that far into my electronics course yet. :p

    Ok, i have an old nokia 3310 lcd that i wish to use with a pic to show, well, text etc. However, all the guides for interfacing with lcds are more for parallel interfacing.

    The 3310 has 8 pins and takes serial data. the pins are:

    1.vdd
    2.SCK - serial clock
    3.SDI - serial data input
    4.D/C - data command input
    5.SCE - chip select
    6.GND - ground
    7.VOUT - VLCD
    8.RES - reset

    My question is a simple wiring one. I'm not sure which pins from the pic (pic16F627 by the way) connect to the lcd. I'm very new to the lcd thing but i'm guessing, power and ground are obviously connected and maybe the serial data input and serial clock for write only?

    Has anyone done this or can help me out?

    Cheers.
     
  2. eblc1388

    eblc1388 Active Member

    Joined:
    Jan 25, 2005
    Messages:
    2,228
    Likes:
    18
    Location:
    UK
    There are a few things that you should be aware of:

    1. The 3310 is 3.3V rated so it will be simplest to operate the PIC at 3.3V too. Otherwise, you have to use resistors to construct voltage dividers for the interface signals.

    2. The LCD uses the serial SPI protocol for data transfer and hardware SPI is not available on 16F62x PICs. The one that has SPI is 16F88 but a regular one only operates down to 4.0V. Therefore you will need to use the 16LF88 in this case. You need to understand how SPI operates in order to control the LCD. You might even be able to "bit-bang" SPI using one of the 16F627 port pins.

    3. You will be responsible for controlling the ON/OFF of every single pixel(84x84 for 3310) of the LCD. So if you want to display a character such as "A" on the LCD, then you have to look up a character map table of how the character is formed in pixels and output the pixel pattern to the LCD. Usually, the font is in a 5x7 matrix so one needs to send 5 bytes to the LCD to display a single character. So each character or symbol would take up at least 5 bytes and a complete ASCII character map will take up a lot of Flash memory.

    4. Go to this webpage to obtain more information about the 3310 LCD including datasheet on the LCD controller chip. Nokia 3310 LCD
     
  3. Gordz

    Gordz New Member

    Joined:
    Oct 27, 2007
    Messages:
    234
    Likes:
    0
    Location:
    Sydney - Australia
    There are a couple of sites with good info for this sort of thing. I have some code ( .ASM ) and PCB's that I made up because I use the things so often. Take a look at my web page for an idea.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. paule00

    paule00 New Member

    Joined:
    Jan 5, 2009
    Messages:
    1
    Likes:
    0

    hy,

    i was reading an this article about the nokia 3310 display. you wrote you have some assembly code for that display. i´m working on some project including this display. but the display won´t work really good. i can write stuff on the display, but when i move the cursor to a different position and write again, it won´t display the characters properly. maybe you could post your code?
    thanks. paul
     
  6. arhi

    arhi Member

    Joined:
    Apr 17, 2008
    Messages:
    887
    Likes:
    12
    Location:
    Belgrade, .rs
    Here is the link with schematic and source code (in c) for connecting nokia display with 16F628
    http://www.sunbizhosting.com/~spiral/3310lcd/3310.html

    another c library for connecting nokia lcd to pic:
    Nokia LCD

    asm and schematic for 16F84:
    LPH7366


    If you want to run your pic on 5V, the simple voltage divider will do the trick. You have also 3vt&t doc attached for other options
     

    Attached Files:

    Last edited: Jan 5, 2009

Share This Page