COSA
An Object-Oriented Platform for Arduino Programming
|
#include <HD44780.hh>
Classes | |
union | port_t |
Public Member Functions | |
SR3WSPI (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) |
void | set_clock (Clock rate) |
void | set_clock (uint32_t freq) |
Static Public Member Functions | |
static Clock | clock (uint32_t freq) |
static Clock | cycle (uint16_t ns) |
Protected Attributes | |
port_t | m_port |
Port setting. More... | |
Driver * | m_next |
List of drivers. More... | |
Interrupt::Handler * | m_irq |
Interrupt handler. More... | |
OutputPin | m_cs |
Device chip select pin. More... | |
Pulse | m_pulse |
Chip select pulse width. More... | |
uint8_t | m_spcr |
SPI/SPCR hardware control register setting. More... | |
uint8_t | m_spsr |
SPI/SPSR hardware status register. More... | |
Static Protected Attributes | |
static const uint16_t | SHORT_EXEC_TIME = 24 |
HD44780 (LCD-II) Dot Matix Liquid Crystal Display Controller/Driver Shift Register 3-Wire Port using SPI (SR3WSPI), 74HC595 (SR[pin]). The enable pulse pin acts as the SPI chip select.
Alternative circuit with 74HC164.
The SPI transfer is so fast that a longer delay is required.
Definition at line 618 of file HD44780.hh.
HD44780::SR3WSPI::SR3WSPI | ( | Board::DigitalPin | en = Board::D5 | ) |
Construct HD44780 4-wire serial port connected to given enable and chip select pin. Uses the SPI::MOSI(D11) and SPI:SCK(D13) pins.
[in] | en | enable pulse (Default D5, Tiny/D3) |
Definition at line 23 of file HD44780_SR3WSPI.cpp.
|
inlinestaticinherited |
|
inlinestaticinherited |
|
virtual |
Set backlight on/off using bt pin.
[in] | flag. |
Implements HD44780::IO.
Definition at line 69 of file HD44780_SR3WSPI.cpp.
|
inherited |
|
inlineinherited |
|
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 63 of file HD44780_SR3WSPI.cpp.
|
virtual |
Initiate serial port. Returns false.
Implements HD44780::IO.
Definition at line 30 of file HD44780_SR3WSPI.cpp.
|
virtual |
Write LSB nibble to display using serial port.
[in] | data | (4b) to write. |
Implements HD44780::IO.
Definition at line 36 of file HD44780_SR3WSPI.cpp.
|
virtual |
Write byte (8bit) to display.
[in] | data | (8b) to write. |
Reimplemented from HD44780::IO.
Definition at line 47 of file HD44780_SR3WSPI.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.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |
Port setting.
Definition at line 694 of file HD44780.hh.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
staticprotected |
Execution time delay (us).
Definition at line 670 of file HD44780.hh.