Welcome! Log In Create A New Profile

Advanced

Use the full graphic controller without a printer

Posted by PickyBiker 
Use the full graphic controller without a printer
June 18, 2016 10:39PM
The Reprapdiscount Full Graphic Smart Controller would be very useful on many projects. Is there a library for using it without a printer?

Edited 1 time(s). Last edit at 06/18/2016 10:39PM by PickyBiker.
Re: Use the full graphic controller without a printer
June 18, 2016 10:52PM
You obviously have never used one...

For installing on in a reprap you need to install the appropriate standard Arduino library u8glib

[code.google.com]
Re: Use the full graphic controller without a printer
June 19, 2016 12:32AM
I don't want it installed in a printer. I want to use it standalone. I installed the u8glib library for arduino. The examples included with that library have 40-50 different constructors for a bunbch of different displays but none of them work with this particular display.

I am trying to see if someone has one working outside the 3d printer environment.
Re: Use the full graphic controller without a printer
June 19, 2016 02:31AM
The graphic controller always requires an external controller. You don't need an Arduino Mega/RAMPS combo for it, maybe an arduino nano will do.
Not sure if an SPI interface is required nor if the Nano has one...

For graphic symbols you'd like to have lots of memory, maybe a SD-card slot is a good way to extend the onchip memory.
Re: Use the full graphic controller without a printer
June 19, 2016 06:52AM
The RRD smart controller uses a ST7920 display in SPI mode, so look for an example using that. The ST7920 has some quirks, the CS line is active high and the SPI bus can not be shared, so you might need to use software SPI.

Otherwise, printer firmware use the standard u8glib software.

Edited 1 time(s). Last edit at 06/19/2016 06:53AM by bobc.


What is Open Source?
What is Open Source Hardware?
Open Source in a nutshell: the Four Freedoms
CC BY-NC is not an Open Source license
Re: Use the full graphic controller without a printer
June 19, 2016 09:46AM
Thanks Bobc for that info.

ST7920 SPI software mode and it has 12864 on it so I would guess that means 128x64. I already have the u8glib installed so that should be enough info to get this working.

Thank you.
Re: Use the full graphic controller without a printer
June 19, 2016 10:02AM
I suggest you look on the Arduino forum for more help.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Use the full graphic controller without a printer
June 19, 2016 11:30AM
I did ask for help on the arduino forum, but nothing yet.

BTW: anyone know what the SPI address of this display is?
Re: Use the full graphic controller without a printer
June 19, 2016 12:51PM
Check this thread for clarity about spi addresses.
Re: Use the full graphic controller without a printer
June 19, 2016 05:00PM
Thanks!
Re: Use the full graphic controller without a printer
June 19, 2016 09:34PM
The schematic for the connector that connects the LCD display to the ramps board is distorted at [reprap.org]

EXP2 and AUX-3 have text that overlaps each other and are unreadable

Can anyone provide a readable schematic or provide the pin descriptions?
Re: Use the full graphic controller without a printer
June 20, 2016 12:15AM
The u8g driver for the display is U8GLIB_ST7920_128X64_1X.

The SPI address is whatever pin you connect the CS line to.

The schematics for the board is a joke. The pins on the connectors are backwards from what is on schematics. As a results, a lot of boards have the connectors put on backwards for what they need to be.

SCK is EXT1 pin 5
MOSI is EXT1 pin 3
CS is EXT1 pin 4

Probably best to find the datasheet for the display itself and trace out the display pin to the EXT1 header pin.
Re: Use the full graphic controller without a printer
June 20, 2016 11:24AM
Thanks for the information on the pin assignments.

I made some progress last night. I installed the Marlin software and the display works. That means all the HW and Connections are okay.

In order to get the display working without the Marlin software, I installed the Hello World example from the u8glib Examples directory. Haven't got that working yet so it it is something in the configuration.

The current constructor is the default U8GLIB_ST7920_128X64_1X which is U8GLIB_ST7920_128X64_1X u8g(18, 16, 17); // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17

Since it isn't working, I suspect the default pin assignments are incorrect for the mega 2560 & RAMPS board with the special adapter.

