PLEASE NOTE: This article is obsolete or related to a discontinued product.

LCD display

In this article we will show how to interface the FOX Board to different models of alphanumeric LCD display. As an example we will describe an application to see in real time world news from the CNN site as an RSS reader

Display with Hitachi HD44780 interface

The display used in this example is a 20x2 characters from Delta Optoelectronics. It smarts high contrast and brightness and a large visibility angle. The protocol used is the standard Hitachi HD44780 with 4 bits of data interface. It can be used for a large number of different LCD display sizes. In the following figure it is shown the interconnection schematic between the FOX Board and the LCD display.


Interconnection between the FOX Board and a LCD with Hitachi HD44780 interface

To interface and write the LCD display we built a small library of functions, available in this file:

rssreader.c

and containing the basic display functions as:

  • lcd_init() To initialize the display hardware
  • lcd_putc() To send a character to the display
  • lcd_locate() To change the cursor position
  • lcd_clear() To empty the display character buffer
  • lcd_printf() To display formatted data like the language 'C' printf() function

In the following code fragment you can see an example of use of these functions to generate the classical message "Hello world !" on the display.

  fd = open("/dev/gpiog", O_RDWR);
  lcd_init(fd);
  lcd_printf(fd,"Hello world !");
  close(fd);

The instructions open() and close() are used to access the I/O lines to drive the display.

Application example: A news reader in RSS format

Inside the source file rssreader.c, there is a simple application example: a news reader in RSS format. You can compile this example on-line with our WebCompiler.


Our RSS reader in action on the ANSA server (an italian news agency)

The RSS format (acronim of Really Simple Syndication) is very common in Internet to offer a service of news spreading in a format very easy to understand and parse. Some sites that offer this service are:

The format is obviously based on the XML protocol and it contains several tags with data as title, short description, date and time, source of origin of the news etc. To get an idea on what can contain an RSS file click this: http://rss.cnn.com/rss/cnn_world.rss.

Our application example downloads from Internet, through a wget system call, the RSS file that contains the news we are interested in. It then extracts every title news that is located between the title tags and shows it on the second line of the LCD display. In this way we can have the fresh news of the day without even switching on the PC.

Links

Everbouquet LCD Display with synchronous serial interface


The MS-10-2004F Everbouquet display connected to the FOX Board

  • everbouquet.c Library for the Everbouquet display and example
  • Links