Class HD44780U

  • All Implemented Interfaces:
    FlinkDefinitions, Iarm32, Actionable

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

    Connected to flink gpios of the Zynq7000.
      GPIO:     Display:
      gpio[0]   D0 (data line)
      gpio[1]   D1 (data line)
      gpio[2]   D2 (data line)
      gpio[3]   D3 (data line)
      gpio[4]   D4 (data line)
      gpio[5]   D5 (data line)
      gpio[6]   D6 (data line)
      gpio[7]   D7 (data line)
      gpio[8]   RS (Data/Instruction)
      gpio[9]   E (Enable)
      gpio[10]  R/W' (Read/Write)
     

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

    • 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