Class HD44780U

  • All Implemented Interfaces:
    Ippc32, Actionable

    public class HD44780U
    extends Task
    Driver for character display with 2 - 4 rows and 16 columns.
    Display controller: HD44780U

    Connected on the system bus of the mpc555.
      System bus:                           Display:
      D0..7 (data lines)                    D7..0(interchanged!)
      R/W'                                  R/W'
      CS2' (Chip Select 2)                  E (use a Inverter between!)
      A31 (address lines)                   RS (Data/Instruction)
     
    The chip select CS2' is for an 8-Bit port configured.

    Base setting: Display On, Cursor On, Blink On, Increment, no shift.

    • Field Detail

      • done

        public boolean done
    • Method Detail

      • setCursor

        public void setCursor​(int row,
                              int column)
        Sets the cursor on desired destination.
        Parameters:
        row - row: starting with row 0.
        column - column: starting with 0.
      • writeChar

        public void writeChar​(char ch)
        Writes a character ch on the display at current cursor position.
        Parameters:
        ch - character to write.
      • writeLn

        public void writeLn()
        Writes a line feed.
      • writeInt

        public void writeInt​(int i,
                             int fieldLen)
        Writes an integer value on the display.
        Parameters:
        i - value to write.
        fieldLen - number of characters which should be used to display the value.
      • clearDisplay

        public void clearDisplay()
        Clears the display.
      • onOff

        public void onOff​(boolean displayOn,
                          boolean cursorOn,
                          boolean blinkOn)
        Manages the displays and the cursor functions.
        Parameters:
        displayOn - true: switch on the display.
        cursorOn - true: The position of the cursor are displayed with an underline
        blinkOn - true: Cursor is blinking
      • action

        public void action()
        Do not call this method!
        Specified by:
        action in interface Actionable
        Overrides:
        action in class Task
      • init

        public void init​(int nofRows)
        Initialisation of the display.
        Parameters:
        nofRows - number of rows present in the display: 2, 3 or 4.
      • getInstance

        public static HD44780U getInstance()
        Returns an instance of Display Driver HD44780U
        Returns:
        Instance of display driver HD44780U