@ KDEV 2007 Some Rights Reserved
LCD HITACHI HD44780 control extension for PHP

LCD
is a PHP extension that provide you the commands to control HITACHI HD44780 display from your PHP script.
TRY IT LIVE! DEMO AVAILABLE!

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


The illustration is provided by:
http://www.acmesystems.it/?id=8021#delta

Command Description
lcd_init() Initialize the display hardware
lcd_init() prepare the display to accept commands


example:

<?
echo lcd_init();
?>
print on the sceen: 1

1 operation succeessfully executed
NULL an error occured and it is displayed in PHP WARNING message
lcd_locate("row:column") change the cursor position
lcd_locate("row:column") move the cursor to the specified row and column.

example:

<?
echo lcd_locate("0:3");
?>
print on the sceen: 1 and move the cursor to the first row and column 3.

1 operation succeessfully executed
NULL an error occured and it is displayed in PHP WARNING message
lcd_clear() empty the display character buffer
lcd_clear() empty the display character buffer


example:

<?
echo lcd_clear();
?>
print on the sceen: 1

1 operation succeessfully executed
NULL an error occured and it is displayed in PHP WARNING message
lcd_printf("string") To display data on display lcd_printf("string") print the provided string on the display


example:

<?
echo lcd_printf("hello fox!");
?>

print on the sceen: 1 and "helloo fox!" appear on the display

1 operation succeessfully executed
NULL an error occured and it is displayed in PHP WARNING message


EXAMPLE

This example is a form with 3 fields, the text, the row and the column. Populating fields and pushing submit the text is displayed on specified position.

<?
$dsp=$_REQUEST['dsp'];
$ctl_display=lcd_init();
if ($ctl_display=="1")
   {
     lcd_clear();
   }
   else
   {
      echo "You have not a display connected to the fox!";
    }
    if ($dsp=="ok")
    {
       $text=$_REQUEST['text'];
       $row=$_REQUEST['row'];
       $col=$_REQUEST['col'];
       $position=$row.":".$col;
       lcd_locate($position);
       lcd_printf($text);
    }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
   <head>
       <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
       <title>LCD Hitachi HD4478</title>
   </head>
   <body bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
      <form action="<? echo $PHP_SELF; ?>" method="get" name="lcd">
         <table border="1" cellspacing="2" cellpadding="0">
           <tr>
              <td><b>LCD Hitachi HD4478 - PHP extension sample</b></td>
              <td></td>
           </tr>
           <tr>
              <td>Text to display</td>
              <td><input type="text" name="text" size="24" border="0"></td>
           </tr>
           <tr>
              <td>Choose row </td>
              <td><input type="text" name="row" value="0" border="0"></td>
          </tr>
          <tr>
             <td>Choose column</td>
             <td><input type="text" name="col" value="0" border="0"></td>
          </tr>
          <tr>
             <td></td>
             <td>
                    <input type="submit" name="display" value="display" border="0">
                    <input type="hidden" name="dsp" value="ok" border="0">
             </td>
           </tr>
        </table>
     </form>
   </body>
</html>
Configuration files PATH
LCD
configuration: /etc/php.ini


LOOK also GPIO I/O control extension for PHP
LOOK also I2C A/D converter PC8591 control extension for PHP

For more info go to ACME SYSTEMS WEBSITE LCD display



SMS MMS FoxBox the appliance based on foxserve for messaging management








foXServe is Developed by KDEV a Davide Cantaluppi company and running on ACME SYSTEMS srl Hardware.

@ KDEV 2007 Some Rights Reserved
foXServe firmware is free
foXServe firmware
Download it now!


LICENSES

Apache/1.3.37 Server

Copyright 2007 Kdev of Davide Cantaluppi Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

PHP 5.0.5
"This product includes PHP software, freely available from <http://www.php.net/software/>"

MOD_DAV
This product includes software developed by Greg Stein <gstein@lyra.org> for use in the mod_dav module for Apache (http://www.webdav.org/mod_dav/).