Microchip Graphics Library - Anyone Used It? - Page 1
Forum section: electronics / general

author: David
author_rank: Frequent Contributor
timestamp: April 02, 2013, 08:03:18 pm
content: Hi all,I am potentially looking at using a TFT display for an upcoming project. It looks as if Microchip may have the solution I require in terms of there Graphics Library. However, being more of a hardware guy (and remembering when I played with Microchips USB library some time ago...) I can see that it could be a bit of a headache! (I hate not seeing the low-level and nothing annoys me more than #IF DEFINED statements!)Has anyone used the graphics library? If so, are you using the PIC32, PIC24 DA and or an external controller? I see the ILI9341 and Himax HX8347 controllers seem to be popular.Any other easier solutions?Dave

author: David
author_rank: Frequent Contributor
timestamp: April 03, 2013, 05:01:46 pm
content: Bumpage!

author: ecat
author_rank: Frequent Contributor
timestamp: April 03, 2013, 06:24:37 pm
content: I have used the library but not perhaps in any way that would be useful to you. I compiled the Microchip code into a desktop application and implemented the scant few routines required to draw to a window and respond to the mouse as if it were a touch screen but all of this was just so I could have a poke around. This was quite some time ago so the validity of my memories is debatable.I do remember thinking it looked like a whole lot of code and therefore potential misery. Much like their USB and TCP/IP libraries!Are there quicker and easier ways to draw a line or a circle or a button on a screen? Certainly. But the MChip code is written and tested. You will still have to write some initialisation code and a plot pixel routine at some point and iirc the MChip code requires little else - at least for basic drawing. So, is it worth the effort of learning how to use the rest?If you are certain that you will only ever need a couple of buttons and a few squiggles you may be better off skipping the learning curve and rolling your own code, this will keep the code size down too. If you're anticipating more complex screens or a, shall we say, 'fluid' design procedure then it's certainly worth taking at least a look at how the library implements the drawing primitives and handles windows and user interaction.Then of course there all the other design issues, available memory, response times, display update rates... Meh. Which ever path you chose to start, it's not a one way street. Get the initialisation code and a plot pixel routine done and try a couple of things yourself, then give the library a quick spin. Having tried a couple things you'll be in a much better position to appreciate the whys and hows of the library and better able to decide for yourself.

author: Rufus
author_rank: Super Contributor
timestamp: April 03, 2013, 06:44:40 pm
content: I have used it with a PIC24 and mono QVGA with a clone of the ancient EPSON SED1339 controller. Also with a PIC24 DA using internal RAM for a 4 bit paletted QVGA. Both had resistive touch screens.Both were with the version of the library which was available at the time and it keeps evolving, including the recent addition of the GDDX designer which would have been helpful (if it is any good).Overall impression - bit klunky, bit buggy, unoptimised in places, bit hard to port to your hardware but it works and it is free. At the time I didn't find any comparable free alternative. One paid option looked very expensive, another affordable but till you actually try to use them you don't know if they are any good. I started to try the Microchip option and ran with it. I would use it again.

author: bombledmonk
author_rank: Regular Contributor
timestamp: April 03, 2013, 09:44:44 pm
content: Here's one example of getting the graphics library up and running.http://www.eewiki.net/display/Motley/PIC32+Low-Cost+Controllerless+Graphics+Interface+to+Newhaven+Color+LCD

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 03, 2013, 11:00:54 pm
content: My experience of the Microchip libraries is mainly with the SD card stuff - pretty well documented and written in a fairly straightforward way, but far from optimised.I managed to double the read speed without having to probe too deeply, and with good confidence that I hadn't broken anything.Given the choice between clear but less-than-optimal code, and something highly optimised but flaky and badly documented, the former is vastly preferable, as it is more amenable to tweaking to your own requirements.