TextLCD
This is a LCD display that can display two rows of 16 alphanumeric characters.
- Available from Rapid Electronics 2x16 Alphanumeric LCD
Library
Note: For a experimental new generic text display library, see http://mbed.org/forum/topic/195/?page=1#comment-1068
Import Library:
http://mbed.org/projects/cookbook/svn/TextLCD/trunk
Import Example program:
http://mbed.org/projects/cookbook/svn/TextLCD/example
- For details on how to use this in the compiler, see Importing Projects and Libraries in to the Compiler
Hello World!
#include "mbed.h"
#include "TextLCD.h"
TextLCD lcd(p24, p25, p26, p27, p28, p29, p30); // rs, rw, e, d0, d1, d2, d3
int main() {
lcd.printf("Hello World!");
}
API
| TextLCD | A 16x2 Text LCD controller |
| Functions | |
| TextLCD | Create a TextLCD object, connected to the specified pins |
| putc | Write a character |
| printf | Write a formated string |
| locate | Locate to a certian position |
| cls | Clear the screen, and locate to 0,0 |
A 16x2 Text LCD controller
class TextLCD : public Stream
Create a TextLCD object, connected to the specified pins
TextLCD( PinName rs, PinName rw, PinName e, PinName d0, PinName d1, PinName d2, PinName d3, int columns = 16, int rows = 2 )
Write a character
int putc( int c )
Write a formated string
int printf( const char * format, ... )
Locate to a certian position
virtual void locate( int column, int row )
Clear the screen, and locate to 0,0
virtual void cls()
- Full api at http://mbed.org/projects/cookbook/api/TextLCD/trunk
- Full source at http://mbed.org/projects/cookbook/svn/TextLCD/trunk
Details
Screen Layout
pin 1 16
+-------------------------------------------------+
| o o o o o o o o o o o o o o o o |
| +---------------------------------------------+ |
| | (0,0) (15,0) | |
| | Screen Location | |
| | (0,1) (15,1) | |
| +---------------------------------------------+ |
+-------------------------------------------------+
Resources
Datasheets
PCB Library and Footprint
The Eagle PCB repository can be found at the Eagle page.




