modm API documentation
modm::Hd44780Base< DATA, RW, RS, E > Class Template Reference

#include <modm/driver/display/hd44780_base.hpp>

Public Types

enum  LineMode { OneLine = Set1LineDisplay, TwoLines = Set2LineDisplay }
 

Static Public Member Functions

static void initialize (LineMode lineMode)
 
static bool clear ()
 
static bool resetCursor ()
 
static bool writeAddress (uint8_t address)
 
static bool writeCommand (uint8_t command)
 
static bool writeRAM (uint8_t data)
 
static bool readAddress (uint8_t &address)
 
static bool readRAM (uint8_t &data)
 
static bool isBusy ()
 
static bool writeCGRAM (uint8_t character, uint8_t *cg)
 

Static Protected Member Functions

static void write (uint8_t data)
 unconditionally write data to the controller
 
static uint8_t read ()
 unconditionally read data from the controller
 

Detailed Description

template<typename DATA, typename RW, typename RS, typename E>
class modm::Hd44780Base< DATA, RW, RS, E >

Base driver for one HD447800 compatible display driver.

An HD44780 Character LCD is a de-facto industry standard liquid crystal display (LCD) display device. They can drive up to 80 characters with one driver, and more with additional ones, selected by additional Enable lines.

This driver can handle 4-Bit or 8-Bit bus mode with read back. For either data bus width the class will internally choose the right bus implementation, so the interface remains exactly the same. You also need to connect all the control pins (RW, RS, E).

Template Parameters
DATAA 8bit or 4bit Port.
RWRead/Write-Select Pin
RSCommand/Data-Select Pin
EEnable Pin
See also
http://en.wikipedia.org/wiki/HD44780_Character_LCD
Author
Niklas Hauser

Member Function Documentation

template<typename DATA , typename RW , typename RS , typename E >
static bool modm::Hd44780Base< DATA, RW, RS, E >::clear ( )
static

Clear the display of all Data

Returns
true if operation successful, false if controller is busy
template<typename DATA , typename RW , typename RS , typename E >
static void modm::Hd44780Base< DATA, RW, RS, E >::initialize ( LineMode  lineMode)
static

initialize the display to the current bus and line mode

Warning
you need to wait more than 30ms after Vcc rises to 4.5V before calling this function
template<typename DATA , typename RW , typename RS , typename E >
static bool modm::Hd44780Base< DATA, RW, RS, E >::isBusy ( )
inlinestatic
Returns
true if controller is busy with an internal operation, else false
template<typename DATA , typename RW , typename RS , typename E >
static bool modm::Hd44780Base< DATA, RW, RS, E >::readAddress ( uint8_t &  address)
static

Read the cursor position

Returns
true if operation successful, false if controller is busy
template<typename DATA , typename RW , typename RS , typename E >
static bool modm::Hd44780Base< DATA, RW, RS, E >::readRAM ( uint8_t &  data)
inlinestatic

Read the character at the current cursor position

Returns
true if operation successful, false if controller is busy
template<typename DATA , typename RW , typename RS , typename E >
static bool modm::Hd44780Base< DATA, RW, RS, E >::resetCursor ( )
static

Reset the cursor to (0,0) home position

Returns
true if operation successful, false if controller is busy
template<typename DATA , typename RW , typename RS , typename E >
static bool modm::Hd44780Base< DATA, RW, RS, E >::writeAddress ( uint8_t  address)
inlinestatic

Set the address of the cursor

Returns
true if operation successful, false if controller is busy
template<typename DATA , typename RW , typename RS , typename E >
static bool modm::Hd44780Base< DATA, RW, RS, E >::writeCommand ( uint8_t  command)
inlinestatic

Write a command to the controller

Returns
true if operation successful, false if controller is busy
template<typename DATA , typename RW , typename RS , typename E >
static bool modm::Hd44780Base< DATA, RW, RS, E >::writeRAM ( uint8_t  data)
inlinestatic

Write data to the data RAM at the current cursor position

Returns
true if operation successful, false if controller is busy

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