Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of PCF2119 by
PCF2119 Class Reference
A PCF2119 interface for driving I2C PCF2119x-based LCDs. More...
#include <PCF2119.h>
Public Types | |
| enum | LCDType { LCD16x2, LCD16x2B, LCD20x2, LCD20x4 } |
LCD panel format. More... | |
Public Member Functions | |
| PCF2119 (PinName sda, PinName sck, PinName reset, LCDType type=LCD16x2, char addr=0x3b) | |
| Create a TextLCD interface. | |
| PCF2119 (I2C &i2c, PinName reset, LCDType type=LCD16x2, char addr=0x3b) | |
| Create a TextLCD interface. | |
| int | putc (int c) |
| Write a character to the LCD. | |
| int | printf (const char *format,...) |
| Write a formated string to the LCD. | |
| void | locate (int column, int row) |
| Locate to a screen column and row. | |
| void | cls () |
| Clear the screen and locate to 0,0. | |
Detailed Description
A PCF2119 interface for driving I2C PCF2119x-based LCDs.
Currently supports 16x2, 20x2 and 20x4 panels
#include "mbed.h" #include "PCF2119.h" TextLCD lcd(p10, p12, p15, p30); // sda, sck, reset int main() { lcd.printf("Hello World!\n"); }
Definition at line 46 of file PCF2119.h.
Member Enumeration Documentation
| enum LCDType |
Constructor & Destructor Documentation
Create a TextLCD interface.
- Parameters:
-
sda I2C data line pin sck I2C clock line pin reset Reset pin type Sets the panel size/addressing mode (default = LCD16x2) addr I2C address (default = 0x74)
Definition at line 29 of file PCF2119.cpp.
Create a TextLCD interface.
- Parameters:
-
i2c I2C class reset Reset pin type Sets the panel size/addressing mode (default = LCD16x2) addr I2C address (default = 0x74)
Definition at line 34 of file PCF2119.cpp.
Member Function Documentation
| void cls | ( | ) |
Clear the screen and locate to 0,0.
Definition at line 72 of file PCF2119.cpp.
| void locate | ( | int | column, |
| int | row | ||
| ) |
Locate to a screen column and row.
- Parameters:
-
column The horizontal position from the left, indexed from 0 row The vertical position from the top, indexed from 0
Definition at line 80 of file PCF2119.cpp.
| int printf | ( | const char * | format, |
| ... | |||
| ) |
Write a formated string to the LCD.
- Parameters:
-
format A printf-style format string, followed by the variables to use in formating the string.
| int putc | ( | int | c ) |
Write a character to the LCD.
- Parameters:
-
c The character to write to the display
Generated on Sun Jul 24 2022 03:35:04 by
1.7.2
