Step 6Creating and adding your own Bitmaps
Well here's how you do it.
First you need to create a monochrome bitmap in MSPaint. After opening paint, Click on "attributes" in the image menu. Set the measurements to pixels and set the specs to (for now) 162 wide by 70 high. Fill in the bullet point next to black and white. When you click "OK" you'll get a threatening warning telling you you're about to lose all the colors in your drawing. Click continue.
Create a text box and open the "text toolbar" set your font size to 12pt and select what font you want.
Go ahead and type your string out, and make the box longer if you need to.
When you're finished, select the text and move it to the top left corner of the white area.
Drag the corner of the white space up so it's pretty close to the text.
Now go to the view menu, move the cursor over the "zoom" and select custom. Choose 800%.
You can now resize the white area to 16 pixels tall.
Save the bitmap as a "monochrome" bitmap. (on the dropdown menu)
Next we have to convert the bitmap to a "c" array.
Use the "Fntcvtr" application to convert your bitmap (directions available here)
This program outputs data in a "char" array, we need this to be an Unsigned 8-bit array. To convert it
open the ".out" file in Programmer's notebook.
Select "replace" on the edit menu (CTRL-R).
In the "find what:" box, enter '\ (apostrophe backslash)
Set the replace to "0" (zero)
Click replace all
Run another replace sequence to replace ' (apostrophe) with nothing (empty)
Replace all again.
The purple characters should now be blue.
We now need to redefine the array. Manually replace "Char" with "uint8_t" (it won't turn blue).
Now just copy and past the entire array (including green specs) over the old one in Printer.c.
Be sure to modify the constants "rows" and "col" to the new values of the bitmap.
Compile, load and run. Your set.
Fntcvtr.exe91 KB| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|

















































