• EUR€
  • £GBP
  • $USD

How to use the LCD4884 to display a picture-Part two

DFRobot Nov 13 2012 486
To continue the Part one. Please download the Arduino library for LCD4884 shield from the product page.
Step4: Use the ‘LCDAssistant.exe’ to obtain the hexadecimal data arrays of the Monochrome Bitmap Image.
LCD Assistant is a free tool for converting monochromatic bitmaps to data arrays for easy use with programs for embedded systems with microcontrollers and graphics monochromatic LCD displays like a T6963C, KS0108, and SED1335 etc. You can use it directly with Arduino, mbed and any other design environment based on C compiler. If you want to see more information about LCD Assistant, you can visit the website? “https://en.radzio.dxp.pl/bitmap_converter/”.
1.Click the icon of LCDAssistant.exe to open the software.
2.Open the image that you want to convert.
Click File——>Load image
3.Set the mapping mode of the image.
4.Obtain the hexadecimal data format of the image.
Click File——>Save output
5.Open the .txt file to see the hexadecimal data.

Now we can see the detail information of the hexadecimal data arrays and there are 420 hexadecimal numbers. (70*48/6=420) We can use these numbers in the next step to display the image on our LCD4884 shield.

Step5: Display the image on the Graphic LCD4884 Shield
Before we start this step, you have to make sure that you have got prepared with the following things: You can download the source program to your Arduino board directly to see the effect of the program.
1.Write an Arduino program to realize the display function.
Before writing the program, you should add the new “LCD4884 Library "to your Arduino Library.

3.Copy all the hexadecimal numbers in BL_SNOOPY7048 [ ] array to the BUILDBMP [ ] array.
4.Call the “LCD_draw_bmp_pixel( )”function to map the image and use the funtion variables to set the position of the image on the screen.(If you want to know more details about this part, you can take a reference to the Adendum_ Part?).

P.S. We can also modify our Source Program to make the image shift on the screen (Sketch_LCD4884_BMPDisplay_Shift)

Part?. A quick look at the PCD544
PCD544 is a 48 * 84 pixels matrix LCD controller/driver. ?. Main Features ? Single chip LCD controller/driver ? 48 row, 84 column outputs ? Display data RAM 48*84 bits ?Address Counter (AC) The address counter assigns addresses to the display data RAM for writing. The X-address X83 to X0 and the Y-address Y5 to Y0 are set separately. After a write operation, the address counter is automatically incremented by 1(This increment is according to the V flag. We do not need to pay attention to V flag.) ?Display Data RAM (DDRAM) The DDRAM is 48*84 bits static RAM which stores the display data. The RAM is divided into six banks of 84 bytes (6*8*84 bits). During RAM access, data is transferred to the RAM through the serial interface. ?. Addressing ? Data is downloaded in bytes into the 48 by 84 bits RAM data display matrix of PCD8544. ? The columns are addressed by the address pointer. The address ranges are: X 0 to 83 (1010011), Y 0 to 5 (101). Addresses outside these ranges are not allowed. This is why we should set the horizontal value is less than 84 and the vertical value is less than 48.

Part?. LCD_draw_bmp_pixel( )
In the Library LCD4884, we use a function called LCD_draw_bmp_pixel( ) to map the monochrome bitmap image. The following is the definition of the function:

If you are not interested in this definition of function, it does not matter. This function just helps us know how the progress of BMP mapping is conducted. This progress uses a pointer to traverse every pixel and read all the hexadecimal data of your BMP image. The LCD_draw_bmp_pixel( ) function has five variables.

Before we start to set the value of the five function variables, we need to do a simple operation. Assume that the pixel size of your image is H*V and H equals to the horizontal pixel value while V equals to the vertical pixel value.

After considering the qualifications mentioned above, now we can set the value of the function variables for” LCD_draw_bmp_pixel( )”.