COSA
An Object-Oriented Platform for Arduino Programming
GY_IICLCD Class Reference

#include <GY_IICLCD.hh>

Inheritance diagram for GY_IICLCD:
Inheritance graph
Collaboration diagram for GY_IICLCD:
Collaboration graph

Public Member Functions

 GY_IICLCD (uint8_t subaddr=0)
 
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 Attributes

port_t m_port
 Port setting. More...
 

Static Protected Attributes

static const uint8_t TMP_MAX = 32
 

Detailed Description

IO handler for HD44780 (LCD-II) Dot Matix Liquid Crystal Display Controller/Driver when using the GYIICLCD IO expander board based on PCF8574 I2C IO expander device driver. Has the same port connection as MJKDZ. The difference is the default TWI sub-address.

Circuit

PCF8574/GY-IICLCD
+-----U------+
(GND)---[X]---------1-|A0 VCC|-16--------------(VCC)
(GND)---[X]---------2-|A1 SDA|-15-----------(SDA/A4)
(GND)---[X]---------3-|A2 SCL|-14-----------(SCL/A5)
(LCD/D4)------------4-|P0 INT|-13
(LCD/D5)------------5-|P1 P7|-12-----------(LCD/BT)
(LCD/D6)------------6-|P2 P6|-11-----------(LCD/RS)
(LCD/D7)------------7-|P3 P5|-10-----------(LCD/RW)
(GND)---------------8-|GND P4|-9------------(LCD/EN)
+------------+

Definition at line 50 of file GY_IICLCD.hh.

Constructor & Destructor Documentation

GY_IICLCD::GY_IICLCD ( uint8_t  subaddr = 0)
inline

Construct HD44780 IO port handler using the GY-IICLCD I2C/TWI I/O expander with given sub-address (A0..A2).

Parameters
[in]subaddrsub-address (0..7, default 0).

Definition at line 57 of file GY_IICLCD.hh.

Member Function Documentation

void MJKDZ_LCD_Module::set_backlight ( uint8_t  flag)
virtualinherited

Set backlight on/off.

Parameters
[in]flag.

Implements HD44780::IO.

Definition at line 92 of file MJKDZ_LCD_Module.cpp.

void MJKDZ_LCD_Module::set_mode ( uint8_t  flag)
virtualinherited

Set instruction/data mode; zero for instruction, non-zero for data mode.

Parameters
[in]flag.

Implements HD44780::IO.

Definition at line 86 of file MJKDZ_LCD_Module.cpp.

bool MJKDZ_LCD_Module::setup ( )
virtualinherited

Initiate TWI interface. Returns false.

Returns
bool.

Implements HD44780::IO.

Definition at line 24 of file MJKDZ_LCD_Module.cpp.

void MJKDZ_LCD_Module::write4b ( uint8_t  data)
virtualinherited

Write nibble to display using TWI interface.

Parameters
[in]data(4b) to write.

Implements HD44780::IO.

Definition at line 31 of file MJKDZ_LCD_Module.cpp.

void MJKDZ_LCD_Module::write8b ( uint8_t  data)
virtualinherited

Write byte (8bit) to display.

Parameters
[in]data(8b) to write.

Reimplemented from HD44780::IO.

Definition at line 43 of file MJKDZ_LCD_Module.cpp.

void MJKDZ_LCD_Module::write8n ( const void *  buf,
size_t  size 
)
virtualinherited

Write character buffer to display.

Parameters
[in]bufpointer to buffer.
[in]sizenumber of bytes in buffer.

Reimplemented from HD44780::IO.

Definition at line 60 of file MJKDZ_LCD_Module.cpp.

Member Data Documentation

port_t MJKDZ_LCD_Module::m_port
protectedinherited

Port setting.

Definition at line 123 of file MJKDZ_LCD_Module.hh.

const uint8_t MJKDZ_LCD_Module::TMP_MAX = 32
staticprotectedinherited

Definition at line 102 of file MJKDZ_LCD_Module.hh.


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