Monday, September 22, 2008

NOKIA 3310 LCD interfacing with ATmega8

Hi friends,

using graphic LCD in a project gives itreally a good look and flexibility of displaying different characters and shapes. But, the graphic LCDs are quite costly.

The NOKIA 3310 LCD provides a really low-cost solution to add a small graphic display into your project and also good for learning purpose. The LCD is SPI bus compatible, saving many pins for other uses. It operates at 3.3v.

Here is a small circuit for interfacing the 3310 LCD with AVR microcontroller ATmega8. The schematic includes LCD connection with SPI port of ATmega8 with other connections required by LCD. The 3.3v is generated using adjustable voltage regulator LM317 (I was not having any 3.3v regulator at the moment). An LED is also connected with microcontroller just for making sure that the controller is working, particularly when you don't see anything on the display!

Here is the schematic and the pin details of the LCD:

The connector of LCD is 'touch' type. So, I made a small connecor PCB with tracks touching to the pins of LCD. The pcb was pasted at backside of LCD using cello tapes as shown in the back-view image
.

Here is a testing with Proteus ISIS Simulation:

The program routines are written in C with ICCAVR compiler. I've created a library for this display. The low-cost, easy availability has made me relly like this display.
I'm going to use it for

Hi Avinash,are you getting atleast the LCD filled up with black dots? When the LCD is powered up, it shows the screen filled up with black pixels (may be of low contrast,but it'll be visible on sceen) just like the way alphnumeric LCD behaves when you power it on (there the upper line is usually filled with black matrix dots).

If you are not getting that, then there is a connection problem, check it out. If you have soldered directly on the LCD connector,chances are there that the thin transparent conductive layer (between the LCD connector & LCD screen) may have got some problem.

I'm a beginner Mr.Dharmani i would like to know one thing if I use say a nokia 1110 how different will my schematic be. Does the 1110 use a different driver and what about the libraries will they be different. I m trying to get my hands on a 3310 but in case i don't. how do i go about it on a 1110? Thank you.

To CC DharmaniSir, i have tried interfacing 3310 LCD with ATmega8L also.it is still not working.connection and prog status:1.connection as per your circuit diagram with 3.3V vtg regulator(1117).2.i have put hex file given by u in controller.3.fuse bits :hfuse:D9;Lfuse:E4;8mhz frequency....

Hi abhi,How have you connected the LCD with the controller, by soldering wires directly on the display connector? IF yes, then there are chances that the connection may have problem. The connector is having a transparent conductive layer to make internal contact with the display, which is very thin. If you apply too much of heat, it may get damaged.If you have another display, give it a try. A working display will show matrix of black dots (may be faint) on the screen, even if it is not initialized.Check the connections again.

Hello Dharma,i have become regular visitor to your wonderful site! you have connected nokia lcd to SPI port of AVR, will the display work if i connected to i2c port, as i have some other device on spi port ( yes, you guessed it - its SD card) since SDAT and SCK are also there in i2c port. i want to know exactly which protocol is supported by Nokia 3310 display - SPI or i2c?

Hi Nischay,the nokia 3310 LCd works on SPI bus only, you can't connect it on I2C bus. Even if you have anything connected on the SPI bus, still you can use the LCD on the same bus, as each device on the SPI bus has a separate Slave Select (SS) pin. You can connect as many devices on the SPI bus as you want provided that you have a separate SS pin for each of those devices.

Ofcourse, there are other methods to connect devises in SPI bus (like Daisy Chain), but in your case, connect the 3310 LCD on the same bus, and just use another SS pin for LCD which you are not using for the SD Card

my previous LCD is not working ,so i brought a new LCD and made same PCB for connection as you made.but still its not working ..its getting 3.3v between pins 1 & 6.. but not showing any black pixel dots.

i have done connection for ATmega8 as per ur circuit diagram and .i have pburnt .hex code provided by u in thermometer project.

according to diag shown by you pin no 8 is near hole drilled for holding LCD?

Hello Dharma, Thank you for clarifying my doubts. one more thing, from where did you buy 3310 display and how much it costs- i live in Hyderabad (A.P).here Electronics components shops don't sell these displays.

before seeing your post,today morning i went to jadgish market and purchased the 3310 display, the vendor said it costs Rs.150, i bargained and got for Rs.130,i don't know if i paid more or less. i have just now finished making hand drawn pcb for connection,tommorrow i'll try to set it up with mega8

To Abhi:Hi, if you are using the thermometer hex file, it may not show anything on display if the thermometer IC is not connected, as the code may hang during initialization itself. Put up your email ID here, or write to me on ccd@dharmanitech.com, I'll send you the code without the thermometer IC, just to display some text on the 3310 LCD

Hello Dharma,when i power up the bread board with atmega8 on the board,my display just shows black screen and just hangs, i directly soldered 8 thin wires to the lcd pins ( was very careful ), my mega8 is running at 8Mhz IntRC.

one more thing,i have ANDed y addr with 07h and ORed with 40h and x addr ANDed with 7Fh and ORed with 80h to set cursor, is this correct ?

I have AtMega128 and I want to interface my Nokia3310 LCD to it. Please give me some direction so as to how to proceed or how different my connections would become on Atmega128, compared to your Atmega8.and also please mail me some files so that I can check my LCD display as to is it working or not.

Earlier I was told by someone that since my LCD has different controller(PCD8544), I cant run it with Atmega128 that has AVR. Please help me.

Balaji said it correctly, you have been misinformed. Any microcontroller having SPI bus can be interfaced with this LCD easily, and mega128 is having it.You won't have to change many things there.No change in the DS1621 interface, as the mega128 is having the sameI2C (TWI) interface as the mega8.

For connecting the Nokia display, again there won't be ant change inthe SPI bus connection, just use the MISO, MOSI & SCK same way asshown in my schematic. Only thing you have to ensure is that youconnect the same port pin which I used for connecting the chip-selectpin of the display, if you don't want to change the code.

That's all, you can compile the code again for the mega128, and there you go!!

Thats very nice work! But my display still does not work. It even does not show black dots vhen it is not inicialized. I have display from mobile 3410 I thought that is the same as 3310 but I found that is not... So it will not work, does it? :) Could you send me source code and hex for simple LCD interfacing? I will try to get some 3310 display. By the way.... did you try to interface 3410 display? Thanks very much. pepajanda@seznam.cz

