fiber
Loading...
Searching...
No Matches
fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin > Class Template Reference

driver for a LCD display with 8 data bit interface More...

#include <LCD_HD44780.hpp>

Public Member Functions

constexpr LCD_HD44780 (LCD_HD44780_NumberOfLines lines, unsigned int columns, LCD_HD44780_Dots dots, const RSPin &rs_pin, const RWPin &rw_pin, const EPin &e_pin, const DataPins &data_pins, const APin &a_pin=VoidPin())
 
constexpr unsigned int columns () const
 returns the number of columns of the LCD display
 
constexpr unsigned int rows () const
 returns the number or rows of the LCD display
 
std::suspend_never background_light (bool b)
 
Coroutine< void > init ()
 
Coroutine< void > clear_display ()
 Clears the display and returns the cursor to the home position (address 0)
 
Coroutine< void > return_home ()
 Returns the cursor to the home position (address 0)
 
Coroutine< void > entry_mode (LCD_HD44780_CursorEntryDirection direction, LCD_HD44780_DisplayEntryShift shift)
 Set the cursors move direction and display shift.
 
Coroutine< void > display_control (LCD_HD44780_DisplayControl display_control, LCD_HD44780_CursorControl cursor_control)
 Turn the display on/off and the curser on/off/blink.
 
Coroutine< void > cursor_and_display_shift (LCD_HD44780_CursorDisplayShift cursor_display_shift)
 
Coroutine< void > function_set (LCD_HD44780_NumberOfLines number_of_lines, LCD_HD44780_Dots dots)
 set the data width, the number of lines and the character font
 
Coroutine< void > set_cg_address (uint8_t addr)
 set the cg ram address (6-bit)
 
Coroutine< void > set_dd_address (uint8_t addr)
 set the dd ram address (7-bit)
 
Coroutine< void > write_data (uint8_t data)
 write data into the 'dd' or 'cg' ram
 
Coroutine< uint8_t > read_data ()
 Read data from the 'dd' or 'cg' ram.
 
Coroutine< LCD_HD44780_BusyFlagAddressread_busy_flag_and_address ()
 
Coroutine< bool > is_busy ()
 

Detailed Description

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
class fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >

driver for a LCD display with 8 data bit interface

Implements the communication protocol for the Hitachi HD44780 LCD controller.

Datasheet: https://cdn.sparkfun.com/assets/9/5/f/7/b/HD44780.pdf

Compatible controllers:

Controller Notes
HD44780 Original from Hitachi
KS0066U Samsung clone
ST7066U Sitronix version
AIP31066 Taiwan-based clone
SPLC780D Sitronix clone
NT7605 Novatek
TC2004A-01 Module series using compatible controller
WH1602, WH2004 WinStar modules with compatible controllers
Template Parameters
DataPinsInputOutput Data Pins D0..D7
RSPinFunction Select
RWPinRead/Write select
EPinEnable/Clock Pin
APinBackground Enable Pin (optional)

Constructor & Destructor Documentation

◆ LCD_HD44780()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::LCD_HD44780 ( LCD_HD44780_NumberOfLines lines,
unsigned int columns,
LCD_HD44780_Dots dots,
const RSPin & rs_pin,
const RWPin & rw_pin,
const EPin & e_pin,
const DataPins & data_pins,
const APin & a_pin = VoidPin() )
inlineconstexpr

Member Function Documentation

◆ background_light()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
std::suspend_never fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::background_light ( bool b)
inlinenodiscard

◆ clear_display()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< void > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::clear_display ( )
inlinenodiscard

Clears the display and returns the cursor to the home position (address 0)

◆ columns()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
unsigned int fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::columns ( ) const
inlineconstexpr

returns the number of columns of the LCD display

◆ cursor_and_display_shift()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< void > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::cursor_and_display_shift ( LCD_HD44780_CursorDisplayShift cursor_display_shift)
inlinenodiscard

◆ display_control()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< void > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::display_control ( LCD_HD44780_DisplayControl display_control,
LCD_HD44780_CursorControl cursor_control )
inlinenodiscard

Turn the display on/off and the curser on/off/blink.

◆ entry_mode()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< void > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::entry_mode ( LCD_HD44780_CursorEntryDirection direction,
LCD_HD44780_DisplayEntryShift shift )
inlinenodiscard

Set the cursors move direction and display shift.

◆ function_set()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< void > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::function_set ( LCD_HD44780_NumberOfLines number_of_lines,
LCD_HD44780_Dots dots )
inlinenodiscard

set the data width, the number of lines and the character font

◆ init()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< void > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::init ( )
inlinenodiscard

◆ is_busy()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< bool > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::is_busy ( )
inlinenodiscard

◆ read_busy_flag_and_address()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< LCD_HD44780_BusyFlagAddress > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::read_busy_flag_and_address ( )
inlinenodiscard

◆ read_data()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< uint8_t > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::read_data ( )
inlinenodiscard

Read data from the 'dd' or 'cg' ram.

◆ return_home()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< void > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::return_home ( )
inlinenodiscard

Returns the cursor to the home position (address 0)

Also returns a shifted display to the home position. DDRAM Contents remain Unchanged.

◆ rows()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
unsigned int fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::rows ( ) const
inlineconstexpr

returns the number or rows of the LCD display

◆ set_cg_address()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< void > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::set_cg_address ( uint8_t addr)
inlinenodiscard

set the cg ram address (6-bit)

◆ set_dd_address()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< void > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::set_dd_address ( uint8_t addr)
inlinenodiscard

set the dd ram address (7-bit)

◆ write_data()

template<cOutPin RSPin, cOutPin RWPin, cOutPin EPin, cPins< 8 > DataPins, cOutPin APin = VoidPin>
Coroutine< void > fiber::LCD_HD44780< RSPin, RWPin, EPin, DataPins, APin >::write_data ( uint8_t data)
inlinenodiscard

write data into the 'dd' or 'cg' ram


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