COSA
An Object-Oriented Platform for Arduino Programming
|
#include <HD44780.hh>
Classes | |
union | port_t |
Public Member Functions | |
SR3W (Board::DigitalPin sda=Board::D7, Board::DigitalPin scl=Board::D6, Board::DigitalPin en=Board::D5) | |
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 | |
port_t | m_port |
Port setting. More... | |
OutputPin | m_sda |
Serial data output. More... | |
OutputPin | m_scl |
Serial clock. More... | |
OutputPin | m_en |
Starts data read/write. More... | |
Static Protected Attributes | |
static const uint16_t | SHORT_EXEC_TIME = 20 |
HD44780 (LCD-II) Dot Matix Liquid Crystal Display Controller/Driver Shift Register 3-Wire Port (SR3W), 74HC595/74HC164 (SR[pin]), with digital output pins.
Alternative circuit with 74HC164.
The LSB of the shift register is used to allow reduction of number of shift operations (i.e. 6-bit shift).
Definition at line 483 of file HD44780.hh.
HD44780::SR3W::SR3W | ( | Board::DigitalPin | sda = Board::D7 , |
Board::DigitalPin | scl = Board::D6 , |
||
Board::DigitalPin | en = Board::D5 |
||
) |
Construct HD44780 3-wire serial port connected to given serial data, clock and enable pulse pin.
[in] | sda | serial data pin (Default D7, Tiny/D1) |
[in] | scl | serial clock pin (Default D6, Tiny/D2) |
[in] | en | enable pulse (Default D5, Tiny/D3) |
Definition at line 23 of file HD44780_SR3W.cpp.
|
virtual |
Set backlight on/off using bt pin.
[in] | flag. |
Implements HD44780::IO.
Definition at line 85 of file HD44780_SR3W.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 79 of file HD44780_SR3W.cpp.
|
virtual |
Initiate serial port. Returns false.
Implements HD44780::IO.
Definition at line 34 of file HD44780_SR3W.cpp.
|
virtual |
Write LSB nibble to display using serial port.
[in] | data | (4b) to write. |
Implements HD44780::IO.
Definition at line 40 of file HD44780_SR3W.cpp.
|
virtual |
Write byte (8bit) to display.
[in] | data | (8b) to write. |
Reimplemented from HD44780::IO.
Definition at line 69 of file HD44780_SR3W.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 |
Starts data read/write.
Definition at line 564 of file HD44780.hh.
|
protected |
Port setting.
Definition at line 561 of file HD44780.hh.
|
protected |
Serial clock.
Definition at line 563 of file HD44780.hh.
|
protected |
Serial data output.
Definition at line 562 of file HD44780.hh.
|
staticprotected |
Execution time delay (us).
Definition at line 540 of file HD44780.hh.