Please be aware of all shipping deadlines before placing your order - we cannot guarantee orders will arrive before Christmas!

Graphic LCD (ST7565) with Arduino Due
Moderators: adafruit_support_bill, adafruit

Graphic LCD (ST7565) with Arduino Due

by titous on Thu Feb 07, 2013 5:10 pm

hey adafruit!

i just upgraded my little OLED (from you guys, love that thing!) to a bigger graphic display. i know that the current state of the library does not run on the Arduino Due so I began porting it over. I removed the PROGMEM part from the glcdfont table and ported over the things like pgm_read_word etc; I've got things hooked up, back light is all happy but (and you know what i'm going to say) I can't get anything poppin up on the display. I was hoping someone could point at something in the library that isn't correct or some hint at what i'm doing wrong. i'd really like to get this things working, that screen is just so beautiful! attached ive got all the files needed to run on the Due.

Here is the .ino for easy of testing:

Code: Select all | TOGGLE FULL SIZE
#include "ST7565.h"

// the LCD backlight is connected up to a pin so you can turn it on & off
#define BACKLIGHT_LED 10

// pin 9 - Serial data out (SID)
// pin 8 - Serial clock out (SCLK)
// pin 7 - Data/Command select (RS or A0)
// pin 6 - LCD reset (RST)
// pin 5 - LCD chip select (CS)
ST7565 glcd(12, 11, 10, 9, 8);

// The setup() method runs once, when the sketch starts
void setup() {
  Serial.begin(9600);

 
  // turn on backlight
  pinMode(BACKLIGHT_LED, OUTPUT);
  digitalWrite(BACKLIGHT_LED, HIGH);

  // initialize and set the contrast to 0x18
  glcd.begin(0x20);

  glcd.display(); // show splashscreen
  delay(2000);
  glcd.clear();




}


void loop()
{
  // draw a string at location (0,0)
  glcd.drawstring(0, 0, "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation");
  glcd.display();
  delay(2000);
  glcd.clear();

}


glcdfont.c
(8.05 KiB) Downloaded 36 times

ST7565.cpp
(11.8 KiB) Downloaded 35 times

ST7565.h
(3.39 KiB) Downloaded 33 times
titous
 
Posts: 62
Joined: Thu Jun 21, 2012 9:19 am

Re: Graphic LCD (ST7565) with Arduino Due

by thekitty on Sun Feb 10, 2013 6:00 pm

I'm going to try connecting the 2.2" LCD to DUE. You will probably need to connect different pins if using SPI. The SPI header is the place to get those signals rather than the Uno pins typically used. If I am successful I'll write up how I did it.
thekitty
 
Posts: 603
Joined: Sat Mar 24, 2012 8:56 pm
Location: Mid-Atlantic

Re: Graphic LCD (ST7565) with Arduino Due

by titous on Sun Feb 10, 2013 6:10 pm

TheKitty wrote:I'm going to try connecting the 2.2" LCD to DUE. You will probably need to connect different pins if using SPI. The SPI header is the place to get those signals rather than the Uno pins typically used. If I am successful I'll write up how I did it.


but the library for use with the Uno simply uses digital pins and not the SPI ones... i'm lost!
titous
 
Posts: 62
Joined: Thu Jun 21, 2012 9:19 am

Re: Graphic LCD (ST7565) with Arduino Due

by titous on Thu Feb 21, 2013 7:45 pm

hi everyone! I'm excited to share that i've got my LCD display working on the due through this fantastic piece of library work

there are a few tricks to get the display working with the mentioned library:
1. use the U8GLIB_LM6059 u8g(SCLK, SID, CS, a0) constructor
2. tie your RST pin to 3.3V

and that's it! now, the library doesn't currently support other display drivers like the ST7735, but i'm guessing this library could easily be modified for them. i know mike is working on getting it to work for some adafruit displays using that driver....
titous
 
Posts: 62
Joined: Thu Jun 21, 2012 9:19 am