Forum Administrator
Cambridge, MA
Offline
Faraday Member
Karma: 8
Posts: 3532
|
 |
« Reply #15 on: April 28, 2008, 04:21:56 pm » |
I've been doing multiline support the way that wiring does: not explicitly configuring it that way, but allowing you to move the cursor to any line you want. I can write to all the lines on the 2 and 4 line displays I have.
gradbert: The constructor for the LiquidCrystal library on Arduino will be basically what you suggest. The rest of the API will mirror Wiring's, although we could certainly add some functions (either now or later).
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 41
Arduino rocks
|
 |
« Reply #16 on: April 29, 2008, 12:23:06 am » |
Ok, I figured code speaks louder than words, so I took the LCD4bit library and combined it with the code from SoftwareSerial. The constructor it the interface described previously. It has the most of the same print() and println() functions as SoftwareSerial. The print(uint8_t) is replaced with rprint(uint8_t). something with the casting was giving me grief. All the printing functions have been moved to a class called Printable. the LCDnew class only has to implement rprint(). I don't have the carrage return/line feed handling implemented in the LCD class yet. check it out at http://www.gradbert.org/ldcnew.zipI still need to do some work on this but I figure some early feedback would be good
|
|
|
|
|
Logged
|
|
|
|
|
London
Offline
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #17 on: April 29, 2008, 08:40:41 am » |
hi gradbert, I am looking forward to trying your LCD library but your site is not responding.
|
|
|
|
« Last Edit: April 29, 2008, 08:41:01 am by mem »
|
Logged
|
|
|
|
|
Forum Administrator
Cambridge, MA
Offline
Faraday Member
Karma: 8
Posts: 3532
|
 |
« Reply #18 on: April 29, 2008, 09:45:48 am » |
gradbert: cool. I actually did something similar (see: http://svn.berlios.de/wsvn/arduino/trunk/hardware/cores/arduino/), but you've got some nice improvements. I like the name Printable better than Print, which is what I used. Also, did you get this to work on the Arduino? I had trouble getting virtual functions to compile, so I hacked together my own version.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 41
Arduino rocks
|
 |
« Reply #19 on: April 29, 2008, 10:38:24 am » |
hi gradbert, I am looking forward to trying your LCD library but your site is not responding. I should be more careful posting late at night. The correct url is http://www.gradbert.org/lcdnew.zip
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 41
Arduino rocks
|
 |
« Reply #20 on: April 29, 2008, 11:00:21 am » |
gradbert: cool. I actually did something similar (see: http://svn.berlios.de/wsvn/arduino/trunk/hardware/cores/arduino/), but you've got some nice improvements. I like the name Printable better than Print, which is what I used. Also, did you get this to work on the Arduino? I had trouble getting virtual functions to compile, so I hacked together my own version. I did get it working. In the zip file is an example program that will compile, download, and display on an lcd. The only thing that was really giving me a problem was that the build doesn't seem to be very happy with a library including another library, so in my sketch I have to explicitly include <Printable.h>. Now because the pin assignments are local to the instance of the object, I should be able to hook up two lcd displays at once. If I have some time this week, I will make a second lcd cable and try it.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 41
Arduino rocks
|
 |
« Reply #21 on: April 29, 2008, 11:48:47 pm » |
Here is a pic of an arduino driving two lcd's at once using the lcd library i have been playing with  (the small circuit board on the protoboard is a 3 axis accelerometer, for another project)
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 41
Arduino rocks
|
 |
« Reply #22 on: April 30, 2008, 12:33:52 am » |
I have the println() methods working now. The new version is at http://www.gradbert.org/lcdnew.zip
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 86
Arduino rocks
|
 |
« Reply #23 on: May 15, 2008, 05:43:56 am » |
will this work with serial-enabled LCDs?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 41
Arduino rocks
|
 |
« Reply #24 on: May 15, 2008, 10:15:23 pm » |
no, this is for paralele interfaced LCD's with the hitachi chipset.
|
|
|
|
|
Logged
|
|
|
|
|
Underhill Center, Vermont, USA
Offline
Jr. Member
Karma: 0
Posts: 71
Arduino rocks
|
 |
« Reply #25 on: May 18, 2008, 05:14:54 pm » |
will this work with serial-enabled LCDs? I have a library for an LCD driven by Software Serial. The command codes are for a PH Anderon controller chip, but they would be trivially easy to edit. http://www.wulfden.org/downloads/code/arduino/SWSerialLCDPHA_Lib.zipcheers ... BBR
|
|
|
|
|
Logged
|
|
|
|
|
New Zealand
Offline
God Member
Karma: 0
Posts: 999
Arduino pebbles
|
 |
« Reply #26 on: May 19, 2008, 05:50:00 am » |
It will support both 4 and 8 bit modes (though is there any reason you'd want to use the 8-bit one?). Isn't there some non-trivial speed difference between the two methods? (From memory, not personal experience.) --Phil.
|
|
|
|
|
Logged
|
|
|
|
|
Sydney, Australia
Offline
Newbie
Karma: 3
Posts: 23
|
 |
« Reply #27 on: June 09, 2008, 04:08:13 am » |
I must thank everyone so far for their efforts for a unified 8 and 4-bit library, but wouldn't it be prudent to also support a serial version of this new library? I was thinking of just an undertaking...but many wonderful people here have already started and I wouldn't dream of encroaching upon their work 
|
|
|
|
|
Logged
|
|
|
|
|
Forum Administrator
Cambridge, MA
Offline
Faraday Member
Karma: 8
Posts: 3532
|
 |
« Reply #28 on: June 09, 2008, 09:56:25 am » |
As far as I know, different serial LCDs have different protocols, which makes it hard to write a single library to talk to them. But if anyone wants to take a shot at creating a nice system for supporting multiple protocols and selecting between them, that would be cool.
|
|
|
|
|
Logged
|
|
|
|
|
San Antonio, TX USA
Offline
Newbie
Karma: 0
Posts: 4
Arduino rocks
|
 |
« Reply #29 on: June 28, 2008, 12:41:11 am » |
What's the process for the code getting merged into the other 4/8bit hitachi and/or serial LCD librar(ies)?
Also.. Please provide a clear hookup diagram for your version.. I've seen a half dozen different hookup configs.. none of which are compatible with each other.
Tweeks
|
|
|
|
|
Logged
|
|
|
|
|
|