Back to photostream

Ardunio Uno and Graphics LCD

I have just started getting into programming on the Ardunio/Atmel microcontroller platform and one of the projects I’d like to build involves using a 128x64 monochrome LCD module.

 

Enter the Deal Extreme “5V 3.2" LCD12864 Screen Module with Backlit (Yellow & Green Screen/English Word Stock)” SKU 121820. The description yellow/green was wrong but I guess that because the photos did not match on the page. I thought they were cheap and worth taking a chance on so I ordered two. I was reasonably sure I could make them work in one form or another.

 

I spent several hours one night trying to figure out what controller the board uses (ST7920), what pins to connect where and which libraries to use. I got nowhere. I retried last night and had success. The code examples I found didn’t compile with IDE 1.0 so rather than redo the code for something that might not be what I need to make it work I downloaded IDE 0023. Once I had the demo working I understood what I needed to do to make the u8glib (Universal Graphics Library for 8 Bit Embedded Systems) work.

 

Deal Extreme Part

 

U8glib link code.google.com/p/u8glib/

 

My pin config:

LCD->ArdunioUsed as

Gnd Gnd Ground

VCC 5V Power

RS Pin 8 Chip Select (CS)

R/W Pin 9 Serial Input (MOSI)

E Pin 3 Serial Clock (SCK)

PSB Gnd Pull low to enable SPI mode

 

*And don’t forget about the contrast and black light pins.

 

Code to Make it Work

#include "U8glib.h"

U8GLIB_ST7920_128X64 u8g(3, 9, 8, U8G_PIN_NONE);

// SPI Com: SCK = en = 3, MOSI = rw = 9, CS = di = 8

 

 

 

Click here for the LCD screen

 

More Arduino DX products

 

Click here for DX (Deal Extreme)

 

14,255 views
4 faves
39 comments
Uploaded on June 7, 2012
Taken on June 7, 2012