LCD_screen Library Suite

Graphic intensive use of the LCD display with the fast 80 MHz chipKIT board overloads the screen micro-controller.

Especially, sent and received messages overlap and the ACK / NACK protocol is lost :(.

Hence a solution to protect the serial connection from overload and obtain an nicely synchronised conversation.

The library reaches release 8 with overload protection :).

I received a lot of mails and messages about the Serial_LCD library.

Among them, some deal with basics, as connection, hence this post.

Here's the general layout: an Arduino Uno and the µLCD-32PT(SGC) screen.

Follow to step-by-step guidance so it just works!

I think I figured out what may happen to matinzk.

CAUTION The latest NewSoftSerial release 11 is required for the abstraction layer. Although the library is now named SoftwareSerial, rename it to NewSoftSerial.

See NewSoftSerial 11 (beta) | Arduiniana

I placed the code of the library on http://github.com/rei-vilo/Serial_LCD.

The Serial_LCD library release 9 can now address 3 serial port implementations:

  • hardware serial,
  • software serial, with NewSoftSerial release 11
  • I2C serial, through the SC16IS750

The three classes are derived from the Stream class with specific functions overwritten. Code and example are available on GitHub.

But including all those classes on the proxySerial library —and on the main program— is rather inelegant and redundant.

So the idea would be to declare the serial port on the main program only and pass the objet on to the proxySerial.

What to use : Callback? Reference? Functor? Unfortunately, such advanced concepts are out of my reach.

I greatly appreciate your help!

Thank you :slight_smile: .

The new release 11 simplifies the declaration of the serial port.

Now, the serial port, either hardware, software or I2C, is declared only once on the main sketch. There's no need to dig into the libraries.

A new function allows higher speeds than the standard 9600. I tested successfully up to 38400 with the Arduino and up to 115200 with the chipKIT.

Learn more about how graphics fly!

Nice work avenue, I'll get around to using my display one day I'm sure :frowning:


Rob

Great job, well done, i can't wait for more features to come.

I'm also working on something pretty nice for the display, it is hardware related. A box that will have a space for an Arduino Mini Pro, gps sensor, rtc, lipo battery and more...

Here's a very ugly rendering, a simple teaser. It's all aluminum, anodised, CNC made, half inch overall thin only. Built-in Ports are also accessible from the back. SD card has an openning. No screw visible.

You're welcome!

The box is important to keep the LCD safe.

@sync
Can you make the enclosure symmetrical so the display can be used horizontal or vertical?


Rob

No i can't because the SD Card access.

Graynomad:
@sync
Can you make the enclosure symmetrical so the display can be used horizontal or vertical?


Rob

Yes I see, what about making it smaller on that axis so the two "sides" are the same width.

Mini Pro, gps sensor, rtc, lipo battery and more

Specific mounting holes for these items or generic?


Rob

The display viewing Area is not centered on that axis.
Keep in mind that the overall size is 2.75 in (70mm) by 3.15 in (80mm)

Space inside is very limited, i'm not sure yet about these mounting holes.

Graynomad:
Yes I see, what about making it smaller on that axis so the two "sides" are the same width.

Mini Pro, gps sensor, rtc, lipo battery and more

Specific mounting holes for these items or generic?


Rob

The display viewing Area is not centered on that axis.

Yep, I forgot about the icon strip down one side.

i'm not sure yet about these mounting holes.

Personally I'd make a custom board to fit if such a neat-looking enclosure was available, so just a few generic mounts would be OK for that. In fact unless you stipulate the exact model of GPS, RTC etc (which would be very limiting) I think generic is what you have to do.

Have you approached 4DS about sponsoring this? I know they are inclined to get involved if they like a project.


Rob

Thanks to the work of the chipKIT / MPIDE team, the hardware serial class for the chipKIT platform is derived now from the Stream class as NewSoftSerial and i2cSerial are.

More important for LCD_Serial, the new release 13 offers multiple options: hardware, software and I2C serial ports can be used to drive the screen.

Learn more about the multiple serial options with examples!

This new release 14 brings some novelties:

  • proxySerial library is now a stand-alone library.
  • It can now be used by other libraries, as Serial_GPS.
  • It includes utilities like ftoa

Let's have some fun! I ported this game of life and it runs pretty fast on the chipKIT.
Integers only, pixels updated if changed, fast serial at 115200.

More details on my website.

Enjoy!

Please find a tutorial for the Serial_LCD library:

• Tutorial part 1 — Back to Basics

• Tutorial part 2 — Playing with Serial Ports

Enjoy :slight_smile:

The first link appears to be broken.


Rob

Graynomad:
The first link appears to be broken.

Thank you for notifying me. It's fixed now:

• Tutorial part 1 — Back to Basics

The new Serial_LCD release 15 brings faster dialog box — twice as fast as previously — and the long awaited-for readPixel function to get the colour of one pixel.

***
Serial uLCD-32PT 1 10 19 32 24 

FULL screen 
 saveScreenSD  2679 ms
 readScreenSD  623

AREA screen 
 saveScreenSD  1449
 readScreenSD  343

As always, more details on my website.