API references

CharDisplay.DisplayP4Type
function DisplayP4(
    RS::Int,
    RW::Union{Int,Nothing},
    E::Int,
    D7::Int,
    D6::Int,
    D5::Int,
    D4::Int
)

Initialize object representing character display with parallel bus in 4 bit mode and prepare it for writing characters. Cursor will be set to the first line and first symbol: (0,0) pisition.

Arguments

  • RS-D4 : GPIO numer connected to corresponding pins. You have not to connect RW pin, RW is allowed to be nothing.
source
CharDisplay.DisplayP8Type
function DisplayP8(
    RS::Int,
    RW::Union{Int,Nothing},
    E::Int,
    D7::Int,
    D6::Int,
    D5::Int,
    D4::Int
    D3::Int,
    D2::Int,
    D1::Int,
    D0::Int
)

Initialize object representing character display with parallel bus in 8 bit mode and prepare it for writing characters. Cursor will be set to the first line and first symbol: (0,0) pisition.

Arguments

  • RS-D0 : GPIO numer connected to corresponding pins. You have not to connect RW pin, RW is allowed to be nothing.
source
Base.writeMethod
function write(display::DisplayP, symbol::Char)

Write character to the current position and shift cursor to the next position.

Arguments

  • display : DisplayP object.
  • symbol : character to print. The symbol code must be convertable to UInt8. Full list of available characters can be found in datasheet for the display. If some of symbol cannot be converted, "?" sign will be printed.
source
Base.writeMethod
function write(display::DisplayP, string::String)

Write character string starting from the current position.

Arguments

  • display : DisplayP object.
  • string : string to print. Each symbol code must be convertable to UInt8. Full list of available characters can be found in datasheet for the display.
source
Base.writeMethod
write(display::DisplayP, byte::UInt8)

Write data to CG or DDRAM

DB7 DB6 DB5 DB4 DB4 DB3 DB2 DB1 DB0

Arguments

  • byte : Byte representing symbol.
source
CharDisplay.clear_displayMethod
clear_display(display::DisplayP)

Clears entire display and sets DDRAM address 0 in address counter.

0 0 0 0 0 0 0 1

source
CharDisplay.cursor_shiftMethod
cursor_shift(display::DisplayP; right::Bool = false)

Moves cursor without changing DDRAM contents.

0 0 0 1 0 R/L - -

source
CharDisplay.display_on_off_controlMethod
display_on_off_control(
    display::DisplayP;
    display_on::Bool = true,
    cursor_on::Bool = true,
    blinking::Bool = false
)

Sets entire display (D) on/off, cursor on/off (C), and blinking of cursor position character (B).

0 0 0 0 1 D C B

Arguments

  • display_on : true means display on, false is off.
  • cursor_on : true means cursor on, false is off.
  • blinking : true means blinking cursor character.
source
CharDisplay.display_shiftMethod
display_shift(display::DisplayP; right::Bool = false)

Shifts display without changing DDRAM contents.

# 0 0 0 1 1 R/L - -

source
CharDisplay.entry_mode_setMethod
entry_mode_set(display::DisplayP; increment::Bool = true, shift::Bool = false)

Sets cursor move direction and specifies display shift. These operations are performed during data write and read.

0 0 0 0 0 1 I/D S

Arguments

  • increment : true means increment, false decrement
  • shift : true accompanies display shift
source
CharDisplay.function_setMethod
function_set(
    display::DisplayP;
    _8bits::Bool = false,
    _2lines::Bool = true,
    _10pixels::Bool = false,
    second_set::Bool = false
)

Sets interface data length (DL), number of display lines (N), and character font (F)

0 0 1 DL N F P —

Arguments

  • _8bits : set 8 bit mode (true) or 4 bit model (false)
  • _2lines : true means 2 lines, false means one line.
  • _10pixels : true for 5x10 pixel symbols modules. Default (false) is 5x8.
  • second_set : Some modules supports 2 symbols fonts. See the datasheet.
source
CharDisplay.return_homeMethod
return_home(display::DisplayP)

Sets DDRAM address 0 in address counter. Also returns display from being shifted to original position. DDRAM contents remain unchanged.

0 0 0 0 0 0 1 -

source
CharDisplay.set_CGRAM_addressMethod
set_CGRAM_address(display::DisplayP, byte::UInt8)

Sets CGRAM address. CGRAM data is sent and received after this setting

0 1 ACG ACG ACG ACG ACG ACG

source
CharDisplay.set_DDRAM_addressMethod
set_DDRAM_address(display::DisplayP, byte::UInt8)

Sets DDRAM address. DDRAM data is sent and received after this setting.

1 ADD ADD ADD ADD ADD ADD ADD

source
CharDisplay.set_cursorFunction
set_cursor(display::DisplayP, col::Int = 0, row::Int = 0)

Set cursor position. __

Arguments

  • col : number of position: integer from 0 to 15
  • row : number of string: integer 0 or 1
source