<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>HiPi::Interface::SerLCD</title></head>
<BODY TOPMARGIN=4 BGCOLOR=#FFFFFF TEXT=#000000 VLINK=#0000CC LINK=#0000CC ALINK=#0000CC>
<FONT FACE="Arial, Lucida, Helvetica" >
<TABLE WIDTH="100%" ALIGN=CENTER CELLPADDING=1 CELLSPACING=0>
<TR>
<TD WIDTH="100%" ALIGN=CENTER>
<A HREF="contents.htm"><img align=center src="home.png" BORDER=0 ALT="Contents"></A>
<A HREF="mod_interface.htm"><img align=center src="up.png" BORDER=0 ALT="Up"></A>
<A HREF="mod_interface_mcp49xx.htm"><img align=center src="back.png" BORDER=0 ALT="Previous"></A>
<A HREF="mod_interface_mpl3115a2.htm"><img align=center src="forward.png" BORDER=0 ALT="Next"></A>
</TD>
</TR>
<TR>
<TD COLSPAN=2 HEIGHT=2 BGCOLOR="#C0C0C0">
</TD>
</TR>
</TABLE>
<H2>HiPi::Interface::SerLCD</H2><p>HiPi::Interface::SerLCD provides an implementation of <A HREF="mod_interface_hd44780.htm">HiPi::Interface::HD44780</A> for LCD devices using the Sparkfun SerLCD controller.</p>
<p>The module inherits many of its methods from <A HREF="mod_interface_hd44780.htm">HiPi::Interface::HD44780</A>.</p>
<h2>Object Constructor and Methods </h2>
<pre>
The module can accept one of the following literal values
when using the inherited 'update_baudrate' method.
2400, 4800, 9600, 14400, 19200, 38400
The following are the methods specific to this implementation.
See <A HREF="mod_interface_hd44780.htm">HiPi::Interface::HD44780</A> for inherited methods.
</pre>
<h5>my $lcd = HiPi::Interface::SerLCD->new( %params );</h5>
<pre> %params contains a number of key value pairs
Required key value pairs
width => $width
lines => $lines
You must specify the geometry of your LCD
e.g.
my $lcd = HiPi::Interface::SerLCD->new(
width => 16,
lines => 4,
);
Optional params and their defaults
backlightcontrol => 0
specify if methods setting the level of backlight can be used.
The method $lcd->backlight will only work if you set
backlightcontrol => 1 in the constructor.
devicename => '/dev/ttyAMA0'
baudrate => 9600
parity => 'none',
stopbits => 1,
databits => 8,
If you are using a Pi 3 with default settings, the header pins
on the Rpi gpio are connected to the mini uart. You will therefore need
to specify the device to override the default.
my $dev = HiPi::Interface::SerLCD->new(
devicename => '/dev/ttyS0',
);
Example complete constructor call:
my $lcd = HiPi::Interface::SerLCD->new(
width => 16,
lines => 4,
backlightcontrol => 1,
devicename => '/dev/ttyS0',
);</pre>
<h5>$lcd->toggle_splashscreen();</h5>
<pre> Toggles splash screen display on / off</pre>
<h5>$lcd->set_splashscreen();</h5>
<pre> Sets the current top 2 lines of text as the splash screen.</pre>
<h5>$lcd->init_lcd();</h5>
<pre> If the SerLCD gets into an unknown state, call
this to reset the LCD to default settings.
</pre>
</FONT>
<br>
<p>
<br>
<hr>
<br>
<center>
<A HREF="contents.htm"><img align=center src="home.png" BORDER=0 ALT="Contents"></A>
<A HREF="mod_interface.htm"><img align=center src="up.png" BORDER=0 ALT="Up"></A>
<A HREF="mod_interface_mcp49xx.htm"><img align=center src="back.png" BORDER=0 ALT="Previous"></A>
<A HREF="mod_interface_mpl3115a2.htm"><img align=center src="forward.png" BORDER=0 ALT="Next"></A>
</center>
<HR>
<br>
<center><FONT FACE="Arial, Lucida, Helvetica" size="2" color="#000080">HiPi Modules Copyright © 2013 - 2016 Mark Dootson</font></center>
</BODY></HTML>