hello dharmani...i already completed compile thermometer.hex from this schematic, but i not use thermometer,succes lcd is flame,but not appear character,just blank "black" lcd. i think connection schematic is true. i try just atmega8 and lcd.So,could you send me this file.hex..how to setting internal clock,i'm not understand..could you give me library .hex with use external clock just simple 4-12 mhz.

Hi!I'm having a problem.I've compiled my code writing to the display works. But the display is constantly blinking. The text appears but the background contrast is pulsating. Running the program to a constant while(1) do LcdUpdate decreases the intensity slightly but not much better. I'm running it on a MEGA8 at 4 or 8 MHz. BTW, what is the lowest frequency I can use?

aniketSir,i want to use nokia3310 display for my project.i have seen the lib files,would you plz send me the complete c code of interfacing 3310 with atmega8.i am also using RF comm in my project and having problems of noise being read by receiver.plz tell me the baud rate to be used.email:patil.anikett@yahoo.in

Hello - nice work and the clean layouts are good to see. I am trying to get this 3310 lcd working with an arduino duemilanove (atmega328). can you suggest a schematic or photo for this layout? having a bit of confusion - some say sites resistors, others not, others caps & resistors. i would rather see a working example than destroy several lcds through trial and error. thanks.-mike

Hi dharmani,My project is to reduce power dissipation in LCD, for that I have chosen atmega169 as the LCD controller. I will be varying the frame rate, duty refresh ratio to see how does power used changes. Which LCD can be used for this, graphical or alphanumeric, tell me the particular part no. Would I have to use another controller that would actually send the data to the LCD or with just atmega169, I would be able to perform all these functions?Please help me.

Hello,Really nice project.I tried 3310 project with atmega8 that is available on net, but proteus simulation is showing garbage.Can you please send me your function library for lcd and a test hex file.(devi.anant@gmail.com)Thanks.

Hello, Mr. Dharmani.. Iloved the way you've described the topic. wish u good luck in your future endeavours!! I have decided to follow along your lines to interface 3310 to ATmega8. It would immensely help me if you code send me the code files to

I did everything you said above in this article. I write a simple test string on the lcd. The string shows up but the screen blinks. I goes black, then white, again black, and so on. I can se the text only when is white. What can I do? I think is something about the contrast, but I can't figure out what...The LCD's power supply is a LM317. I do have put a 10uF capacitor on Vout. If I take that capacitor the screen goes dark, if I put it, it starts blinking.

My email is: iulian.matesica@gmail.com - but I think here is the best place for the solution. Maybe this is useful for other people.

I hope you've solved the problem by now, as I also can't see what's wrong there. Certainly contrast is not a problem, unless you keep changing it in the software. Since contrast is adjusted only once during the LCD initialization in the code, it will remain the same, it wouldn't result in blinking. Have a look at any part of the code which you might have modified.This can also result if the capacitor you mentioned keeps charging discharging, may be result of faulty cap, I guess. Or the worst thing, try with another display.

sir,i wanna interface nokia 1110 with 8051,,does it suppports at commands,,,wats process???plz help me out...my project is vehicle tracking system using gps & gsm in wich extracting info from gps receiver interfaced with 8051,sending that info(longitude,lattitude) to remote gsm mobile on request to the nokia 1110 interfaced with the same microcontroller

How to test 3310 LCD before connecting to Microcontroller?I have connected 10microF to Vout and ground and then connected 3V battery to Vdd and Ground. remaining all pins including reset pin left unconnected. But there was no any change in the display.

hello dharmani,,,I devartha from Indonesia, I'm very interested in your article and I feel very lucky to be able to read it ...I need your help to give an example using the basic language program in Bascom avr ...thanks before

sir , i am making a project on accelerometer and i want to connect my adxl 335 to the bread board sir actually i am using adxl 335 PCBZ which is very small (4mm x 4mm x 1.45mm LFCSP) and can't be soldered directly.so how can i connect it with breadboard.i don't want to use breakout board since i have already purchased the ic.

