If you are into geeking it out with projects of the electronical kind, then you have likely wanted to create a dot matrix display or a POV. To do this you will need to have a font file or table to read the characters from.
There are alot of ways to get this file. The common sizes of displays are 5×7 and 8×8. There’s alot of places online where you can get ASCII 5×7 fonts, but I am making a scrolly display with 8×8’s and I wanted to use the whole height of the matrix so I created this tool to easily format and create patterns and fonts and get them into the right format for C programming.
The attached file was created in excel and it has a couple of macros which make things easy. You will fill in the display area with 1’s and 0’s and then click a button and it will store your pattern in some cells below and convert everything to a hexadecimal string for popping into your C compiler or header file.
The attached file includes 5×8 fonts for A-Z, a-z, 0-9, some punctuation, and some awesome 8×8 patterns and graphics.
Not that it matters, but I am using the AVR ATtiny2313 and AVRStudio 4.16 with WinAVR GCC for controlling my scrolling display. I don’t have it done yet but atleast making the font file was easy with this tool.
Check out the steps in this instructable to find out how to use the Matrix Font Generator
Open the Generator File – Get Excel Setup
Download and open the “Dot_Matrix_Font_Generator.xls” file. It contains macros which means you may have trouble opening it depending on your security settings. I promise that it is safe. You will need to enable and/or allow the macros to load for this to work. If you aren’t prompted upon opening then this will we under either:
Tools>Options>Security or Tools>Macros>Security
Here’s what Microsoft says about this
For the excel functions to work you have to turn on one of the technical Add-Ins.
Go to Tools> Add-Ins and Check the “Analysis ToolPak”. This will allow the functions to do their thing. If you don’t have it installed follow Microsofts instructions here:
If you don’t have the Add-In turned on then the column total cells in row #10 will show a #NAME.
The design is pretty intuitive.
Type a 1 for an LED you want on, a 0 for those you want off. Numbers other than 1 and 0 will cause the cell to turn red which means you better fix it or you get weirdness later. You will likely see ## or #NUM in those cells if you put something other and 1 or 0 in there.
Input Letters or Patterns
Step 3Store Pattern and Clear Display
Once the pattern is input you will click the “Store Pattern & Clear Display” button. This will paste the hex values and name/comment in the next available row below. It will also clear out the display and place the cursor in the name cell. At this point you are ready to create the next character or pattern.
You can see how they stack up in the image included. You can shuffle them later if you don’t like the order.
Format C Code String
Now when you have the patterns you want to read into your C code, you click the “Format C Code String” button. This will take the raw hex values and paste them to the right with the “0x” in front of them. Then it will concatenate all of these into a string including the commented name/label you gave it separated by a “, “. It will also include the name you gave the character/pattern commented out by “//” on the end so you can identify it again later.
You will be prompted with a message box which will ask if you are doing a 5×8 font or a 8×8 pattern. A YES click will give you a 5 digit string for fonts, while a NO click will give you a 8 digit string for patterns. You will need to batch your fonts and patterns separately since you can’t do both types in one run.
See the pics for the prompt and the results
Now you can copy the cells with the formatted strings and paste them into TextPad or your compiler window.
**I kept this open source so if you don’t like the formatting you can unprotect the sheet, there’s not password. You can go play with the VBA macro and tweak it if you like.
This free embedded project also found using:
- dot matrix
- dot matrix display
- dot matrix font generator
- led matrix atmega
- dot matrix font
- attiny2313 led matrix