Getting Started > Basic Settings

Bitmap2LCD is a tool for programming small Graphic LCDs in embedded systems and a programmable text processing tool.

update V3.7f

 

Presentation of Bitmap2LCD (Youtube)

Getting Started > Basic Settings

  •  In the Output+Settings Main menu, choose one of the the monochrome, grayscale or color depth formats (green frame and arrow)
  • Choose one of the the byte / word output widths : 8, 16 or 32 bit or Intel Hex file output in case of data generated inside the text editor (and text file) or the Binary File Output (output generated in the Hex editor)  (blue arrow)
  • Also Select the endianness, if the most significant bit is left or right in the data output. (red arrow)

bitmap2lcd-basic-settings_1

  • Define the Work Canvas  Size corresponding to the Dot Matrix Size of your Graphic LCD  work-canvas2
  • If the required size is not listed in the Menu ( Width x Height ) use the Define Custom Size item. (purple arrow)

Note : In case of a monochrome GLCD for example, the height or the width might be a multiple of 8 ! It depends of the GLCD : Read the Data Sheet of  the GLCD controller and check the structure and data direction of the pixels in the DDRAM

bitmap2lcd-basic-settings_2

  • Open the Configuration Settings Panel (orange arrow)
  • Define the Data Syntax Parameters and Data output File Extension (red arrow)
  • Define the data direction of the pixels in the Ram of your LCD controller  (blue arrow)

bitmap2lcd-basic-settings_3

  • Change the Output File Header syntax  (green arrow)

bitmap2lcd-basic-settings_4

  • The Output File Header (Blue arrow) is a text file that is optionally copied to the top of the Text Editor when a data array is generated.
  • Edit the Header, then save and Quit the Header Editor (purple arrow)

Note : the words with the [&xxxxx]  syntax are optional script components that are replaced by values by the software. See details at the end of this article

bitmap2lcd-basic-settings_5

  • Export to Data Array to check your settings Start

bitmap2lcd-basic-settings_6

  • Check Data Array Syntax and Format in the Text Editor

bitmap2lcd-basic-settings_7

  • Set a few pixels (orange) with drawing tool (blue) inside the Work Canvas to check the pixels in the Data output

bitmap2lcd-basic-settings_8

  • Data of the 8 black pixels (orange) generated according to the selected data direction (red) This example is in monochrome mode (8 pixels per byte)

bitmap2lcd-basic-settings_9

Script Components

The script components [&***] can be included only once and will be replaced by the data or value when the data array is generated. Not needed script components can be deleted.

[&NAME]

The [$NAME] and the image size and position are optional and can be placed optionally anywhere in the header.

[&SIZE]

Same for Size of Data

[&TRUEORG]

This is the script component if present in the file, to indicate that you want to have the XPOS and YPOS origins of a reduced dynamic table of constants ( a part of the display you want to change ) given from the X0,Y0 corner you selected in the table translation manager window.

[&XPOS]

[&YPOS]

[&WIDTH]

[&HEIGHT]

The corner position on the Work Canvas and the size of the converted graphic area can be exported into the file.

There are more script components, for the font generation and the data compression. See the above default header script.

 

//** Please edit this header to fit
//** with your compiler
//** use above buttons and then close/save
//** this code (auto-saved)
//** with the above save header editor button !

//** Edit the blue code and use variable where needed !
//** [&??] are the variables, they are case sensitive !

//** Settings for Images and Fonts Data !

#include <avr/pgmspace.h>

const uint8_t [&NAME][] PROGMEM = {
[&TRUEORG]

[&XPOS],
[&YPOS],
[&WIDTH],
[&HEIGHT],
//** These are the X and Y position
//** and the Width and Height of an
//** exported graphic

//** for image conversion with data compression
[&COMPRESSION]
const uint8_t [&CNAME][&CSIZE] PROGMEM = {

[&FONT INCLUDE]
/* // Structured Font Output Include
typedef struct {
long int code;
const tImage *image;
} tChar;
typedef struct {
int length;
const tChar *chars;
} tFont;
*/
[&/FONT INCLUDE]

[&FONT BITMAPS]
const uint8_t [&FNAME][&FNUMBEROFCHARS][&FBYTESPERCHAR] PROGMEM = {

[&FONT DESCRIPTORS]
const uint8_t [&DNAME][][2] PROGMEM = {

[&FONT END]

 

Leave a Reply

Your email address will not be published. Required fields are marked *