mbed TextOLED Library, for a 4-bit LCD based on Winstar WEH000000 series Originl: http://mbed.org/users/simon/libraries/TextLCD/latest 共立電子 デジット の OLEDモジュール 4bitモード用
Dependents: Dawson_Controller allsystem_2
TextOLED Class Reference
A TextOLED interface for driving 4-bit HD44780-based LCDs. More...
#include <TextOLED.h>
Public Types | |
enum | LCDType { LCD16x2, LCD16x2B, LCD20x2, LCD20x4, LCD8x2 } |
LCD panel format. More... | |
Public Member Functions | |
TextOLED (PinName rs, PinName e, PinName d4, PinName d5, PinName d6, PinName d7, LCDType type=LCD16x2) | |
Create a TextOLED 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 TextOLED interface for driving 4-bit HD44780-based LCDs.
Currently supports 16x2, 20x2 and 20x4 panels
#include "mbed.h" #include "TextOLED.h" TextOLED lcd(p10, p12, p15, p16, p29, p30); // rs, e, d4-d7 int main() { lcd.printf("Hello World!\n"); }
Definition at line 47 of file TextOLED.h.
Member Enumeration Documentation
enum LCDType |
LCD panel format.
- Enumerator:
LCD16x2 16x2 LCD panel (default)
LCD16x2B 16x2 LCD panel alternate addressing
LCD20x2 20x2 LCD panel
LCD20x4 20x4 LCD panel
LCD8x2 8x4 LCD panel
Definition at line 51 of file TextOLED.h.
Constructor & Destructor Documentation
TextOLED | ( | PinName | rs, |
PinName | e, | ||
PinName | d4, | ||
PinName | d5, | ||
PinName | d6, | ||
PinName | d7, | ||
LCDType | type = LCD16x2 |
||
) |
Create a TextOLED interface.
- Parameters:
-
rs Instruction/data control line e Enable line (clock) d4-d7 Data lines for using as a 4-bit interface type Sets the panel size/addressing mode (default = LCD16x2)
Definition at line 30 of file TextOLED.cpp.
Member Function Documentation
void cls | ( | ) |
Clear the screen and locate to 0,0.
Definition at line 67 of file TextOLED.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 73 of file TextOLED.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 Thu Jul 14 2022 01:12:58 by 1.7.2