Summary

This article shows how to use the Graphics Resource Converter (GRC) to import fonts into a Graphics project based on Microchip's Library for Applications (MLA). This tutorial places the imported font into program memory.

Starting the Graphics Resource Converter utility

The GRC is located in the MLA Installation directory:…microchip/mla/vYYYY-MM-DD/framework/gfx/utilities/grc

Configuring the GRC

For this example configure the CRC to place imported images into internal program memory (internal flash).

Set the Graphics Module Bits per pixel to 16 (16 bpp).

When working with PIC® MCUs which have an internal graphics module, such as the PIC24FDA series, the Graphics Module option can be selected to set the image format.

After configuring the GRC select "OK"

2

Starting the Import Process

To begin importing an image select file then Add Images.

Click image to enlarge.

3

Selecting the image to Import

After selecting Add Image you will be directed to browse and locate either a bitmap or a JPEG image to import into the project. Select the file, then press Open

​

In this example we will use the bitmap image NewImage.bmp

Click image to enlarge.

4

Convert the Image

When you have finished selecting the images you wish to import, select Project then Convert.

​

Before importing, the GRC will ask you to select a file name and location to store the imported image. The conversion process will create an assembly file (.s), a c file (.c) and a header file (.h) using the name selected.

Click image to enlarge.

5

Include the C code and Header file in the MPLAB® X Project

The conversion process creates an assembly file (.s), a C file (.c), and a header file (.h) for each imported image. These files need to be included in the MLA Graphics project just as all other source files and header files.

​

You will have to edit the appropriate files to add a #include for the newly created header file.

The image on the left shows the files for the image NewImage.bmp included in a project which were saved in files with the name of NewImage.*. The three files created are:

NewImage.s

NewImage.h

NewImage_reference.c

All three of these files are added to the project tree automatically by the GRC.

Click image to enlarge.

6

Build the Project

Re-building the project after the the new image's header and source files have been added makes the image available for use.

Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.

Click here to edit contents of this page.

Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.

Append content without editing the whole page source.

Check out how this page has evolved in the past.

If you want to discuss contents of this page - this is the easiest way to do it.

View and manage file attachments for this page.

A few useful tools to manage this Site.

See pages that link to and include this page.

Change the name (also URL address, possibly the category) of the page.