Graphic LCD (ST7565) with Arduino Due

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
titous
 
Posts: 62
Joined: Thu Jun 21, 2012 9:19 am

Graphic LCD (ST7565) with Arduino Due

Post by titous »

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

#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 279 times
ST7565.cpp
(11.8 KiB) Downloaded 252 times
ST7565.h
(3.39 KiB) Downloaded 282 times

User avatar
AnneBarela
Learn User Page
 
Posts: 757
Joined: Sat Mar 24, 2012 8:56 pm

Re: Graphic LCD (ST7565) with Arduino Due

Post by AnneBarela »

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.

titous
 
Posts: 62
Joined: Thu Jun 21, 2012 9:19 am

Re: Graphic LCD (ST7565) with Arduino Due

Post by titous »

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

Post by titous »

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....

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”