ST7920 GLCD Tutorial - Opensourceszs
ST7920 GLCD Tutorial - Opensourceszs
Pot:
PIN 1 to 5V (powered by arduino)
PIN 2 to PIN 3 on LCD [V0]
PIN 3 to PIN 18 on LCD [VOUT]
DATASHEET:
Forum Discussion: http://forum.arduino.cc/index.php?topic=133736.0
#include "U8glib.h"
// setup u8g object, please remove comment from one of the following constructor calls
U8GLIB_ST7920_128X64 u8g(13, 11, 10, U8G_PIN_NONE); // SPI Com: SCK = en = 13, MOSI
= rw = 11, CS = di = 0
void draw(void) {
IMAGES:
// graphic commands to redraw the complete screen should be placed here
u8g.setFont(u8g_font_unifont);
//u8g.setFont(u8g_font_osb21);
void setup(void) {
// u8g.setRot180();
//u8g.setHardwareBackup(u8g_backup_avr_spi);
if ( u8g.getMode() == U8G_MODE_R3G3B2 )
u8g.setColorIndex(255); // white
u8g.setColorIndex(1); // pixel on
1 of 2 5/30/2015 10:55 AM
ST7920 GLCD tutorial - opensourceszs https://sites.google.com/site/opensourceszs/project-arduino/st7920-glcd-t...
void loop(void) {
// picture loop
u8g.firstPage();
do {
draw();
} while( u8g.nextPage() );
delay(500);
Sign in | Recent Site Activity | Report Abuse | Print Page | Powered By Google Sites
2 of 2 5/30/2015 10:55 AM