Author Archives: Bernie

Generate a One Line Array per Char Font

 

Generate a One Line Array per Char Font (with bitmap2LCD)

( from Version 3.8G build 8 )

1. Enter Font Script Mode

2. Select the chars, here from 0 to 9 ( green arrow )

3. Shift the whole Font up to eliminate white pixel lines ( blue arrow )

4. Specify Max Height in the Parameters ( red arrow )

-> This example is for horizontal data direction, see the bar with buttons with arrows on screenshot below !

5. Set One Line Array Parameter to True ( purple arrow )

6. Click Export Font To data button

 

In the output file, data array for each char takes one single line ( orange arrow )

( in this example, it is a 16 bit data array format )

Bitmap2LCD : Reference Graphics for Color Palettes

Bitmap2LCD : Reference Graphics for Color Palettes

 

256 colors ( 8bpp )

4096 colors ( 12bpp )

(262k) 262144 colors ( 18 bpp )

(16 Million) 16777216 Colors ( 24 bpp )

 

Bitmap2LCD : Working with Custom Color Palettes

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

Working with Custom Color Palettes

From V3.8e , the above functions have been moved to the COLOR PALETTE tab , Main Menu

In the Output + Settings / Main menu, for the color mode range going from 256 to 262k Colors you can load a Custom Color Palette by loading a graphic file (BMP/JPG/PNG) that contains the exact number of reference colors, for example 256 Colors for the Custom 256 colors Palette.

The “Custom Color Palette” will override the “Default Color Palette” in a particular project other than Default.LCD (see below about projects)

To load a custom color palette, just create/switch to a project different than Default.LCD and switch to the correct color mode (for example 256 colors), then click on the “Load a custom Color Palette” item in the Output + Settings main menu (blue arrow). The Color Palette of the Reference Graphic will then be loaded.

Bitmap2LCD custom color palette

The next line in the main menu, below the blue arrow will show you if the Default or the Custom Color Palette has been loaded.

To delete a Custom Color Palette, delete the project name, for example, MyProject.LCD

About Projects in Bitmap2LCD

In the File Explorer  >>

List the projects (red arrow)

Name of the current active project (blue arrow) >> NewProject.LCD

Below the List of Projects ( each project is a set of many possible settings )

A Red Star indicates the active project name

Use Right Mouse Click or local menu to act on projects.

Export RGB Color Palettes to Text File or to a Look up Table [LUT]

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

Export RGB Color Palettes to Text File or to a Look up Table [LUT]

From V3.8e , the above function has been moved to the COLOR PALETTE tab , Main Menu

 

( From V3.2e Build 4 to V3.8d )

In the Output + Settings main menu, in the 256, 4096, 65536 and 262k Colors mode you can export the default or custom Color Palette to a text file. ( RGB 24bit Color Hex codes )

The exported file will be saved in the project output files folder

bitmap2lcd-export-rgb-palette

The prefix of the RGB 24bit Color Hex codes can be defined in the settings ( data Syntax Tab )

Bitmap2LCD Export Color Palette 2

Work Canvas Export Settings

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

Work Canvas Export Settings

Update V3.8a

From V3.8a, the parameters (blue arrow) located inside the right panel of the Work Canvas ( hide/ show > red arrow ) are editable.

The Export To Data Settings are the same as those located on the Configuration Settings Windows. (purple arrow)

Note : Some of these settings are also valid for the Fonts Generator !

You can change the export settings from there (blue) . Their value will be copied to the Configuration Settings Windows (purple)

If changes are made in the Configuration Settings Windows, the values might be refreshed (Refresh Values from Settings > green) on the Work Canvas Panel

bitmap2lcd-wk-settings

Data Export Settings Examples

  • Hex Data Bytes without Prefix (a) nor Suffix, (b)  Without spaces nor separator between them

bitmap2lcd-wk-settings_2

  • Intel Hex Data Output Format (File.hex)

bitmap2lcd-wk-settings_3

  • Binary File Format (File.bin)

bitmap2lcd-wk-settings_4

  • Format  = 0X Hex data / separator = , / End of Line = ;  / 4 bytes per line

bitmap2lcd-wk-settings_5

  • Format  = Prefix (a) + Hex data + Suffix (b) / separator = , / End of Line = ;  / 6 bytes per line / Data lines Prefix = DATA

bitmap2lcd-wk-settings_6

 

Search And Replace

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

Search And Replace Text searchandrepl

Bitmap2lcd includes a Search and Replace functionality.

In the Graphic Preview and Editors Window , click on S+R (orange arrow) and a programming grid appears next to the Auxiliary Editor.

  • In the S+R grid, you can define the character string to search (blue) inside the text editor, and define the character string that will replace it (red)
  • The columns Function and Condition2 are not yet implemented (V3.7f)

bitmap2lcd-search-and-replace_1

  • You can immediately apply the search and replace scan to the content of the Main Editor (purple arrow) or to the content of the Aux Editor

bitmap2lcd-search-and-replace_2

  • The Search And Replace Program can automatically be run after all exports by checking the Run Search And Replace Grid checkbox of the data export dialog (green).

bitmap2lcd-search-and-replace_3

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]

 

Bitmap2LCD : Touch Panel / Touch Screen Features Update

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

update V3.7f

Bitmap2LCD : Touch Panel / Touch Screen Features Update

bitmap2lcd-touch-menu

Touch panel settings  settings_touch

bitmap2lcd Touch Panel Settings

  • The current Work Canvas image can be defined as Background  (Green Arrow)

bitmap2lcd-touch-menu_3

bitmap2lcd-touch-background-image

  • Enter Touch Panel / Touch panel Screen Mode

bitmap2lcd-touch-menu_2

bitmap2lcd-touch-make-region

To trace Touch panel regions inside the work canvas, after entering in the touch panel script or by opening the TSC file  ( Work canvas outline becomes light blue ) use the mouse inside the work canvas in a similar way to the area selection tool.

Trace the region and when ok, click on the convert to region button (green Arrow)

Theses regions can be moved or resized afterwards.

bitmap2lcd-touch-menu_4

  • Export the GLCD Touch Regions according to the defined settings

bitmap2lcd-touch-regions-data

  • Quit Touch Panel Mode  exiz