Go Down

Topic: LCD_screen Library Suite (Read 69546 times) previous topic - next topic


Thanks for the accolade!

Yes, size may be an issue. For that reason, I keep a modular approach.
  • proxySerial and Serial_LCD are required, whatever the final application.

  • Graphics, Gallery and GUI are optional.

Correct me if I'm wrong, but unused functions aren't included in the final built hex file.
Code: (makefile) [Select]
-ffunction-sections -fdata-sections

I experienced memory limitations with my Arduino Uno so I bought a mega2560.


unused functions aren't included in the final built hex file.

As far as I know, certainly in "normal" tool chains unused stuff is not linked in, but then last time I looked Arduino compiled everything regardless of whether a file had been touched or not. That's not normal so maybe the linking procedure is not as well.

Also I don't know what the granularity is, eg if you use a single function from a module do you get the entire module or just that function.

It would be easy to test but someone here probably knows off the top of their head.

Rob Gray aka the GRAYnomad www.robgray.com


Apr 01, 2012, 11:51 am Last Edit: Apr 01, 2012, 11:55 am by avenue33 Reason: 1
Except for proxySerial and Serial_LCD which contain each one big class, the granularity for high level libraries is at item level.

Gallery: class Gallery
Graphics: classes gClock, gYaw, gPitch, gRoll, gHistogram, gGauge
GUI: class button and functions dialog, menu, label

Maybe using classes / objects isn't the most efficient way from a size point of view, but it provides clean and robust code.

Truth is, I've already a taste of the Arduino Due with the PIC32-based chipKIT UNO32, 32-bits 80 Mhz 128 kB.

Arduino UNO left, and chipKIT UNO32 right.


Please find the FAQ with answers to the often raised question I receive about 4D Systems screens and the Serial_LCD library suite.

• After resetting a sketch, the screen doesn't respond.
• Which micro-SD to use?
• My screen doesn't light up.
• My screen doesn't play sound.
• My screen doesn't respond when I use faster serial speeds.
• My screen hangs when I use touch.

Read the FAQ!


Oh dear! I've just reinstalled my PC and I come to download this great library again and find the site is down sadly so we have no current way to get it :(

Mr Avenue33 do you know that your site and it's great contents are down currently?


Apr 11, 2012, 02:18 pm Last Edit: Apr 11, 2012, 02:28 pm by avenue33 Reason: 1
I decided to go away from Google, which is concentrating too much power over single hobbyists like me. So I closed the accounts for all the products I had.

The new website is embeddedcomputing.weebly.com/
Dedicated Serial_LCD section is at embeddedcomputing.weebly.com/serial-lcd.html
Code is back on GitHub at github.com/rei-vilo/Serial_LCD
My Twitter is twitter.com/rei_vilo

See you there!


Thanks for the prompt reply! And thanks for eveything you have done so far to this great library!


Hmmm problems problems.

Im using an Arduino Mega ADK, with Ardiuno IDE 1.0

The display is connected to the ground, and 5v connections. TX and RX are connected to pins 18 and 19 of the Arduino. They are labled TX1 and RX1. Im assuming perhaps incorrectly that this means they are serial port 1?

Im running Serial_LCD_main and have made sure that the three references to point to serial1 (although I dont believe the 1st reference is used in this case).

Nothing is altering on the display at all.

Any ideas please?

(The COM3 serial monitor on the PC shows *** and on a newline the word hardware).


Which version of the screen are you using: SGC or GFX?

My library only applies for SGC.

Connect the RESET pin of the screen to a digital pin of the Arduino.

Check RX and TX are correctly connected:

Arduino RX <- screen TX
Arduino TX -> screen RX

Try this example with Serial3 (pins 14 & 15) and pin 4:

Code: [Select]
#include "Arduino.h"
#include "Wire.h"
#include "Serial_LCD.h"
#include "proxySerial.h"

// --- Arduino mega2560 - hardware serial
ProxySerial myPort(&Serial3);
Serial_LCD myLCD(&myPort);

void setup() {

  myLCD.gText(25, 25, "String", whiteColour);


void loop() {


I think the screen I have is configured in GFX mode.

I'm looking as you read this to find out how to tell for certain, and whether I can make the cable to allow me to reprogram it.


I can't find an easy way to tell anywhere on the net.

With my uLCD-32PT when it is powered up it displays a light blue and yellow keypad - I suspect this means it's programmed for the wrong mode.

Looking at the cable, it includes an IC so if necessary I'll order the cable instead. Just need to be sure.


Yes, you need the programming cable from 4D Systems and upload the SGC firmware.

Warranty Note: PmmC or 4DGL programming should only be carried out using any one of the 4D Programming modules (4D Programming Cable, uUSB-MB5, uUSB-CE5). Any malfunction because of custom or third party USB to Serial converters or Serial(RS232) to Serial(TTL) level converters will void the warranty.


Thanks for the responses.

Ordered the cable immediately. Hoping it will arrive tomorrow!

I can't wait to play more!


Connector device recieved. Display reprogrammed for SGC mode.

Your code now works fine! Thank you very much for your help.

Go Up