Jump to content
Rei Vilo

[Energia Library] LCD_screen Library Suite

Recommended Posts

As of October 2015 and due to intellectual property issues and licence infringements with users, the LCD_screen Library Suite is no longer available for download.
A special edition of the library is included in Energia for the Educational BoosterPack MKII and the Kentec 3.5" screenand comes as an external library for the Pervasive Displays e-paper screens, to be installed with the Libraries Manager

I've decided to consolidate the libraries I've developed for different screens into a single one, the LCD_screen Library Suite.
Download with examples and documentation is available here. The library runs on the LaunchPads MSP430 and Stellaris with Energia 0009. 
As at today, the following screens are supported:

I also leverage the high-level libraries I wrote for the 4D Systems screens, for example this clock that literally requires two lines of code:

myClock.define(&myScreen, 160, 120, 60);
myClock.draw(hour, minute, second, "Message");

Enjoy icon_e_smile.gif

Share this post

Link to post
Share on other sites

Release 105 is available with all the graphics from the previous Serial_LCD Library Suite: clock, yaw, pitch, roll, gauge, histogram, table.


Basic functions as drawing lines, rectangles, circles and displaying text fit into the MSP430G2553 memory, both flash and SRAM. However, advanced graphics require more space and thus the Stellaris LM4F.


On the next iteration, I plan to explore and add the SRAM support for the GUI environment and explore the fonts on EEPROM.


Enjoy icon_e_smile.gif

Share this post

Link to post
Share on other sites

Two news about the LCD_screen library suite:

  • Using SPI SRAM was more difficult than expected.

The fast RAM allows to save the initial screen before a dialog box or a menu is displayed in order to restore it after. A basic 320x240x16-bit screen requires 153,600 bytes or 150 KB.


Using the 23LC1024 is rather difficult on a breadboard and prone to interferences. Only slow SPI speed works, even with decoupling capacitors and pull-up resistors. I haven't experienced such problems with the 23K640.


So I'm considering using a SD-card instead. The main benefit of a SD-card is the flexibility, as it allows larger space at the expense of being slower than SRAM.

  • I've started exploring the Kentec 3.5" BoosterPack for the LaunchPad Stellaris. 

This is a very nice screen. I'm learning how to deal with an 8-bit parallel port on Energia and I'm digging into the LCD controller specification sheet...


I only need to fix the hardware interface. All the graphic and text routines are ready as they are shared with the other screens. 


Stay tuned!

Share this post

Link to post
Share on other sites

Great news!


SPI SRAM works now and allows fast copying and pasting of screen areas.




I'm using 2 SPI SRAM 25LC1024




Although fast, speed isn't fast enough for a comfortable GUI. 


Learn more and download from Fast SRAM Support for the HY28A screen on a Stellaris LaunchPad.


Coming next:

  • GUI integration,
  • support for the Kentec 3.5" screen.

Share this post

Link to post
Share on other sites

Good news! The LCD_GUI library is available and brings the usual elements of a graphic interface as: label, button, dialog box, menu, slider and text box.


post-389-14264605292108_thumb.jpg post-389-14264605292223_thumb.jpg post-389-14264605292334_thumb.jpg post-389-14264605292449_thumb.jpg


The project is based on a LaunchPad Stellaris, a HY28A touch screen and 2x 1Mb of SRAM, and should cost less than USD35. The SRAM is used as a fast cache for the screen.


Learn more about the project and the LCD_GUI library  :) 


Share this post

Link to post
Share on other sites

@@Rei Vilo - you are planning an alternate mode SDcard instead of SRAM?


Give me some time to get some rest!


IMHO, implementing SD-card instead of SRAM shouldn't be difficult. You need to change 2 functions:

void LCD_HY28A_SRAM::_fastCopyAreaToSRAM(uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint32_t &address)

void LCD_HY28A_SRAM::_fastPasteAreaFromSRAM(uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint32_t &address, bool option)

Address would be used for the name of the file. Now, don't expect fast read-write on SD-card.

Share this post

Link to post
Share on other sites

@@abecedarian, yes :)


Ideally a in-between BoosterPack with room for

  • 2x 1Mb fast SRAM for caching 
  • enough EEPROM for fonts
  • SD-card or uSD-card slot

All this on one single hardware SPI bus with 3 CS, and ideally with jumpers to select the SPI bus among the 4 of the Launchpad Stellaris...


Well, back to the 8-bit parallel Kentec 3.5" screen...

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...