Trying to work out what that should be now..
Re: Use the full graphic controller without a printer
June 20, 2016 11:29AM
Try building the GrashpicsTest project instead. There is a big list of different displays to try. If you use the software spi version of the driver, the default pin assignments won't matter.
Re: Use the full graphic controller without a printer
June 20, 2016 11:55AM
The list of constructors for different displays is exactly the same in those two examples, and I suspect they would be the same in all the examples. There are 66 of them and my file compare utility says they are identical.

Yesterday, I spent about an hour and a half compiling and uploading each and every one of the 66 available constructors (some of which don't actually compile). I know that was dumb and a brute force way of doing things, but it confirms that something needs to be tweaked to get this to work. The standard constructors just don't cut it.
Re: Use the full graphic controller without a printer
June 20, 2016 12:00PM
I haven't tried in a bit, but I remember the ones in example worked with no changes. I'll take a look again tonight after work.
Re: Use the full graphic controller without a printer
June 20, 2016 12:22PM
Thanks. Please be aware of my configuration:

Arduino Mega 2560
RAMPS 1.4
RepRapDiscount Full Graphic Smart Controller
RAMPS to Display connector (with 2 flat 10-pin ribbon cables)
Win 10 PC
Arduino 1.6.9

Attached is a picture of it working with the Marlin software installed.
Attachments:
open | download - working.jpg (56.7 KB)
Re: Use the full graphic controller without a printer
June 20, 2016 06:30PM
I was able to get the examples running using this constructor....

U8GLIB_ST7920_128X64_1X u8g(23, 17, 16);

EDIT: The 4X version also worked

Edited 1 time(s). Last edit at 06/20/2016 06:32PM by ElmoC.
Re: Use the full graphic controller without a printer
June 20, 2016 08:53PM
That works!

How did you determine the 23, 17, 16 ?
Re: Use the full graphic controller without a printer
June 20, 2016 08:55PM
Went through the Marlin source code. I had worked on a new display and was familiar with how a lot of it was laid out.
Re: Use the full graphic controller without a printer
June 20, 2016 09:01PM
Thank you Elmo C

I am now in business.
Re: Use the full graphic controller without a printer
June 20, 2016 09:09PM
And I just found the issue I was having with an adapter for that display to be used with the Duet controller. smileys with beer
Re: Use the full graphic controller without a printer
June 20, 2016 10:18PM
Cool!
Re: Use the full graphic controller without a printer
November 18, 2018 05:29AM
resurrecting old thread... but someone might be interested

I've written a simple RepRapDiscount Full Graphic Smart Controller tester
It an independent arduino sketch and also shows how you can use each part of the display/buttons/encoder/buzzer/SD card reader

[github.com]
Re: Use the full graphic controller without a printer
November 18, 2018 09:10AM
Nice
Re: Use the full graphic controller without a printer
November 18, 2018 10:39AM
Quote
ElmoC
And I just found the issue I was having with an adapter for that display to be used with the Duet controller. smileys with beer

What was the issue? Are you going to publish details of your adapter?

The way I would make an adapter is to use a 74HCT08 chip to shift the clock, data and CS signals to 5V levels and gate the clock with CS, as we do on the Duet Maestro. It could plug into both the CONN_SD connector and the SPI daughter board connector, which are conveniently close to each other.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Use the full graphic controller without a printer
November 18, 2018 10:43AM
I abandoned this three years ago when no one was showing any interest in it. I don't remember what the issue was. And I was using 7408 for the level shifting.
Re: Use the full graphic controller without a printer
November 18, 2018 10:58AM
I'm sorry, I hadn't noticed that post was 3 years old.

We do get interest in supporting 12864 displays on the main Duet forum occasionally (https://forum.duet3d.com/), and support code in RRF has been written for 12864 displays because of the Maestro. So it might be worth resurrecting this project.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Use the full graphic controller without a printer
November 19, 2018 11:00AM
Cool.

I've actually got a few of the 2004 controllers that I'd like to be able to use with an Arduino for non-printer functions. I was going to pull marlin source code apart to see how it uses it.


MBot3D Printer
MakerBot clone Kit from Amazon
Added heated bed.

Leadscrew self-built printer (in progress)
Duet Wifi, Precision Piezo parts
Sorry, only registered users may post in this forum.

Click here to login