Difference between revisions of "Unit HD44780"
Line 63: | Line 63: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleOpen(Console:PConsoleDevice):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleOpen(Console:PConsoleDevice):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceOpen API for HD44780</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | Not intended to be called directly by applications, use ConsoleDeviceOpen instead |
|- | |- | ||
|} | |} | ||
Line 75: | Line 75: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleClose(Console:PConsoleDevice):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleClose(Console:PConsoleDevice):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceClose API for HD44780</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | Not intended to be called directly by applications, use ConsoleDeviceClose instead |
|- | |- | ||
|} | |} | ||
Line 87: | Line 87: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleClear(Console:PConsoleDevice; Color:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleClear(Console:PConsoleDevice; Color:LongWord):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceClear API for HD44780</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | Not intended to be called directly by applications, use ConsoleDeviceClear instead |
|- | |- | ||
|} | |} | ||
Line 99: | Line 99: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceScroll API for HD44780</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | Not intended to be called directly by applications, use ConsoleDeviceScroll instead |
|- | |- | ||
|} | |} | ||
Line 111: | Line 111: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleDrawChar(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleDrawChar(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawChar API for HD44780</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | Not intended to be called directly by applications, use ConsoleDeviceDrawChar instead |
|- | |- | ||
|} | |} | ||
Line 123: | Line 123: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawText API for HD44780</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | Not intended to be called directly by applications, use ConsoleDeviceDrawText instead |
|- | |- | ||
|} | |} | ||
Line 135: | Line 135: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawBlock API for HD44780</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | Not intended to be called directly by applications, use ConsoleDeviceDrawBlock instead |
|- | |- | ||
|} | |} | ||
Line 147: | Line 147: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceDrawWindow API for HD44780</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
Line 153: | Line 153: | ||
! '''Note''' | ! '''Note''' | ||
| Caller must hold the Window lock | | Caller must hold the Window lock | ||
+ | Not intended to be called directly by applications, use ConsoleDeviceDrawWindow instead | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function HD44780ConsolePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDevicePutText API for HD44780</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | Not intended to be called directly by applications, use ConsoleDevicePutText instead | ||
|- | |- | ||
|} | |} | ||
Line 159: | Line 172: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function HD44780ConsoleGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of ConsoleDeviceGetPosition API for HD44780</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! '''Note''' | ! '''Note''' | ||
− | | | + | | Not intended to be called directly by applications, use ConsoleDeviceGetPosition instead |
|- | |- | ||
|} | |} |
Revision as of 06:15, 21 November 2016
Return to Unit Reference
Description
The Hitachi HD44780 is a dot matrix liquid crystal display controller. It supports 5x8 or 5x10 characters and includes a 240 character font in ROM, 80 bytes of character RAM and 64 bytes of character generator RAM for custom characters.
The device support 4 bit or 8 bit modes, and has a range of standard functions for display clear, display on/off, cursor on/off, character blink, cursor shift etc.
This unit creates a Console device to represent the LCD and provides the standard console device functions (where appropriate) to draw text, clear the screen, scroll text and manage the cursor.
Currently only 4 bit mode is supported but extension to include 8 bit mode is possible with some additional setup and support functions.
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
HD44780 functions
function HD44780ConsoleCreate(GPIO:PGPIODevice; const Name:String; Width,Height,RS,RW,EN,D4,D5,D6,D7:LongWord):PConsoleDevice;
Note | None documented |
---|
function HD44780ConsoleDestroy(Console:PConsoleDevice):LongWord;
Note | None documented |
---|
HD44780 console functions
function HD44780ConsoleOpen(Console:PConsoleDevice):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceOpen instead |
---|
function HD44780ConsoleClose(Console:PConsoleDevice):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceClose instead |
---|
function HD44780ConsoleClear(Console:PConsoleDevice; Color:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceClear instead |
---|
function HD44780ConsoleScroll(Console:PConsoleDevice; X1,Y1,X2,Y2,Count,Direction:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceScroll instead |
---|
function HD44780ConsoleDrawChar(Console:PConsoleDevice; Handle:TFontHandle; Ch:Char; X,Y,Forecolor,Backcolor:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceDrawChar instead |
---|
function HD44780ConsoleDrawText(Console:PConsoleDevice; Handle:TFontHandle; const Text:String; X,Y,Forecolor,Backcolor,Len:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceDrawText instead |
---|
function HD44780ConsoleDrawBlock(Console:PConsoleDevice; X1,Y1,X2,Y2,Color:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceDrawBlock instead |
---|
function HD44780ConsoleDrawWindow(Console:PConsoleDevice; Handle:TWindowHandle):LongWord;
Note | Caller must hold the Window lock
Not intended to be called directly by applications, use ConsoleDeviceDrawWindow instead |
---|
function HD44780ConsolePutText(Console:PConsoleDevice; Handle:TFontHandle; const Source,Dest:TConsolePoint; Buffer:PConsoleChar; Width,Height,Skip:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDevicePutText instead |
---|
function HD44780ConsoleGetPosition(Console:PConsoleDevice; Position:LongWord; var X1,Y1,X2,Y2:LongWord):LongWord;
Note | Not intended to be called directly by applications, use ConsoleDeviceGetPosition instead |
---|
HD44780 helper functions
function HD44780WriteChar(Console:PHD44780Console; Ch:Char):LongWord;
Note | Caller must hold the Console lock |
---|
function HD44780WriteData(Console:PHD44780Console; Value:Byte):LongWord;
Note | Caller must hold the Console lock |
---|
function HD44780PulseEnable(Console:PHD44780Console):LongWord;
Note | Caller must hold the Console lock |
---|
function HD44780CursorHome(Console:PHD44780Console):LongWord;
Note | Caller must hold the Console lock |
---|
function HD44780CursorBlink(Console:PHD44780Console; Blink:Boolean):LongWord;
Note | Caller must hold the Console lock |
---|
function HD44780CursorVisible(Console:PHD44780Console; Visible:Boolean):LongWord;
Note | Caller must hold the Console lock |
---|
function HD44780CursorPosition(Console:PHD44780Console; Row,Col:Byte):LongWord;
Note | Caller must hold the Console lock |
---|
function HD44780DisplayEnabled(Console:PHD44780Console; Enabled:Boolean):LongWord;
Note | Caller must hold the Console lock |
---|
function HD44780AddCharacter(Console:PHD44780Console; Location:Byte; Character:THD44780Character):LongWord;
Note | Caller must hold the Console lock |
---|
Return to Unit Reference