lcdchargen -- Custom Character Generator for HD44780 LCD Modules
----------------------------------------------------------------------------
"THE BEER-WARE LICENSE" (Revision 42):
 wrote this file. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return. Omer Kilic
----------------------------------------------------------------------------
Custom Character Generator for HD44780 (1602) LCD Modules
Use graphing paper to draw out all your sprites before using this tool to generate the code for each of them. We are mostly interested in the Pixels and Output sections of this page as the I2C controller will be used rather than connecting the LCD Character module directly to the Arudino. This requires a different library which will be provided.
Click pixels to generate output.

Pixels









Output

byte customChar[8] = {
	0b00000,
	0b00000,
	0b00000,
	0b00000,
	0b00000,
	0b00000,
	0b00000,
	0b00000
};

Arduino Pins

LCD Module Arduino Pin
RS
RW GND
Enable
D4
D5
D6
D7

Example Arduino Sketch

(LiquidCrystal library reference)
#include <LiquidCrystal.h>

// initialize the library
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
            
byte customChar[8] = {
	0b00000,
	0b00000,
	0b00000,
	0b00000,
	0b00000,
	0b00000,
	0b00000,
	0b00000
};
            
void setup()
{
  // create a new custom character
  lcd.createChar(0, customChar);
  
  // set up number of columns and rows
  lcd.begin(16, 2);

  // print the custom char to the lcd
  // why typecast? see: http://arduino.cc/forum/index.php?topic=74666.0
  lcd.write((uint8_t)0);
}

void loop()
{
  
}