COSA
An Object-Oriented Platform for Arduino Programming
|
#include <ERM1602_5.hh>
Public Member Functions | |
ERM1602_5 (Board::DigitalPin sda=Board::D7, Board::DigitalPin scl=Board::D6, Board::DigitalPin en=Board::D5, Board::DigitalPin bt=Board::D4) | |
virtual bool | setup () |
virtual void | write4b (uint8_t data) |
virtual void | write8b (uint8_t data) |
virtual void | write8n (const void *buf, size_t size) |
virtual void | set_mode (uint8_t flag) |
virtual void | set_backlight (uint8_t flag) |
Protected Member Functions | |
void | flush () |
Protected Attributes | |
OutputPin | m_sda |
Serial data output. More... | |
OutputPin | m_scl |
Serial clock. More... | |
OutputPin | m_en |
Starts data read/write. More... | |
OutputPin | m_bt |
Back-light control (0/on, 1/off). More... | |
uint8_t | m_rs |
Register select (0/instruction, 1/data). More... | |
uint8_t | m_dirty |
Mark register select change required. More... | |
Static Protected Attributes | |
static const uint16_t | SHORT_EXEC_TIME = 20 |
ERM1602-5 Series, Character Display Module, adapter with digital output pins.
The serial 3-line SPI circuit for ERM1602-5.
Definition at line 49 of file ERM1602_5.hh.
ERM1602_5::ERM1602_5 | ( | Board::DigitalPin | sda = Board::D7 , |
Board::DigitalPin | scl = Board::D6 , |
||
Board::DigitalPin | en = Board::D5 , |
||
Board::DigitalPin | bt = Board::D4 |
||
) |
Construct ERM1602-5 3-wire serial port connected to given serial data, clock, enable pulse and backlight control pin.
[in] | sda | serial data pin (Default D7) |
[in] | scl | serial clock pin (Default D6) |
[in] | en | enable pulse (Default D5) |
[in] | bt | backlight control (Default D4) |
Definition at line 23 of file ERM1602_5.cpp.
|
protected |
Flush register setting if dirty.
Definition at line 97 of file ERM1602_5.cpp.
|
virtual |
Set backlight on/off using bt pin.
[in] | flag. |
Implements HD44780::IO.
Definition at line 91 of file ERM1602_5.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 83 of file ERM1602_5.cpp.
|
virtual |
Initiate serial port. Returns true.
Implements HD44780::IO.
Definition at line 37 of file ERM1602_5.cpp.
|
virtual |
Write LSB nibble to display using serial port.
[in] | data | (4b) to write. |
Implements HD44780::IO.
Definition at line 43 of file ERM1602_5.cpp.
|
virtual |
Write byte (8bit) to display.
[in] | data | (8b) to write. |
Reimplemented from HD44780::IO.
Definition at line 49 of file ERM1602_5.cpp.
|
virtual |
Write character buffer to display.
[in] | buf | pointer to buffer. |
[in] | size | number of bytes in buffer. |
Reimplemented from HD44780::IO.
Definition at line 63 of file ERM1602_5.cpp.
|
protected |
Back-light control (0/on, 1/off).
Definition at line 122 of file ERM1602_5.hh.
|
protected |
Mark register select change required.
Definition at line 124 of file ERM1602_5.hh.
|
protected |
Starts data read/write.
Definition at line 121 of file ERM1602_5.hh.
|
protected |
Register select (0/instruction, 1/data).
Definition at line 123 of file ERM1602_5.hh.
|
protected |
Serial clock.
Definition at line 120 of file ERM1602_5.hh.
|
protected |
Serial data output.
Definition at line 119 of file ERM1602_5.hh.
|
staticprotected |
Execution time delay (us).
Definition at line 117 of file ERM1602_5.hh.