I have connected the lcd like you and it works. The only thing that makes me wondering is how come the MISO pin works as an output. In the datasheet it says that when SPI is enabled the MISO pin is configurated as an input. And if that is so then how is it possible that still the lcd gets reseted. The other thing is the power supply of the lcd. I can not get it to work with 3.3V. If I wont the lcd to show images that are visible I have to use 4V minimum. I do not know exactly wich model of the NOKIA lcd I am using. Is it possible that I have an lcd that works on higher voltages? I tried almost everything but the logic level shifting. But if you design works without it then I don't know why my shouldnt. Anyway great job for you and I hope I get your reply.

I searched the internet over full night, every one using the regular same LCD screen(16x2). this is first blog i found which uses a different type of LCD(nokia). where did u get the details of that LCD. Any your blog is really nice. thanks for sharing.

hy... am using nokia3310 display..for my project called logic analyser...its displaying nothing when i give pulse from a t.v remote...so i checked whether its workin or not...i gave power supplyits just displaying some lines for 2minutes. and disappearing..please help me..mail id:tejarazz22@gmailcom

Hello!,I found old 3310 and want to use it.I solder it up and connect to mega8i turn power ON and nothing displays,but when i turn OFF power it shows some random lines.here is pic:http://i.imgur.com/zwkS6m4.jpg

Hello!,I found old 3310 and want to use it.I solder it up and connect to mega8i turn power ON and nothing displays,but when i turn OFF power it shows some random lines.here is pic:http://i.imgur.com/zwkS6m4.jpg

Sir thankyou!This is the right place to get more stuffs,you always have something new in this site.Sir i am using this lcd with avr studio4 including your routine file but didnt get any text out.sir my connection is very precise as in your diagram.i think there is something wrong in my main.c fileSir please send me sample main.c source code ,my email is dubeyhariom4@gmail.com

you can first try the LCD with one of the hex files available in the zip files that you download from this post, like the one I used in proteus simulation. This way, your connections and the LCD will be tested. Later on you can modify main file the way you want.

I need to interface with Nokia 3310 LCD for a microcontroller project, but I am not familiar with soldering, moreover the pin are too small on the LCD. Is there a way I can interface with the LCD without soldering.

Usually the officials will place the PSC Results 2018 bd in the official website after the countries education minister announces the results officially. Many students are aware of only that website and access the site for checking their PSC Result 2018 Dhaka Board Bangladesh

Good news students. Rajshahi board is soon going to publish the class 8 or JSC results in the official site along with other boards. The jSC Result 2018 Comilla Boardwould be available by the end of December 2018. You can know the exact result date by reading this post completely.

BSNL and Nokia inked a MoU to explore opportunities in the public safety space as a joint initiative. “Under the agreement, Nokia will become BSNL’s Original Equipment Manufacturer (OEM) technology partner for public safety projects. The collaboration will assist in advancing public safety standards in the country and supports the government’s Smart Cities Mission,” Visit the link for more details

It has been simply incredibly generous with you to provide openly what exactly many individuals would’ve marketed for an eBook to end up making some cash for their end, primarily given that you could have tried it in the event you wanted.nebosh course in chennai

Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support about this area.fire and safety course in chennai

The new provisions in the GPF rules have been reviewed by Central government and it has now been decided to permit withdrawals from the fund by the employee or subscriber for obligatory expenses viz. betrothal (engagement), marriage, funerals, or other ceremonies of self or family members and dependants, besides illness of aself and familymembers upon request.

The Python training course starts with the basic syntax of Python and continues to small GUI programs. You will learn Python data types such as Tuples and Dictionaries, Looping, Functions and I/O handling. Python training will also give you an overview of Object Oriented Programming and Graphical application development. Python Scripting course will explain some basics modules and their usage. At the end of the Python Scripting Training, individuals will have the skills to grow in Web-Development, GUI Application Programming, Game Development and writing powerful scripts for System Administration. python institutes in ameerpet

This RPA Training makes audience for the deliver cost-effective solutions to the companies in the span of the time. RPA is processing the transaction, manipulating the data, triggering responses and communicating with other digital systems. NBITS Robotic Process Automation Anywhere (RPA) with UiPath training course will build your RPA expertise from the ground up using the advanced UiPath RPA platform. This course will prepare you for the RPA Developer Advanced Certification exam. rpa training in hyderabad

Safe Landing, Welcome!!

Hi techies,this blog is created for sharing design ideas of circuits based on microcontrollers!! Be it any controller, i don't mind! my favourite microocntrollers are AVRs from Atmel (Microchip)Have a say if you find anything useful or the opposite on this blog!! You can also share your comments on the designs!

Free Datasheets

Translate this page

Subscribe To

Copyright (c) 2009-2018 CC DharmaniDisclaimer: Information presented on this blog is on a cost-free basis and though it is tested with best of my knowledge to make it error-free, no warranty is given for any mistake and hence no responsibility taken for any faults. Try it at your own risk! -CC Dharmani