This wiki has been archived and made read-only.
For up-to-date information about TkkrLab and it's projects please visit our main website at tkkrlab.nl.

Glcd 100x48

From

Jump to: navigation, search

General

We bought some nice graphical LCD screens.

Resolution: 100x48 + 5 status icons above the screen (one is 2 parts, so 6 really).

Controller: SED1531

Pinout

The pinout assumes you tie 5v for the display to a pin. to toggle the display on reset. A better solution is shown below. just connect the 5v of the display to your 5v supply and put a 10K or so pulldown resistor to the E pin. lcd pinout:
'Pin layout display:
' 1 2 3 4 5 6 7 8 9 10 11 12 13 14
' GND 5V BL A0 RW E DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0

5V A0 E DB6 DB4 DB2 DB0
2 4 6 8 10 12 14
1 3 5 7 9 11 13
GND BL RW DB7 DB5 DB3 DB1


Pinout for connecting sketch down below:

Van LCD naar arduino
Pin   LCD                                PIN Arduino
 
1     GND
2     +5V                                 Digital 13
3     Backlight (GND)
4     AO (L - instruction/ H - data)      Digital 12
5     Read/Write (H - Read / L - Writer)  Digital 11
6     Enable Digital                      Digital 10
 
Data
7    DB 7 MSB                             Digital 9
8    DB 6                                 Digital 8
9    DB 5                                 Digital 7
10   DB 4                                 Digital 6
11   DB 3                                 Digital 5
12   DB 2                                 Digital 4
13   DB 1                                 Digital 3
14   DB 0 LSB                             Digital 2

example


Arduino code, paste in ide to compile:
http://tkkrlab.nl/wiki/Arduino-SED1531-working-code

working library written by Duality

https://github.com/Duality4Y/SED1531.git (based on the above sketch.)

A thing I noticed is that if you use the sketch below and my library (on my arduino) the screen
goes blank after a while.
Also reseting the arduino does not reset the lcd.
These might be things to look at and keep in mind, I will try to work these out and
fix this.
The reseting can simple be fixed by connecting a pulldown resistor to the enable pin of the display.
a better working fixed is shown lower on this page.

I've designed a pcb as wel that serve's as a flat cable to dip connector that
you can plug into your bread board and connect the flat cable to.
files can be found here: uh oops not working.

#include <SED1531.h>
 
SED1531 lcd;
 
void setup(){
  lcd.begin();
  lcd.setCursor(0);
  lcd.setContrast(16);
  lcd.println("bam");
  lcd.println("bam");
  lcd.println("bam");
  lcd.println("bam");
  lcd.println("bam");
  lcd.println("bam");
  lcd.println("worked!");
  lcd.println("Hello World!");
  lcd.print("this is a long line yea it is long line");
  delay(2000);
  lcd.inverse(true);
}
void loop(){
  for(int c = 0;c<31;c++){
    lcd.setContrast(c);
    delay(20);  
  }
  for(int c=31;c>0;c--){
    lcd.setContrast(c);
    delay(15);
  }
  lcd.setContrast(16);
  lcd.inverse(false);
  for(int i = 1;i<=6;i++){
    lcd.setMarker(i,true);
    delay(400);
    lcd.setMarker(i,false);
    delay(100);
  }
  lcd.inverse(true);
}


16-12-2013
The library is making a lot of progress.

it has basic character displaying and writing.

it is able to do graphical stuff. like drawing circles and square lines. you can even draw your own thing.

features that are planned: better font handling. better text handling.

source and Docs:
https://github.com/Duality4Y/DmDisplay/wiki

library for arduino written by Drbytes (graphical and text)

A graphical and text library for this display, complete with demo sketches and a port from the clasic game pong.
features of this library:

  • multiple fonts (proportional and fixed width)
  • draw text on any pixel height
  • draw Pixels, lines, boxes, frames and (un)filled circles
  • Collision detect on all draw functions (used in the example game pong)
  • Compatible with arduino Print class

Download: File:SED1531.zip SED1531 Arduino library V1.0 Warning: This library uses a different pinout then the pinout documented above and used in the other code examples, for the correct pinout for use with this library see the file SED1531_arduino.h in the library. Different pin connections in this lib: GLCD D0..D1 = Arduino PIN8..PIN9 and GLCD D2..D7 = Arduino PIN2..7. The other pins are the same.

This library is based on C library for SED1531 based displays

latch-up of the display controller SED1531 by an overshoot of the E-signal

This Display seems to suffer from a problem, sometimes the display blanks or does not start, specificly after resetting the arduino or uploading a new sketch. The only way to get it working again is to power down, wait a while and then power up again. This is why some of the code examples for this display connect the power pin from the display to one of the output pins so it can be powered down and up with each reset but this will cost us a pin which we cannot use for something else. Fortunatly Plons already found that out too and has a solution for this (see his page for more details on this problem):

//  Now the fix:
//                           ------
//         Digital10  ------|      |----------------------------------------------------------  pin 6 == Enable
//                           ------           |                                   |
//                            470R            |                                   |
//                                           ---                                  |
//                                          |   |  10k(not 3k3)                 -----
//  Arduino                                 |   |           or use a capacitor  -----                   Display
//                                           ---                of 330 pF         |
//                                            |                                   |
//                                            |                                   |
//          Gnd    ----------------------------------------------------------------------------  pin 1 == Gnd      
//
//  Both solutions work. Personally I prefer the resistive divider, but technically the slewrate-limiter 
//  with 470 Ohm and 330 pF to ground is an acceptable cure as well.

I tried both options and found out that with the resistor divider it works best because the solution with capacitor slows down the signal too much and requires extra delays in the SED1531 Arduino Library. Also i used a 10k resistor instead of the 3k3 for less current consumption. The 10k works well too, i did not try any higher values yet.

More Info

samenkopen thread:
circuitsonline thread:SED1531
The circcuitsonline thread litterly says that the pin out in the datasheet is incorect,
this might be the reason why i couldn't really get it to work at first and had to look at someone else's code (samenkopen thread).
links:
an other wiki
a forum thread circuitsonline.net
clibrary
GLCD SED1531 Library
voorbeelden:

Glcd arduino library

Some resources suggest you can use this display with the arduino glcd library.

Specs

Good datasheet: allDatasheet SED1530 Series