Connect a Character LCD to a Programmable XBee

PrintFriendly and PDF

In this example, we will look at how to use the Programmable XBee module to control a character LCD. This example demonstrates how to create different actions with a character LCD based on the HD44780, KS0066U or equivalent display controller. The purpose of this example is to show how to use the char_lcd driver/API.

To create the Character LCD sample you need to install Codewarrior 10.2 (download from Digi here) and Programmable XBee SDK from (download from Digi here). Once installed, open Codewarrior 10.2, go to File -> New -> Programmable XBee Sample Project, in the new window that will pop up, select the sample “Char LCD Demo,” you will find under “Displays.”

Now, you should build and flash the character LCD demo application into the Programmable XBee. After flashing the demo, check that you have the application header in the serial console. That means that the demo is running!

In next section we will show you how to connect the Programmable XBee and the character LCD.

The Character LCD sample is supported in following kits:
- Programmable XBee-PRO ZB Dev Kit (P/N: XBP24BZ7B-DK)
- Programmable XBee-PRO ZB SMT 32K Dev Kit (P/N: XK2-Z7SB0)
- Programmable XBee 865/868LP Dev Kit (P/N: XK8-DMS-0)


In the config.xml you have the setup of the Programmable XBee module that should be connected to the character display for this example.
Here is a screenshot of the config.xml file for the character LCD sample:

Here is the schematic to connect the Programmable XBee and the character LCD:

Note that the XBee module used is a Programmable XBee module, not the standard XBee module. When you have set up all the hardware, connect the power supply and demo application will perform a sequence of actions in the character LCD:


Programmable XBee SDK offers following API commands for character LCDs:

  1. Character LCD configuration functions:
  • char_lcd_init()
  • char_lcd_cmd_write()
  • char_lcd_on_off()
  • char_lcd_cursor_on_off()
  • char_lcd_cursor_blink_on_off()
  • char_lcd_clear()
  • char_lcd_goto_xy()
  1. Functions to read/write the LCD:
  • char_lcd_putchar()
  • char_lcd_write()
  • char_lcd_read_data_xy()

For more information about the API,  have a look at the help delivered with the Programmable XBee SDK.

Happy prototyping! Questions or comments? Let us know!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>