Display text on LCD displays (even on multiple ones). Allow to create windows (frames) on display, and to combine them (split, add, duplicate, scroll). See http://mbed.org/users/hlipka/notebook/lcdwindow/ for more information.

Dependents:   Mbell

Revision:
2:5ac5bab7daaf
Parent:
1:65f72ed914fa
Child:
3:e5d5e2fe4bf6
--- a/hd44780_8bit.cpp	Tue Nov 16 20:49:18 2010 +0000
+++ b/hd44780_8bit.cpp	Sat Nov 27 22:54:13 2010 +0000
@@ -27,10 +27,19 @@
 #include "DigitalOut.h"
 #include "wait_api.h"
 
+void HD44780LCD8bit::character(int column, int row, int c)
+{
+    int address=(row)*0x40+(column);
+    sendCmd((unsigned char)address|0x80);
+    wait_us(30);
+    sendData(c);
+    wait_us(30);
+}
 
-void HD44780LCD8bit::writeText(const unsigned int line, const unsigned int pos, const char text[]) {
+
+void HD44780LCD8bit::writeText(const unsigned int column, const unsigned int row, const char text[]) {
 //    printf("print to %d,%d {%s}\n",line,pos,text);
-    int address=line*0x40+pos;
+    int address=row*0x40+column;
     sendCmd((unsigned char)address|0x80);
     wait_us(30);
 
@@ -59,8 +68,8 @@
 }
 
 HD44780LCD8bit::HD44780LCD8bit
-(unsigned int width, unsigned int height, BusOut *data, PinName enable, PinName rs)
-        :TextLCDBase(width, height)
+(unsigned int columns, unsigned int rows, BusOut *data, PinName enable, PinName rs)
+        :TextLCDBase(columns, rows)
         {
         _data=data;
         _rs=new DigitalOut(rs);