I didn't seam to see the controller for those simple GLCDs on the list of controllers for the microchip graphics library.

Does it support such libraries, or do i have to create a custom controller to support such?


You can build your own graphics "driver" that integrates seamlessly with the Microchip Graphics Library, for any graphics LCD you have. I was able to use the graphics library with a different type of color LCD that the library did not support by default.

The process is as follows:

  1. Download the Graphics LCD library from microchip
  2. Make a copy of an existing "driver" code file/folder (I'm not sure if I found the exact files/folders, but you get the idea)
    • see Lib\Object Layer\Configs\XXX.c and Lib\Primitive Layer\Configs\XXX.c
    • see Lib\S1D13517\
  3. Modify the code to reflect the exact protocol the LCD needs (refer to its datasheet)
    • Typically serial and parallel LCDs are supported (for parallel LCDs, the PMP / Parallel Master Port module is useful)
    • Start with the "init" function, and be able to send the commands it needs to initialise
    • After that try sending commands to set a pixel, which will be used to draw lines, curves, rectangles, etc
    • If the LCD supports accellerated primitives like lines/curves, then you can modify the driver file to directly send those. Otherwise leave the defaults (uses the set pixel function)
    • For text, you can choose font to embed in your app and the library will draw text with that font

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.