Subtotal: 0
View Cart

603-00006.gifBS2p Command for LCD Control Provides Flexibility

Appeared in the 2003 Product Catalog.

Displaying Custom Digits on a Hitachi-44780 Compatible 2x16 LCD

Regular old parallel LCDs are easy to use with the new BS2p because they’re inexpensive, easy to connect and use simple LCDOUT commands to display characters. Displaying built-in 5x7 characters is easy, but what if you want to show custom characters, like these circa 80’s-style bitmap computer characters?

Creating them on paper and adding them to your PBASIC program is cumbersome at best, but now we’ve created the handy LCD Character Creator which allows you to click pixels and create the DATA statement which can be copied right into your BASIC Stamp® code!

lcd_01.gifFor this project you need the following parts:
  • BS2p24 Module (#BS2p24)
  • 2x16 Hitachi-compatible LCD with cable (#603-00006)
  • BS2p24 Demo Board (#45183)
  • LCD Character Creator Program (free download)
lcd_02.gifThe process for creating and storing custom characters with your BASIC Stamp module requires these four steps:

1. Download and run the LCD Character Creator program from www.parallax.com.
2. Open a sample character file or create your own by clicking the pixels you’d like to use.
3. Copy and paste the DATA statement into the sample PBASIC programs in the LCD Character Creator’s Help file.
4. Hookup an HD44780-compatible display as shown to the right.

lcd_03.gifOnce the LCD has been initialized, a one-line command like this could create the computer-style number “8”. The constants LCDpin and CGRam would have been defined at the top of the program.

Dload_Custom_Char:
LCDOUT LCDpin, CGRam, [$0E, $0A, #0A, $1F, $13, $13, $1F, $00]

It’s quite easy to create the 0-9 computer-style characters and load them into CGRAM. Use them as standard operating characters as part of your projects requiring LCDs. Rather than defining the character in the LCDOUT command, use the DATA statement and define them only once. Need help? See the Custom LCD Character Creator help file.

Home    |    Contact Us    |    Job Opportunities    |    About Parallax    |    Privacy Statement    |    Terms Of Use    |    Copyright 2007 by Parallax, Inc.