CFA632 and CFA634 Custom Characters

We recently received a question about setting custom characters on our CFA632 and CFA634 modules.

The datasheet includes an example of using custom characters which looks like this:

\012\001\128\129\130\131\017\000\001\132\133\134\135
\025\000\000\000\001\003\000\031\031\031
\025\001\028\054\032\001\003\051\051\051
\025\002\014\027\049\032\032\047\032\047
\025\003\000\000\032\048\000\062\000\062
\025\004\031\031\031\000\003\001\000\000
\025\005\051\051\051\003\001\032\054\028
\025\006\047\032\047\032\032\049\027\014
\025\007\062\000\062\000\048\032\000\000

The customer wanted to know what was going on and what would the custom characters look like.

​Here is how our support engineer answered:

1. The example is in decimal rather than hexadecimal, so the lines that start with \025 are the custom character setting lines.

2.  I’m not sure why the first line was put first rather than last, but it’s showing the custom characters in action. If you have a CFA632 with the default programming, it will show the Crystalfontz logo.

\012 clears the display

\001 sets the cursor location to the top left

\0128-\131 send that custom character to the screen

\017\000\001\ sets the cursor location to the 0th column and the 1st (after 0, aka the 2nd) row

\0132-\135 send that custom character to the screen

We recommend using CFTest for getting a feeling for these modules and how the commands work. It can be found here: https://www.crystalfontz.com/product/cfautilities-cfa-lcd-utilities

3. Then the next 8 lines are setting up custom characters. Those custom characters are the ones that make the Crystalfontz logo. 

The format of those lines is the command number (\025) then the character number (e.g., \001), then the character bit map.
4. I copied the example from the datasheet and sent it using CFTest, the below photo shows the result:

Follow Up Questions

How do I make the bitmaps?

As described in the datasheet “data0-data7 are the bitmap information for this character. Any value is valid between 0 and 63. The MSB is at the left of the character cell of the row and the LSB is at the right of the character cell. data0 is at the top of the cell, data7 is at the bottom of the cell.”

Each individual character space on these modules is 6 pixels x 8 pixels (though the included font is 5×7 with a line to separate characters). data0 controls the top row of pixels, through to data7 controlling the bottom row of pixels. The values of data0data7 describe which pixels are on and which are off. Because there are 6 pixels, each with two possible states we have 2^6 = 64 possible values for each of the data bits (but remember that 0 is included, so 63 is the maximum value). If you send a 0, the entire row will be blank. Sending a 63 means all 6 pixels will be dark. This might be easier to think about in binary rather than decimal.

\b00111111 = \063 = a fully dark row (all 6 pixels in the 1 or on state)
\b00101010 = \042 = every other pixel on (first pixel on)
\b00010101 = \021 = every other pixel on (first pixel off)
\b00000000 = \000 = all pixels off

Contact Us

If you have any questions, we can be reached at support@crystalfontz.com, we also provide chat and telephone support Monday through Friday during our open hours.

We love to hear about your projects! Find us around the web (YouTubeFacebookInstagramLinkedIn,  Twitter, Forum) and let us know what you’re working on.