HC12 Build you’r own Character

Using code from the manufacturer Axiom and several data sheets to figure out what they are talking about I finally found how to send your own character to the CGRAM (Character Generator RAM).

This applies to the CML-9S12DP256 from Axiom with the add on LCD module (Fema CM204P-SGR1) running on a SPLC780D controller.

Really the application is quite simple all you need to do is send a command for the address of a CGRAM location.

Then send a string of characters to the string that describe the character that you want to generate.

Character Hex Array
Each character has 5bits across starting from the right and 8 rows down.
or from Left to Right, Top to Bottom

0bXXXXX
0bXXXXX
0bXXXXX
0bXXXXX
0bXXXXX
0bXXXXX
0bXXXXX
0bXXXXX

Additional Characters

char alien[] = {0x16,0x0F,0x05,0x07,0x07,0x05,0x0F,0x16,'\0'};
SendCommand(0x40 /* +8 per Character */);
SendString(alien);
 
SendCommand(0x80)
SendCharacter(0x00 /* +1 per Character */);

Leave a Reply