BeagleBone LCD Cape

Here are some details on the BeagleBone LCD Cape I have been working on. The cape uses an Nokia 5110 LCD display. Along with the display, there are four buttons for general purpose use. The LCD is wired to the BeagleBone SPI interface and the four buttons are connected to the GPIO pins that are typically used for LCD interfacing.

I’ve developed a library of graphics routines to add in the use of the LCD Cape.

Direct to LCD routines:

lcdSetup() - initializes the interface and LCD
lcdGotoXY() - position cursor
lcdInverse() - inverse the LCD
lcdBitmap() - display a bitmap to the LCD
lcdCharacter() - display a character at current cursor position
lcdString() - display a character string at current cursor position
lcdClear() - clear the LCD display and set cursor to 0,0
lcdScrollInit()  -  clears the scroll area and init local vars
lcdScroll()  -  scrolls string one char, repeat call to scroll again
lcdScrollLength() - returns number to scroll string one time off screen
lcdProgressInit()  -  clears the scroll area and initializes local vars
lcdProgressBar()  -  draws a progress bar of value length - value from 0 to 100

Also available are a series of routines that draws in a frame buffer and then sends the frame buffer to the LCD at a later time.

initFB() - initalizes the frame buffer
clearFB() - clears the frame buffer
refreshFB() - refreshes the frame buffer to the LCD
bitmapFB() - sends a bitmap to the frame buffer
storFB() - makes a copy of the frame buffer
restorFB() - restores the frame buffer from the stored copy
DrawPoint() - draws a point (one pixel) 
DrawLine() - draws a line
DrawRectangle() - draws a rectangle
DrawRoundRect() - draws a rectangle with rounded corners
DrawCircle() - draws a circle
DrawCharacter() - draws a character
DrawString() - draws a character string
DrawSmallCharacter() - draws a character using a small font
DrawSmallString() - draws a character string using a small font

The menus that are shown in the pictures and videos use these routines. These routines will pop up a menu, allow for selection of menu items and remove the menu when down. This is all done without destroying the frame buffer or what is displayed on the LCD.

mkMenu() - makes and displays a pop up menu w/o destroying the frame buffer
rmMenu() - removes the menu and restores the LCD with the original frame buffer
selMenu() - highlight a specified menu item

Prototype BeagleBone LCD Cape: pop up menu – first item selected.

Here is a link to a (poorly made) video of the display and menu system running. The menu demo application has five menu items; display beagle, display world map, run LCD test program, set number of LCD test loops (defaults to one), and clear the display. The test loop count uses a picker menu that uses the up/down buttons to pick a value.

Prototype LCD Cape menu system running (.m4v)

More pictures of the display running…

To be completed:

  • Code uploaded to my repository.
  • Cape EEPROM added to prototype.
  • Program EEPROM on prototype.
  • Board layout.
  • Get boards made.