3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Connecting Nokia 3310 LCD to USB using AVR

Connecting Nokia 3310 LCD to USB using AVR
What do you do with an old phone, a microcontroller and lots of time?
You hook the old phone's LCD screen to the computer USB of course!


In this project we're going to communicate with a Nokia 3310 LCD display over USB! How are we going to do that? We're going to connect the LCD display to an Atmel ATmega8 micocontroller and talk to it using the SPI, then connect the ATmega to a PC using V-USB.

The Nokia 3310 LCD display is easy to find, and has a very well documented interface, so it's perfect for hobby use! Not only that, but we're going to use V-USB (Formerly AVR-USB) as our USB driver on the AVR chip. This makes the project very easy to pull off the ground.

V-USB is very slow, so you cannot do any fancy animations this way, but is perfect for updating the display with text! Also, when using USB, you can use this on pretty much any computer. It does require libusb though, but libusb is cross platfrom, so that shouldn't be a problem. Or, if you're really hardcore, you can write your own driver for this project (This is way out of the scope of this instructable)!

What uses does thing have?
As I mentioned, V-USB is pretty slow, so it's best for sending text. Even through this is a little drawback, there is still a lot of stuff you can do with it!
Display RSS feed, Twitter updates, weather, temperature, free disk space, unread e-mails.
You are not limited to just display text though. If you're feeling really fancy, you can make a 1-bit picture slideshow!
Only your imagination (And the slow speed of V-USB) limits you :)

What features does the code have?
With the code you get from this Instructable, you get:
* Built-in font and support for writing ASCII characters
* Character wrapping (Prevents characters from being printed over 2 lines if end of display is reached)
* USB connected
and powered
* Easy to expand

The code is open source (Both firmware and host software), so you're free to do whatever you want with it. (This only includes the software I have written. See the license for V-USB for further use of that, same goes for libusb. Both licenses are included in the source files.)

This project is loosely based on Raphnet's Multiuse PCB, V-USB's PowerSwitch and DharmaniTech's Nokia 3310 LCD routines library.

If you have problems downloading the attached files, I have mirrored them here: Atmega8_LCD.rar and LCD_Screen.rar
 
Remove these adsRemove these ads by Signing Up
 

Step 1This instructable

In this instructable, our main focus is the programming of the decive and host software.

What we'll cover in this instructable:
* Circuit and components
* Processing the data using V-USB on the AVR
* How to communicate with the LCD screen, and what you can tell it
* Transferring data through USB using libusb on the host
* Make a custom font for the display


We will not cover setting up V-USB or libusb, as these are included in the sources!

This instructable is a little advanced, but I assume you know the following:
* Can read datasheets and schematics
* Can solder decently
* Is familiar with programming in C/C++
* Uses Visual C++ 2008 (For the host software, no platform depended code used, so can easily be ported)
* Knows how to burn AVR chips and the programs needed to do so
* Knows the basics of AVR programming
* You use Windows (This can be done on any OS, but I currently only have Windows at hand)


If you have little or no programming experience and is very new electronics, this is not a good way to start. Have you tried making a LED blinker yet? Yes? How about a music box with a piezo element? That might keep you busy for quite some time :)

The concepts in this instructable might be very confusing to one who have little programming experience, and I do not go into too deep details in the concepts.

If you absolutely want to do this instructable even though you are a beginner, I have commented the source code as good as I can. If something still is unclear, drop a comment and I'll try to help you.
« Previous StepDownload PDFView All StepsNext Step »
22 comments
Oct 24, 2011. 4:12 AMalexiscalingasan says:
We followed your schematic but why is it always "USB Device Not Recognized"?
Oct 25, 2011. 8:28 AMalexiscalingasan says:
Sir we already have the "Display Initialized" output at the LCD but why is it still "usb device not recognized" in my pc? Am I doing it right?
Oct 26, 2011. 10:25 AMalexiscalingasan says:
I think the problem is the zener diodes... Can I use 5V to data lines.
Sep 10, 2011. 3:52 AMjalfan says:
hey how r u,,,,, dude ur anabsolute genious..could u tell me what's the way to display content on any lcd screen plz???
thnx
May 5, 2011. 8:54 AMputyn says:
hey :)
nice instructable but i have to ask something isnt the nokia lcd running @3.3V ?
May 5, 2011. 12:07 PMputyn says:
ive done some tests myself and got the lcd working powered @ 3.3V from arduino and the data lines were @5V

anyway thanks for the quick reply
Jul 12, 2010. 11:11 AMhrshovon says:
thanks a lot for this instructable...i have been looking for a better reference on v-usb for months and at last ... i found yours!great work!
Dec 19, 2010. 1:56 PMhrshovon says:
Your work made me understand v-usb....and i have applied it to develop a loader software for usbasp.But i can only send data to the device...cant get them....i m using vb6 as my language and libusbvb0.dll as my link library to communicate with libusb...if u can give me some suggestions...that will be really great!!!
(My software is actually a GUI for avrdude..with some extra usbasp control features)
Jul 25, 2010. 2:55 PMjoe57005 says:
do you think the LCD from a nokia 6340i would work? it looks very similar to the one in your picture, same dimensions, pin count, but it has three smd components instead of two. i haven't been able to find much helpful info from google, just a bunch of sites trying to sell replacement parts. i guess i'll just have to wire it up and see what happens.
Aug 5, 2010. 9:19 AMjoe57005 says:
Thanks for your info! i'll let you know if i get it working!
Jul 7, 2010. 11:32 PMCrLz says:
Thanks for posting this Instructable! Hard work = sweet project
Jul 6, 2010. 3:01 PMblackwellj says:
could you point me in the direction of doing this on a mac
Jul 4, 2010. 12:58 PMrammstein2 says:
could the lcd be used as a multimeter panel(for e.g i want to include an lcd screen on a bench power supply)??

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
7
Followers
1
Author:wkter