Basic Micro Studio Syntax Manual
Basic Micro Studio Syntax Manual
Basic Micro Studio Syntax Manual
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
LCDINIT<br />
<strong>Syntax</strong><br />
lcdinit RS\ E\ D7\ D6\ D5\ D4 {,RW}<br />
Commands<br />
• RS - is any expression, constant or variable that specifi es the I/O pin connected to the LCD’s<br />
R/S pin.<br />
• E - is any expression, constant or variable that specifi es an I/O pin connected to the LCD’s<br />
enable pin.<br />
• D7 - is any expression, constant or variable that specifi es an I/O pin connected to the LCD’s<br />
data bit 7 pin.<br />
• D6 - is any expression, constant or variable that specifi es an I/O pin connected to the LCD’s<br />
data bit 6 pin.<br />
• D5 - is any expression, constant or variable that specifi es an I/O pin connected to the LCD’s<br />
data bit 5 pin.<br />
• D4 - is any expression, constant or variable that specifi es an I/O pin connected to the LCD’s<br />
data bit 4 pin.<br />
• RW - is any expression, constant or variable that specifi es an I/O pin connected to the LCD’s<br />
read or write enable pin.<br />
Supported<br />
• BA - Supported<br />
• BAN - Supported<br />
• BAP - Supported<br />
• BAP40 - Supported<br />
Description<br />
There are 3 LCD commands available in M<strong>Basic</strong> and are used to interface to a Hitachi HD44780<br />
controller based LCD. This is probably one of the most common LCDs available. 1x16 all the way<br />
up to 4x40 size screens are supported. The HD44780 controller does require special initialization<br />
commands so the LCDINIT command was added to handle this automatically. The LCDINIT<br />
command is only needed once in a program, typically to the beginning of a program. The LCD does<br />
require some time to power up before running the LCDINIT command. A short pause placed before<br />
the LCDINIT command will handle any power up issues. Otherwise the LCDINIT command can be<br />
run later in a program to provide the same power up time.<br />
136