Sunday, October 14, 2012

Connect a Character LCD to a Programmable XBee

Programmable XBee SDK delivered by Digi International is plenty of samples to show the power of the API developed for the Programmable XBee S2B and S2C modules from Digi International.

One of the sample delivered shows how to use Programmable XBee module to control a character LCD.
The CharLCD example delivered with the Programmable XBee SDK performs different actions in 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 (You can download from Digi site Link.) and Programmable XBee SDK from Digi (you can download from Digi site: Link ).
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 it under "Displays" item.

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

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

Hardware connection:

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



Here you have 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

Character LCD connected to the Programmable XBee S2B.

Character LCD API:

Programmable XBee SDK offers following API for related with a character LCD:

  • 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() 
  • Functions to read/write the LCD: 
    • char_lcd_putchar() 
    • char_lcd_write() 
    • char_lcd_read_data_xy() 


For more information about the API you should have a look into the help delived with the Programmable XBee SDK.

Best regards,

No comments:

Post a Comment