Fork of LCD-Window which works with Enhanced TextLCD from Wim

Fork of LcdWindow by Hendrik Lipka

Embed: (wiki syntax)

« Back to documentation index

HD44780LCD8bit Class Reference

HD44780LCD8bit Class Reference

class for connecting HD44780-based LCD-Display (or using similiar controllers) displays are connected in 8bit-mode currently only 1 or 2 lines are supported More...

#include <hd44780_8bit.h>

Inherits TextLCDBase.

Public Member Functions

 HD44780LCD8bit (unsigned int columns, unsigned int rows, BusOut *data, PinName enable, PinName rs)
virtual void init ()
 this is the only function added to the Window interface it must be called from the outside, and initializes the display.
virtual void writeText (const unsigned int column, const unsigned int row, const char text[])
 write text into the window, at the given position.
virtual void clear ()
 clears the window
virtual void character (int column, int row, int c)
 writes a character to the specified position must be public because it is used during delegation
virtual int getRows ()
virtual int getColumns ()
virtual void locate (int column, int row)
 set (internal) cursor to a screen column and row
int putc (int c)
 Write a character to the LCD, on the position specified by the cursor sets the cursor to the next position, and wraps (from right to left, next line, and from bottom back to top)
int printf (const char *format,...)
 Write a formated string to the LCD, on the position specified by the cursor does wrap around (as specified by putc)

Detailed Description

class for connecting HD44780-based LCD-Display (or using similiar controllers) displays are connected in 8bit-mode currently only 1 or 2 lines are supported

Definition at line 39 of file hd44780_8bit.h.


Constructor & Destructor Documentation

HD44780LCD8bit ( unsigned int  columns,
unsigned int  rows,
BusOut *  data,
PinName  enable,
PinName  rs 
)
Parameters:
widthnumber of chars per line
heightnumber of lines (currently only 1 and 2 work)
datathe bus object used for sending data (must be 8bit)
enablethe pin name for the enable line (1=active)
rsthe pin name for the register select line (0=cmd, 1=data)

Definition at line 80 of file hd44780_8bit.cpp.


Member Function Documentation

void character ( int  column,
int  row,
int  c 
) [virtual]

writes a character to the specified position must be public because it is used during delegation

Parameters:
columnThe horizontal position from the left, indexed from 0
rowThe vertical position from the top, indexed from 0
cthe character

Implements Window.

Definition at line 30 of file hd44780_8bit.cpp.

void clear (  ) [virtual]

clears the window

Implements Window.

Definition at line 60 of file hd44780_8bit.cpp.

virtual int getColumns (  ) [virtual, inherited]
Parameters:
returnsthe width of the window

Implements Window.

Definition at line 41 of file lcd.h.

virtual int getRows (  ) [virtual, inherited]
Parameters:
returnsthe height of the window

Implements Window.

Definition at line 40 of file lcd.h.

void init (  ) [virtual]

this is the only function added to the Window interface it must be called from the outside, and initializes the display.

Implements TextLCDBase.

Definition at line 90 of file hd44780_8bit.cpp.

void locate ( int  column,
int  row 
) [virtual, inherited]

set (internal) cursor to a screen column and row

Parameters:
columnThe horizontal position from the left, indexed from 0
rowThe vertical position from the top, indexed from 0

Definition at line 26 of file window.cpp.

int printf ( const char *  format,
  ... 
) [inherited]

Write a formated string to the LCD, on the position specified by the cursor does wrap around (as specified by putc)

Parameters:
formatA printf-style format string, followed by the variables to use in formating the string.

Reimplemented in TextLCDAdapter.

int putc ( int  c ) [inherited]

Write a character to the LCD, on the position specified by the cursor sets the cursor to the next position, and wraps (from right to left, next line, and from bottom back to top)

Parameters:
cThe character to write to the display

Reimplemented in TextLCDAdapter.

void writeText ( const unsigned int  column,
const unsigned int  row,
const char  text[] 
) [virtual]

write text into the window, at the given position.

this doesn't change the internal cursor position Implementations should check for the length of the text and shorten it accordingly. columns the column where to write row the line where to write text the text to write

Implements Window.

Definition at line 43 of file hd44780_8bit.cpp.