MHVLib  20111011
An efficiency oriented runtime library for AVR microcontrollers
MHV_Display_HD44780 Class Reference

#include <MHV_Display_HD44780.h>

Inheritance diagram for MHV_Display_HD44780:
MHV_Display_Character MHV_Device_TX MHV_Display_HD44780_Direct_Connect MHV_Display_HD44780_Shift_Register

List of all members.

Public Member Functions

 MHV_Display_HD44780 (uint8_t colCount, uint16_t rowCount, MHV_RingBuffer *txBuffers)
void init (bool byteMode, bool multiLine, bool bigFont, bool cursorOn, bool cursorBlink, bool left2right, bool scroll)
void clear ()
void entryMode (bool left2Right, bool scroll)
void control (bool displayOn, bool cursorOn, bool cursorBlink)

Protected Member Functions

void writeCommand (MHV_HD44780_COMMAND command, uint8_t data)
void function (bool byteMode, bool multiLine, bool bigFont)
void addressCGRAM (uint8_t address)
void addressDDRAM (uint8_t address)
virtual void writeByte (uint8_t byte, bool rs)=0
virtual uint8_t readByte (bool rs)=0
void _setCursor (uint8_t col, uint8_t row)
void _setCursor (uint16_t col, uint16_t row)
void _writeChar (char character)
char _readChar ()
virtual bool isBusy ()=0
virtual void delay (MHV_HD44780_COMMAND command)=0

Protected Attributes

uint16_t _ticks
uint16_t _animateTicks
bool _mustDelay
bool _byteMode

Detailed Description

Definition at line 45 of file MHV_Display_HD44780.h.


Constructor & Destructor Documentation

MHV_Display_HD44780::MHV_Display_HD44780 ( uint8_t  colCount,
uint16_t  rowCount,
MHV_RingBuffer txBuffers 
)

A class for operating HD44780 based LCD displays (and compatible) Data port layout: Bit description n DB4 n+1 DB5 n+2 DB6 n+3 DB7

Control port layout: n RS Register Select n+1 R/W Read/Write n+2 E Enable

Visual port layout: n Contrast (V0) n+1 LED Positive

Parameters:
colCountthe number of columns on the display
rowCountthe number of rows on the display
txBuffersbuffers for async writing

Definition at line 54 of file MHV_Display_HD44780.cpp.


Member Function Documentation

char MHV_Display_HD44780::_readChar ( ) [protected, virtual]

Read a character from the display at the current location, incrementing the location by 1

Returns:
the character at the current location

Implements MHV_Display_Character.

Definition at line 75 of file MHV_Display_HD44780.cpp.

void MHV_Display_HD44780::_setCursor ( uint8_t  col,
uint8_t  row 
) [protected]

Move the cursor to a location, so the next writeChar will write a character at that location (Origin is at the bottom left)

Parameters:
colthe column to put the character
rowthe row to put the character

Definition at line 101 of file MHV_Display_HD44780.cpp.

void MHV_Display_HD44780::_setCursor ( uint16_t  col,
uint16_t  row 
) [protected, virtual]

Move the cursor to a location, so the next writeChar will write a character at that location (Origin is at the bottom left)

Parameters:
colthe column to put the character
rowthe row to put the character

Implements MHV_Display_Character.

Definition at line 86 of file MHV_Display_HD44780.cpp.

void MHV_Display_HD44780::_writeChar ( char  character) [protected, virtual]

Write a character to the display at the current location, incrementing the location by 1

Parameters:
characterthe character to write

Implements MHV_Display_Character.

Definition at line 65 of file MHV_Display_HD44780.cpp.

void MHV_Display_HD44780::addressCGRAM ( uint8_t  address) [protected]

Set the CGRAM address

Parameters:
addressthe CGRAM address

Definition at line 194 of file MHV_Display_HD44780.cpp.

void MHV_Display_HD44780::addressDDRAM ( uint8_t  address) [protected]

Set the DDRAM address

Parameters:
addressthe DDRAM address

Definition at line 204 of file MHV_Display_HD44780.cpp.

void MHV_Display_HD44780::clear ( ) [virtual]

Clear the display

Implements MHV_Display_Character.

Definition at line 137 of file MHV_Display_HD44780.cpp.

void MHV_Display_HD44780::control ( bool  displayOn,
bool  cursorOn,
bool  cursorBlink 
)

Set parameters on the display

Parameters:
displayOnturn the display on
cursorOnturn the cursor on
cursorBlinkblink the cursor

Definition at line 164 of file MHV_Display_HD44780.cpp.

virtual void MHV_Display_HD44780::delay ( MHV_HD44780_COMMAND  command) [protected, pure virtual]
void MHV_Display_HD44780::entryMode ( bool  left2Right,
bool  scroll 
)

Set the entry mode - allows for left or right printing, allows for scrolling display or moving cursor

Parameters:
left2Righttrue for text reading left to right
scrolltrue to scroll text rather than moving the cursor

Definition at line 150 of file MHV_Display_HD44780.cpp.

void MHV_Display_HD44780::function ( bool  byteMode,
bool  multiLine,
bool  bigFont 
) [protected]

Initialise the display

Parameters:
byteModetrue to use 8 bit protocol
multiLinetrue if there is more than 1 line
bigFonttrue to use 5x11 fonts, false for 5x8

Definition at line 178 of file MHV_Display_HD44780.cpp.

void MHV_Display_HD44780::init ( bool  byteMode,
bool  multiLine,
bool  bigFont,
bool  cursorOn,
bool  cursorBlink,
bool  left2right,
bool  scroll 
)

Initialise the display

Parameters:
byteModetrue to use 8 bit transfers
multiLinetrue if there is more than 1 line
bigFonttrue to use 5x11 fonts, false for 5x8
cursorOnturn the curson on
cursorBlinkblink the cursor
left2righttrue for text reading left to right
scrolltrue to scroll text rather than moving the cursor

Definition at line 221 of file MHV_Display_HD44780.cpp.

virtual bool MHV_Display_HD44780::isBusy ( ) [protected, pure virtual]
virtual uint8_t MHV_Display_HD44780::readByte ( bool  rs) [protected, pure virtual]
virtual void MHV_Display_HD44780::writeByte ( uint8_t  byte,
bool  rs 
) [protected, pure virtual]
void MHV_Display_HD44780::writeCommand ( MHV_HD44780_COMMAND  command,
uint8_t  data 
) [protected]

Send a command to the display

Definition at line 121 of file MHV_Display_HD44780.cpp.


Member Data Documentation

uint16_t MHV_Display_HD44780::_animateTicks [protected]

Definition at line 48 of file MHV_Display_HD44780.h.

Definition at line 50 of file MHV_Display_HD44780.h.

Definition at line 49 of file MHV_Display_HD44780.h.

uint16_t MHV_Display_HD44780::_ticks [protected]

Definition at line 47 of file MHV_Display_HD44780.h.


The documentation for this class was generated from the following files: