BMP to LCD 128x64 Converter for ST7565
This is a quick tutorial to show you how you can create a great graphic "Splash Screen" for the ST7565 Graphic LCD Display
When we added these screens to our product lineup we trawled the internet to find a program to convert a 2 colour BMP file into the hex character array that can be used in a program to display the graphic. Whilst there are a few programs out there (free and commercial) we could not find any that created the hex characters in the correct format. Many created each block of 8x8 pixels upside down.
So, as we could not find such a program, we wrote one using Visual Basic Studio 2010. It's nothing fancy, but it does the job, and is called simply BMP-LCD (not to be confused with the dos program BMP2LCD). And its FREE!
You can download it here
It requires no installation, just extract it from the zip file, store it somewhere, and run it.
Firstly, before you can convert a bmp you need to create one. The BMP-LCD program doesn't do this, you will need to create a file in your own graphics program. The file should be 128 pixels by 64 pixels and 2 colours (black and white) only.
Once you have created your grahic file, run the BMP-LCD program.
Here is the main screen. There are no menus just 2 buttons, one to load up a graphics file, and the other to generate the output
Click on the Load Graphic button, and load up your bmp graphics file. Here is the one we created. It is shown at 3x actual size.
Then press the Generate button to create the output in a separate window
There should be 8 sections (they dont need to be split up, its just easier to check).
So, what to do with this data? Well, assuming you are using the Aduino Library for the ST7565 display from Adafruit, the default Adafruit splash screen is stored in the Library file called ST7565.cpp
Load this file into a text editor and scroll down until you see the hex codes for their logo. It starts with
// the memory buffer for the LCD
uint8_t st7565_buffer[1024] = {
Simply replace their hex codes with the newly generated ones and save the file.
Next, compile the example Arduino sketch for the LCD and upload to see your nice graphic displayed
Enjoy