Sunday, November 15, 2009

Nokia 3310 LCD on a parallel port

Laymanspeak: A Nokia 3310 is lowcost, less than 100 INR. So electronics projects requiring displays frequently use them. How to get such a thing working by making a connection off the parallel port is detailed below.
  • Nice screens shots of the Nokia 3310 LCD, as an audio player UI, secondary display  on the web was the actual motivation.
  • Main info taken from these :Open source serial display library support for Nokia 3310 and Thermometer using a Nokia 3310 LCD
  • Got 1 from the usual place and its difficult to assemble the LCD once it is opened. The pin headers do not sit back easily.
  • Used the power circuitry from the Thermometer site. You do not actually need to use 3 data pins to power the LCD like in that example. And as I had to change serdisp code to switch on a pin in the LPT port, just used a USB connector to get 5V. Chk pic. I used 2 diodes (1N4148) to drop the voltage to around 3.9 - 4V.
  • Used the wiring diagram from the Serdisp PCD site.  Instead of 1K ohms used 10K.  The Vout pin cap is 4.7uF and the capacitor across Vdd is 100uF. This cap seems to give a stable power source and better contrast.
  • Circuit construction is pretty simple. Soldering skill might be needed.
  • Downloaded the latest serdisp tarball and compiled straight out on the Fed 11 box.
  • Connected the circuit and testserdisp was able to bring up the LCD. Pics attached.
  • Also downloaded and compiled GraphLcd . This supports displays supported by serdisp. You can draw pics and get fancy fonts on the LCD. showpic, showtext, convpic: These are tools that convert pics and renders stuff on the LCD.
  • In case the LCD does not work, check at the Vout pin. Pin 7.  If the LCD has been initialised properly this should be around 9 V. If for some reason, communication between PC and LCD is not possible this value will be at a 3-4V range.
  • LCD details: 84x48 pixels. mono chrome. Works on a serial interface (SCLK and Serial Data-in). Has a D/C (Data or Active Low Command) mode and a Reset pin. The CS has been permanently grounded as in the serdisp case. To check if this display is ok,  a Res has to be issued and then command mode and values of 0x21: to put the LCD in Extended mode and 0xC8 to set the Vop. After this command the Vop actually goes to 9V. Basically gives a clue that the LCD comm is fine.

 Serdisp showing digits on LCD

Serdisp showing Pattern

 Parallel port with USB power

No comments:

Post a Comment