Class HD44780U
- java.lang.Object
-
- org.deepjava.runtime.ppc32.Task
-
- org.deepjava.runtime.mpc555.driver.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 Summary
Fields Modifier and Type Field Description boolean
done
-
Fields inherited from class org.deepjava.runtime.ppc32.Task
firstErr, maxNofTasks, nofActivations, period, safe, time
-
Fields inherited from interface org.deepjava.runtime.ppc32.Ippc32
CR, CTR, DAR, DEC, DSISR, FPR0, FPR1, FPR10, FPR11, FPR12, FPR13, FPR14, FPR15, FPR16, FPR17, FPR18, FPR19, FPR2, FPR20, FPR21, FPR22, FPR23, FPR24, FPR25, FPR26, FPR27, FPR28, FPR29, FPR3, FPR30, FPR31, FPR4, FPR5, FPR6, FPR7, FPR8, FPR9, FPSCR, LR, MSR, R0, R1, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, R2, R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, R3, R30, R31, R4, R5, R6, R7, R8, R9, SPR1, SPR18, SPR19, SPR22, SPR26, SPR268, SPR269, SPR27, SPR272, SPR273, SPR274, SPR275, SPR287, SPR8, SPR9, SPRG0, SPRG1, SPRG2, SPRG3, SRR0, SRR1, TBLread, TBUread, XER
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
action()
Do not call this method!void
clearDisplay()
Clears the display.static HD44780U
getInstance()
Returns an instance of Display Driver HD44780Uvoid
init(int nofRows)
Initialisation of the display.void
onOff(boolean displayOn, boolean cursorOn, boolean blinkOn)
Manages the displays and the cursor functions.void
setCursor(int row, int column)
Sets the cursor on desired destination.void
writeChar(char ch)
Writes a characterch
on the display at current cursor position.void
writeInt(int i, int fieldLen)
Writes an integer value on the display.void
writeLn()
Writes a line feed.
-
-
-
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 characterch
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 underlineblinkOn
-true
: Cursor is blinking
-
action
public void action()
Do not call this method!- Specified by:
action
in interfaceActionable
- Overrides:
action
in classTask
-
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
-
-