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
 




Hi!
 
I've decided to consolidate the libraries I've developed for different screens into a single one, the LCD_screen Library Suite.
post-389-14264605286308_thumb.jpg
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:
post-389-14264605286512_thumb.jpg

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.

 

post-389-14264605288977_thumb.jpg

 

I'm using 2 SPI SRAM 25LC1024

 

post-389-14264605289188_thumb.png

 

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×