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:
6:7ba288afed38
Child:
7:b472970bd8f6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sed1335text.h	Tue Jan 04 22:10:41 2011 +0000
@@ -0,0 +1,65 @@
+/*
+ * mbed LCDWindow library
+* Copyright (c) 2010 Hendrik Lipka
+* 
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the "Software"), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+* 
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+* 
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+* THE SOFTWARE.
+*/
+
+#ifndef SED1335_8BIT_H_
+#define SED1335_8BIT_H_
+
+#include "lcd.h"
+
+#include "BusOut.h"
+#include "DigitalOut.h"
+
+using namespace mbed; 
+
+/**
+ * class for connecting graphical SED1335-based LCD-Display (or using similiar controllers)
+ * displays are connected in 8bit-mode, and are using the internal 8x8 font
+*/
+class SED1335TextLCD: public TextLCDBase
+{
+    public:
+        /**
+         * @param columns number of chars per line (using an 8x8 font)
+         * @param rows number of lines (using an 8x8 font)
+         * @param data the bus object used for sending data (must be 8bit)
+         * @param enable the pin name for the enable line (1=active)
+         * @param rs the pin name for the register select line (0=cmd, 1=data)
+         * @param leftCS the pin name for the left display half (1=active)
+         * @param rightCS the pin name for the right display half (1=active, use NC for smaller displays)
+        */
+        SED1335TextLCD(const unsigned int columns, const unsigned int rows, BusOut *data, const PinName read, const PinName write, const PinName cs, const PinName a0, const PinName reset); 
+        virtual void init();
+        virtual void writeText(const unsigned int column, const unsigned int row, const char text[]);
+        virtual void clear();
+        virtual void character(int column, int row, int c);
+
+    protected:
+        void sendCmd(const unsigned char byte);
+        void sendData(const unsigned char byte);
+        
+        void sendByte(const unsigned char byte);
+        
+        BusOut* _data;
+        DigitalOut *_rd, *_wr, *_cs, *_a0, *_reset;
+};
+#endif
\ No newline at end of file