Thursday, December 1, 2011

Nokia 1100 LCD Interfacing with Microcontroller

 Displaying content on a normal alphanumeric display is very limited ,we have to be limited with the font size and we can't draw any graphics also. but convention Graphics lcd are really very expensive so here is the solution, you can use Nokia 1100 monochrome  LCD to display your large font text and graphics . the reason behind using this LCD is ,it is really very cheap and can be powered with 3 volts supply. so it is really good for battery powered application.

      Driver IC on this LCD panel is PCF8814 which even though has I2C protocol support - doesn't use it. Instead it uses simple bit-banging mechanism for communication.


Project Description 

       however you can use almost any microcontroller (need a little bit extra circuit to work with mcu who doesn't support 3v) do display content on this LCD, may be that micro controller is PIC , AVR or MSP 430 ,8051 but in this demonstration we will be using Microchip PIC 18F458 Microcontroller.

    The software program for this project will be written in C with MPLAB IDE , This LCD has a resolution of 96 x 65 pixels



Nokia 1100 LCD Pinout

About LCD:-

       Nokia 1100 Graphical LCD uses PCF8814 Controller chip From Philips. It is a chip-on glass(COG) with  9 pin (pin no 9 is not used) connector on the back side of the LCD . You can refer to its datasheet for more information about this controller. (CLICK HERE TO DOWNLOADPCF8814 Controller DATA SHEET).we will discuss only few main points here for out project purpose.

       This LCD has  96 x 65 pixels , which mapped directly in the ram memory of the LCD, as shown in the figure blow
The typical example of RAM is shown in the figure blow, The vertical axes area addressed form 0 to 8 with eight bits for each address when combining with x axes, it can be represented as bank.


The horizontal axes are addressed form 0 to 83 and each bit will refer the corresponding pixel in X direction.

Addressing Mode
 There are two type of addressing mode in this LCD
Vertical addressing Mode

  In vertical addressing Mode each write instruction will increment the address in Y direction and then return to starting address
Horizontal addressing
horizal addressing each wire instruction will increment the address of X direction and return to starting address

INSTRUCTION SET OF PCF8814
NOTE :- PLEASE REFER TO DATA SHEET of PCF8814 for more detailed instructions

Serial Communication
  A byte is sent to The LCD as follows:-
1:- Set SC to GND
2:- Set SCLK to GND
3:- Put the D/C bit (Data or command) to SDA
4:- Set SCLK to 1
5:- set SCLK to 0

6:- put the data bit to to SDA

7:- set SCLK to 1

8:- Repeat step 5,6 and 7 for the remaining seven bits.

The initialization sequence of  LCD


1. Pull CS line to Ground to Enable The LCD.

2 Set RST pin to Low

3. wait For a liitle while ~ 5mS.
4.Set RST pin to high.
5. Write Command 0x20 Byte to LCD on the serial Bus. Write Vop register

6. Write Command 0x90 Byte to LCD on the serial Bus.

7. Write Command 0xA4 Byte to LCD on the serial Bus.  all on/normal display
8.  Write Command 0x2F Byte To LCD on the serial Bus.  Power control set(charge pump on/off)
9.  Write Command 0x40  Byte To LCD on the serial Bus.  set start row address = 0
10. Write the Command 0xB0 Byte to LCD on tee serial Bus. set Y-address = 0
11. Write the Command 0x10 Byte to LCD on tee serial Bus. set X-address, lower 3 bits
12. Write the Command 0x00 Byte to LCD on tee serial Bus. set X-address, upper 3 bits
14. Write the Command 0xC8 Byte to LCD on tee serial Bus. mirror Y axis (about X axis)
15. Write the Command 0xA1 Byte to LCD on tee serial Bus. Invert screen in horizontal axis
16. Write the Command 0xAC Byte to LCD on tee serial Bus. set initial row (R0) of the display
17. Write the Command 0x07 Byte to LCD on tee serial Bus.
18. Write the Command 0xF9 Byte to LCD on tee serial Bus. 
19. Write the Command 0xAF Byte to LCD on tee serial Bus. display ON/OFF

20:- clear the LCD
21:- Write the Command 0xA7 Byte to LCD on tee serial Bus. Invert the display
22:-wait for 500 ms
23:-Write the Command 0xA7 Byte to LCD on tee serial Bus. Normal  the display


clearing the LCD,  after initialization pull SCE pin to ground to enable the LCD.Set D/C pin to high to send the data to the LCD.  Repeat  "write byte 0x00" operation to the LCD for 864 times thi will turn off all the pixels in the LCD.

Assembling the Circuit

    The circuit is very easy to understand. but  the only precaution which need to be taken care is soldering the  wire to the LCD is very complex job.and you can't supply more than 3 volts  , please not that 5 volts may blow up the LCD  My prototype image shown blow





Software 
 The software program is written in C with the help of MPLAB and Microchip C18 compiler 

Click here to Download the software source code and ready to run firmware 

if some body sill have any question please let me know

20 comments:

  1. Hi! Great post! What program do you use to draw the schematic? Thanks!

    ReplyDelete
  2. @Edi

    thank you for comment

    i use adobe illustrator cs5

    ReplyDelete
  3. @Gaurav

    So you are an artist too. =)

    Thank you!

    ReplyDelete
  4. hai,
    pls post same project bt using mcs 89s52,i dont have a pic programmer.

    ReplyDelete
  5. Hi.

    This is fascinating. I am a Mechanical engineer, and my understanding of electronics extends to voltages, currents, resistance, capacitance, etc. I would very much love to understand more about electronics, and there is clearly a chunk of "basic knowledge" that is needed to understand this article. Can you recommend an "electronics for dummes" book that would allow me to properly understand your articles?

    Thanks in advance.

    ReplyDelete
  6. HEy can you please help me use this lcd with my arduino ? I am running out of pins . Is there any way by which i can use a serial output from a single pin to work with the lcd.? also do i require any headerfiles to use thelcd with arduino ? Please help ....

    ReplyDelete
  7. Does anybody have any pointers as to where to acquire these displays at a reasonable price.\
    Thanks, Jack

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Hi,

      In India, these displays are available at
      http://www.digibay.in/nokia-1100-monochrome-lcd-96-x-65-pixel-arduino-compatible

      Delete
  8. hi jack

    go through the local dealer or some online store for cell phone spare components

    and the lcd are also available on ebay

    ReplyDelete
  9. DEAR SIR,
    pls post a parrell or usb pic programmer,i have pic16f877,73,but i cant program those for this project.

    ReplyDelete
  10. Hi, you programed some microcontroller PIC in Linux operative system?

    ReplyDelete
  11. pic18f458 is not available in my near by place ,pls post circuit for pic16f73/16f877A,pls post source code for same pic controller,i have made pic serial programmmer& usb programmer for 89sxxseries of you sir.a lot of thanks for it....

    ReplyDelete
  12. Hello, Jack.

    I'm sorry for my english.

    About the gotoxy function, how much lines and columns are avaible for write?

    I'm interested in use a 1100 LCD display with a PIC16F887 microcontroller, but this isn't the problem.
    You says using the MPLAB and Microchip C18 compiler, but I use the CSS compiler and I don't know how to transfer the LCD functions, principally the ROM TABLE. Can you help-me or give-me a light?

    Thanks.

    ReplyDelete
    Replies
    1. Hi.

      I find the CCS PIC code in this link:

      http://www.ccsinfo.com/forum/viewtopic.php?t=44928

      Delete
  13. hi
    i dont now this lcd 1100 model pins datasheet .... plz go in this site
    http://www.alibaba.com/product-gs/421585813/for_Nokia_1100_lcd.html

    plz help me

    my email addres is sajjad13066@gmail.com

    tnx alot :)

    ReplyDelete
    Replies
    1. there may be two this
      1. the lcd on link is not nokia 1100 lcd
      2. or thay is nokia 1100 lcd but they are just displaying wrong image maybe for illustration purpose only maybe they ship you the nokia 1100 lcd like mine

      Delete
  14. Hi,
    I'm trying to rotate the display by 180°. I believe it can be done by setting MY and MX to 1. But how do I mirror it around the Y axis i.e setting the MX to 1?
    Thanks.

    ReplyDelete
  15. Hi,
    How to make of basic codec for proton or microcode?
    Excelent!

    ReplyDelete