Author Topic: Graphic OLED bmp converter  (Read 3253 times)

tracyb

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Graphic OLED bmp converter
« on: August 26, 2015, 09:27:36 AM »
Hi all,

I have the 2.7 inch OLED part number NHD-2.7-12864UCY3

I am trying to put up a few graphics and also some text. I tried to use paint to generate a 128x64 black and white image and then saved that as a bmp. I loaded this into the novatronica oled bitmap tool to convert it to a 4069 array.

While I do see the text and the heart the quality is really bad - much worse then the screen is capable of.

What would be a better why of getting text and images onto the screen?





Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 355
  • Karma: 10
    • View Profile
Re: Graphic OLED bmp converter
« Reply #1 on: August 26, 2015, 09:56:55 AM »
Hi,

We personally use the LCDAssistant. It is freeware that converts any monochrome bmp into a hex dump which can just be copied and used into the program. The display seemed just fine when it was displaying the image from that program.

I was wondering if you could post a picture of the image you wanted to display, and how the image on the display looked. Also if possible the hexdump from the bmp tool you were using along with the subroutine to display the image.

tracyb

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: Graphic OLED bmp converter
« Reply #2 on: August 26, 2015, 10:38:31 AM »
I tried LCD assistant - however I got a whole bunch of garbage out. Values that weren't 0xFF and 0x00 on a black and white image. I used the following settings:

Byte orientation horizontal, width 128, height 64, little endianness, 2 pixels per byte.

So for a plain small black and white heart my txt dump was as follows:
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7A, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x79, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2E, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2D,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x32, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x21, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x32, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x31, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x32, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x33, 0x33, 0x2F, 0x23, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2D, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x21, 0x33, 0x7B, 0x32, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x31, 0x2F, 0x0F, 0x0A, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2C, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x32, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2C, 0x20, 0x30, 0x7B, 0x33, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x78, 0x30, 0x31, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x32, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x30, 0x2D, 0x22, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x31, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x0C, 0x08, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x78, 0x30, 0x31, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x0C, 0x08, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2C, 0x20, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x32, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x0C, 0x08, 0x30, 0x78, 0x30,
0x30, 0x2C, 0x21, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x32, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x78, 0x30, 0x31, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x32, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x31, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7A, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x0C, 0x08, 0x30,
0x78, 0x30, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x32, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x0C,
0x08, 0x31, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x22, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2D, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2E, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x79,
0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x22, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x31, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x37, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x37, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x34, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x34, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x3B, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x47, 0x43, 0x2F, 0x23, 0x33, 0x7B, 0x43,
0x37, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x3B, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x31, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x37, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x22, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x31, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x37, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x37, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x34, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x37, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x37, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x37, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x34,
0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x34, 0x2C, 0x20, 0x30, 0x78, 0x31, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x37, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x47, 0x47, 0x2F, 0x23, 0x33, 0x7B, 0x47, 0x43, 0x2F,

...
};


Which you can see will put greyscale pixels everywhere. (I have truncated it a bit)

Also quick idiot question but how do I load images here? There isn't an option to embed them in the post..

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 355
  • Karma: 10
    • View Profile
Re: Graphic OLED bmp converter
« Reply #3 on: August 27, 2015, 10:18:08 AM »
One way of doing this is converting a hexdump with LCD Assistant with the following settings:
Horizontal Byte Orientation
Little Endian
8pixels/byte

The variables I pass to the function are:
*img = points to image hexdump array
a = column start
b = column end
c = row start
d = row end

Code: [Select]
void Show(unsigned char *img, unsigned char a, unsigned char b, unsigned char c, unsigned char d) {
 
  unsigned char    *src, temp, result;  // Source Pointer, Temp Value, Result after masking
  unsigned char i, j;                   //Variables for loops
  int cnt = 0;                          //Counter for array
  column(a, (b/2));                     //Column Set
  row(c, d);                            //Row Set
  src = img;

 /****************DISPLAY LOOP*******************************/
  for (i = 0; i <= d; i++)   // monochrome image only, no grayscale so pixels are on or off.
  {
    for (j = 0; j <= (b/8); j++)
    {
      temp = *src;
      result = temp & 0xC0; // Mask for 2 MSB
      if( result == 0xC0 ) {data(0xFF);}
      else if ( result == 0x80 ) {data(0xF0);}
      else if ( result == 0x40 ) {data(0x0F);}
      else data(0x00);

      result = temp & 0x30; // mask for next 2 bits
      if ( result == 0x30 ) {data(0xFF);}
      else if( result == 0x20 ){ data(0xF0);}
      else if( result == 0x10 ){ data(0x0F);}
      else data(0x00);

      result = temp & 0x0C; //mask for bits 3&4
      if ( result == 0x0C) {data(0xFF);}
      else if( result == 0x08 ) {data (0xF0);}
      else if( result == 0x04 ) {data (0x0F);}
      else data(0x00);

      result = temp & 0x03;
      if( result == 0x03 ) {data(0xFF);}
      else if( result == 0x02) {data(0xF0);}
      else if( result == 0x01) {data(0x0F);}
      else data(0x00);
      src++;     
    }
  }
}

 

16x2 OLED NHD-0216KZW-AY5 Intermittent, and perament vertical dots Brightness

Started by BenB2013Board OLEDs

Replies: 4
Views: 4660
Last post October 23, 2014, 04:55:27 PM
by BenB2013
Display current of 128x64 yellow OLED (2.7-12864UMY3) really 175mA?

Started by flywheelBoard OLEDs

Replies: 1
Views: 3396
Last post June 30, 2014, 04:48:12 PM
by Michael_L
Wiring between NHD-1.5128128ASC3ND OLED Display and NHDev 2.10 Development Board

Started by vcp88Board OLEDs

Replies: 1
Views: 2081
Last post June 07, 2016, 08:20:38 AM
by Saurabh_B
NHD-0420DZW-AG5 OLED character module--Displaying junk data

Started by control3Board OLEDs

Replies: 2
Views: 1129
Last post December 11, 2016, 11:19:54 PM
by control3
Korean Hex GB code for OLED multi font display NHD-2.7-12864UMY3

Started by newhavenuserBoard OLEDs

Replies: 0
Views: 665
Last post May 05, 2017, 01:17:45 PM
by newhavenuser