Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: Teensy 3.0 and GLCD

  1. #1
    Junior Member
    Join Date
    Jun 2013
    Posts
    2

    Teensy 3.0 and GLCD

    Hi I am working displaying information on an LCD screen using the Teensy 3.0. The screen that I am using works on an Arduino Uno using the GLCD Library. My co-worker tried getting the code to work on the Teensy but did not have any success. My question is whether anyone has found a way to use the GLCD library on the Teensy 3.0 or if there is another libarary that we could use. I do not believe that the Liquid Crystal Library will work for the LCD screen that we are using.http://www.azdisplays.com/index.php?...product=g1264b is a link to the type of LCD screen.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,592
    Right now, there is no GLCD (ks0108) library for Teensy 3.0.

    Many months ago, Bill Perry (co-author of GLCD version 3) ported the library to Teensy 3.0 using a board, LCD and adaptor board I sent him. He got it working, at least slowly, in a matter of days and was working on optimizations. Bill's excellent at optimization work!

    Apparently there was some miscommunication or disagreement between Bill and Micheal (the original author of GLCD) about changing the license. Bill felt very strongly he wanted all his contributions to be GPL. Michaeal prefers the LGPL, which GLCD has always used.

    Bill never released any code. I've sent him several emails since, but lately no answer. I don't know why he's no longer answering.

    Micheal and I talked at Maker Faire about looking for alternatives to replace GLCD. Since it appears Bill is no longer part of the project, we might build something new based on the GLCD code I wrote for the 8051 many years ago and Adafruit's GFX library.

    I'm sorry this has sat in limbo so long. I keep hoping Bill will reply and release the code, but that's looking less and less likely to ever happen. I sent him one more email just now.

  3. #3
    Senior Member
    Join Date
    Jan 2013
    Location
    Dallas, TX USA
    Posts
    106
    Paul,
    I'm still around and still very actively working on an updated library.
    A release will happen. I guarantee it.
    I think I've answered all your emails, I replied to your 6-24 email on 6-25 with a status update.
    Progress is coming along and I'm close to kicking something out.

    As far as licensing goes, the dispute occured quite a bit before the GLCD v3 release during the beta period.
    I believe in open source and don't wish to contribute to code that can be used on closed source projects.
    The entire point of LGPL is to allow the creation of closed source projects, which is why I am opposed to it.

    The ks0108 library (pre GLCD) had no stated license. During the beta period GLCD was formally licensed
    as LGPL 2.1 or any newer license with exception that the AVRIO code was not licensed LGPL but was compatible
    with it when the AVRIO code was used with GLCD on Arduino platforms. Any other use caused AVRIO to be
    licensed GPL v3.

    The GNU LGPL v2.1 license used on GLCD allows conversion to and the creation of derivative works as GPL v3.
    So that is what I've done.

    I've now forked the GLCD library to create a new project.
    The new library project is called "openGLCD" and will be licensed under GPL v3
    It has many new features and updates, including support for non AVR processors.
    The most significant difference is that that the openGLCD code is GPL v3 vs GLCD code was LGPL v2.1
    What that means is that the code updates in openGLCD cannot be moved back to GLCD or any other LGPL code base.
    Also since openGLCD is GPL it cannot be used in closed source projects or linked with other code that is not GPL compatible.
    Users who wish to create closed source works, will have to stick with GLCD or seek an alternate
    graphic library.

    In terms of the project,
    I've run into several porting issues during testing that have taken a while to get resolved but
    the library is better and more stable for it.
    A big hit to development/release was/is that this new library needed a new project home
    and Google killed downloads on new all new Google Code projects.
    That killed my buid methodology and all my automated build scripts that worked on linux and Windoze
    since I need downloads and no other VCS sites support both SVN and downloads.
    (Still haven't fully resolved this yet)

    Getting all the licensing and documentation converted over has taking quite a bit more time
    than I expected. I still have many photos that I have to re-shoot for the documentation since
    I don't want any of the GLCD library display images to remain.
    The only substantial item remaining left to resolve before I release something is to get
    the project fully under VCS on a hosting site (I have a few options)
    and get my automated build scripts working with the new environment.
    That is my task for the next week or so.

    One issue that needs looking into on the Teensy3 side is how to deal with AVR progmem compability in Teensy3.
    Paul, I sent you an email about this on 2013-07-24 with the issue.
    The summary on that is that "NOPing" PROGMEM, isn't good enough because not every one
    is using "const" on their progmem declarations because it wasn't necessary on AVR. When they don't use
    const the data ends up in RAM on Teensy3 which is not good.
    I have a hack work around, and can fix all the code that I ship with the library,
    but this needs to be updated in the Teensy3 teensyduino code to make it work more like AVR
    so that it "just works" for all the various ways people declared their AVR progmem data.
    Remember, there are some automated tools out there that create things like fonts and bitmaps
    that I can't control.

    I also need to look at the source to the ARM libC code you are using to see how I can
    fit into the stdio system to make the library openGLCD Printf() function use the underlying stdio and xxprintf() code like I can on AVR and PIC32.
    An initial version of the library can ship without suppot for this on Teensy3, but I'd sure like to get it working on Teensy3.

    Contact me off line and we can talk further.

    --- bill

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,592
    Great news Bill. Glad to hear the license issue got resolved. My position is the same as it's always been: "your code, you choose the license".

    A few times I've gotten sucked into spending way too much time concentrating on issues regarding public policy and legal stuff. I see people get really into that stuff, far more than I ever have. The truth is, my expertise is in electronics and software, not law. License details are important. But I try not to spend much time on what would be armchair quarter-backing. It's far better if I apply my time to technical stuff.

    I really do know how time consuming writing web docs with lots of good photos can be!

    Looks like I missed your email from a couple weeks ago. Just found it in my inbox. I've been falling pretty far behind on stuff the last few weeks while working on the low power issue and fix for the mac bug. That took a LOT more work than I anticipated.

    Can we discuss the PROGMEM stuff here on the forum? I put forum links onto my to-do list (there really is a list in a giant text file), but conversations in my inbox get lost or deleted pretty quickly. The forum is also nice, since it gives others a chance to comment, or after the fact, at least a way to see what the thought process was in making the decision.

  5. #5
    Senior Member
    Join Date
    Jan 2013
    Location
    Dallas, TX USA
    Posts
    106
    Paul,
    In case you missed it. I sent you an email about an alpha release for openGLCD.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,592
    Yup, just saw it. I'm trying to reply to forum first, email 2nd these days....

  7. #7
    Senior Member
    Join Date
    Jan 2013
    Location
    Dallas, TX USA
    Posts
    106
    Paul, I sent an email with more information, and there should also be a bitbucket invitation email.
    Create an account over there and I'll set you up to get access to the openGLCD repo which is still private for now.
    After you get a chance to play with it a bit and comment on it, I can start to open it up for others to play with.

    --- bill

  8. #8
    Senior Member
    Join Date
    Jan 2013
    Location
    Dallas, TX USA
    Posts
    106
    For those following along,
    I apologize for this thread hijack since while this response and my other comments are
    somewhat related to the "GLCD" library, they really are not about GLCD so much as a new
    library: openGLCD.
    With respect to the GLCD library,
    I am one of the co-authors of the GLCD library.
    Going forward, I will no longer be supporting the GLCD library.
    As mentioned earlier I have instead chosen to fork the GLCD library to create a new and separate open-source
    derivative work called openGLCD.

    Going forward I will start a new thread(s) for openGLCD.
    For those that are looking purely for GLCD on Teensy3, you can stop
    reading here.

    For those looking to have a glcd library with an experience that is currently very
    similar to GLCD v3, read below.

    --- bill


    openGLCD is not just an updated GLCD library.
    openGLCD is an open source project for open source projects.
    Those wishing to create closed projects should seek an alternate solution.
    openGLCD is licensed under the terms of the GNU General Public License v3.0 as opposed
    to the more liberal licensing terms of the GNU Lesser General Public License (LGPL), modified BSD, Apache, etc..

    Currently, openGLCD should work on:
    Teensy, Teensy++, Teensy3, Uno, Leonardo, Mega, Sanguino, Bobuino, & Mighty1284p "standard" core.
    The project is currently in an alpha state and i'm offering it to a limited number of people who wish to play with it.

    It also comes with a GLCD v3 compatibility mode to aid with transition from GLCD to openGLCD that
    should allow most GLCD v3 sketches to run as is.

    There is quite a bit of HTML documentation included, but it is still in progress.
    There are no formal release notes, and there are still a few rough edges but
    if you have interest in essentially being an "alpha tester" during this limited alpha testing period,
    please PM me and we will work out the details.

    --- bill

  9. #9
    Senior Member
    Join Date
    Jan 2013
    Location
    Dallas, TX USA
    Posts
    106
    One final update on openGLCD.
    The openGLCD project is now available to everyone and can be found here:
    https://bitbucket.org/bperrybap/openglcd/wiki/Home

    Just keep in mind that the license for openGLCD is GPL v3
    whereas the license for glcd (GLCDv3) is LGPL 2.1

    3v Teensy3 users should pay very close attention to the wiring section
    in the openGLCD html documentation as it describes how to wire it up to the 5v ks0108 modules.


    --- bill

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •