COSA
An Object-Oriented Platform for Arduino Programming
|
#include <HD44780.hh>
Public Member Functions | |
Port4b (Board::DigitalPin d0=Board::D4, Board::DigitalPin d1=Board::D5, Board::DigitalPin d2=Board::D6, Board::DigitalPin d3=Board::D7, Board::DigitalPin rs=Board::D8, Board::DigitalPin en=Board::D9, Board::DigitalPin bt=Board::D10) | |
virtual bool | setup () |
virtual void | write4b (uint8_t data) |
virtual void | write8b (uint8_t data) |
virtual void | set_mode (uint8_t flag) |
virtual void | set_backlight (uint8_t flag) |
virtual void | write8n (const void *buf, size_t size) |
Protected Attributes | |
OutputPin | m_d0 |
Data pin; d0. More... | |
OutputPin | m_d1 |
Data pin; d1. More... | |
OutputPin | m_d2 |
Data pin; d2. More... | |
OutputPin | m_d3 |
Data pin; d3. More... | |
OutputPin | m_rs |
Register select (0/instruction, 1/data). More... | |
OutputPin | m_en |
Starts data read/write. More... | |
OutputPin | m_bt |
Back-light control (0/on, 1/off). More... | |
Static Protected Attributes | |
static const uint16_t | SHORT_EXEC_TIME = 32 |
HD44780 (LCD-II) Dot Matix Liquid Crystal Display Controller/Driver IO Port. Arduino pins directly to LCD in 4-bit mode.
The default pins are the LCD Keypad Shield.
Requires too many pins for ATtinyX5.
Definition at line 350 of file HD44780.hh.
|
inline |
Construct HD44780 4-bit parallel port connected to given command, enable and backlight pin. Data pins are implicit; D4..D7 for Arduino Standard and Mighty. D0..D3 for ATtinyX4. Connect to LCD pins D4..D7.
[in] | d0 | data pin (Default D4). |
[in] | d1 | data pin (Default D5). |
[in] | d2 | data pin (Default D6). |
[in] | d3 | data pin (Default D7). |
[in] | rs | command/data select pin (Default D8). |
[in] | en | enable pin (Default D9). |
[in] | bt | backlight pin (Default D10). |
Definition at line 364 of file HD44780.hh.
|
virtual |
Set backlight on/off using bt pin.
[in] | flag. |
Implements HD44780::IO.
Definition at line 71 of file HD44780_Port4b.cpp.
|
virtual |
Set instruction/data mode using given rs pin; zero for instruction, non-zero for data mode.
[in] | flag. |
Implements HD44780::IO.
Definition at line 65 of file HD44780_Port4b.cpp.
|
virtual |
Initiate 4-bit parallel port. Returns false.
Implements HD44780::IO.
Definition at line 26 of file HD44780_Port4b.cpp.
|
virtual |
Write LSB nibble to display data pins.
[in] | data | (4b) to write. |
Implements HD44780::IO.
Definition at line 32 of file HD44780_Port4b.cpp.
|
virtual |
Write byte (8bit) to display.
[in] | data | (8b) to write. |
Reimplemented from HD44780::IO.
Definition at line 45 of file HD44780_Port4b.cpp.
|
virtualinherited |
Write character buffer to display.
[in] | buf | pointer to buffer. |
[in] | size | number of bytes in buffer. |
Reimplemented in ERM1602_5, Adafruit_I2C_LCD_Backpack, DFRobot_IIC_LCD_Module, MJKDZ_LCD_Module, and SainSmart_LCD2004.
Definition at line 31 of file HD44780_IO.cpp.
|
protected |
Back-light control (0/on, 1/off).
Definition at line 426 of file HD44780.hh.
|
protected |
Data pin; d0.
Definition at line 420 of file HD44780.hh.
|
protected |
Data pin; d1.
Definition at line 421 of file HD44780.hh.
|
protected |
Data pin; d2.
Definition at line 422 of file HD44780.hh.
|
protected |
Data pin; d3.
Definition at line 423 of file HD44780.hh.
|
protected |
Starts data read/write.
Definition at line 425 of file HD44780.hh.
|
protected |
Register select (0/instruction, 1/data).
Definition at line 424 of file HD44780.hh.
|
staticprotected |
Execution time delay (us).
Definition at line 418 of file HD44780.hh.