{"id":180,"date":"2012-07-09T14:47:37","date_gmt":"2012-07-09T14:47:37","guid":{"rendered":"http:\/\/bitmap2lcd.com\/blog\/?p=180"},"modified":"2012-07-25T05:45:59","modified_gmt":"2012-07-25T05:45:59","slug":"grayscale-glcd-16-gray-levels-basics","status":"publish","type":"post","link":"https:\/\/bitmap2lcd.com\/blog\/grayscale-glcd-16-gray-levels-basics\/","title":{"rendered":"Grayscale GLCD >> 16 gray levels basics"},"content":{"rendered":"<p><strong>Bitmap2LCD<\/strong> is a universal programming tool for converting bitmaps\/images to GLCD for most graphic LCD controllers.<\/p>\n<p>This software tool can be used for\u00a0programming\u00a0embedded systems\u00a0connected to a <strong>Grayscale Small Graphic LCD<\/strong> ( OLED ) with a built-in COG LCD controller\u00a0similar to\u00a0the\u00a0ST7528.<\/p>\n<p>For a start,\u00a0here&#8217;s a short article about 4bpp grayscale (4-bits per pixel ) for displaying 16 levels of gray.<\/p>\n<p>The values from 0\u00a0\u00a0through 15 decimal (00 to 0F hex)\u00a0correspond to lightest (white) through\u00a0darkest (black) as shown in the representation below.<\/p>\n<p><a href=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/07\/grayscale-16-levels.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-181\" title=\"grayscale 16 levels\" src=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/07\/grayscale-16-levels.jpg\" alt=\"\" width=\"232\" height=\"473\" srcset=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/07\/grayscale-16-levels.jpg 232w, https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/07\/grayscale-16-levels-147x300.jpg 147w\" sizes=\"auto, (max-width: 232px) 100vw, 232px\" \/><\/a><\/p>\n<p>A single byte in the DDRAM can be used to store 2 pixels of information.<\/p>\n<p>When\u00a0using\u00a0a module with an on glass\u00a0ST7528 LCD controller, in the source code data byte, the first pixel data comes after the second pixel data :\u00a0 22221111<\/p>\n<p>With bitmap2LCD [<span style=\"color: #999999;\">from v2.0 upwards<\/span>] you can set\u00a0ON the automatic\u00a0pixel data nibble swapping, for a correct ordering in the source code output.<\/p>\n<p>&nbsp;<\/p>\n\t<div class=\"quickshare-container\">\r\n\t<ul class=\"quickshare-genericons quickshare-effect-round quickshare-effect-expand quickshare-small\">\r\n\t\t<li class=\"quickshare-share\"><\/li> \r\n\t\t<li><a href=\"https:\/\/facebook.com\/sharer.php?u=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fgrayscale-glcd-16-gray-levels-basics%2F&amp;t=Grayscale+GLCD+%3E%3E+16+gray+levels+basics+<+Bitmap2LCD+Software+Tool+Blog+%3A%3A+about+GLCD+displays+and+Programming\" target=\"_blank\" title=\"Share on Facebook\"><span class=\"quickshare-facebook\">Facebook<\/span><\/a><\/li>\t\t<li><a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fgrayscale-glcd-16-gray-levels-basics%2F&amp;text=Grayscale+GLCD+%3E%3E+16+gray+levels+basics+<+Bitmap2LCD+Software+Tool+Blog+%3A%3A+about+GLCD+displays+and+Programming\" target=\"_blank\" title=\"Share on Twitter\"><span class=\"quickshare-twitter\">Twitter<\/span><\/a><\/li>\t\t<li><a href=\"http:\/\/pinterest.com\/pin\/create\/button\/?url=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fgrayscale-glcd-16-gray-levels-basics%2F&amp;media=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fwp-content%2Fuploads%2F2012%2F07%2Fgrayscale-16-levels-147x300.jpg&amp;description=Bitmap2LCD+is+a+universal+programming+tool+for+converting+bitmaps%2Fimages+to+GLCD+for+most+graphic+LCD+controllers.+This+software+tool+can+be+used+for%C2%A0programming%C2%A0embedded+systems%C2%A0connected+to+a+Grayscale+Small+Graphic+LCD+%28+OLED+%29+with+a+built-in+COG+LCD+controller%C2%A0similar+to%C2%A0the%C2%A0ST7528.%26hellip%3B\" target=\"_blank\" title=\"Share on Pinterest\"><span class=\"quickshare-pinterest\">Pinterest<\/span><\/a><\/li>\t\t<li><a href=\"http:\/\/linkedin.com\/shareArticle?mini=true&amp;url=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fgrayscale-glcd-16-gray-levels-basics%2F&amp;title=Grayscale+GLCD+%3E%3E+16+gray+levels+basics&amp;source=Bitmap2LCD+Software+Tool+Blog+%3A%3A+about+GLCD+displays+and+Programming&amp;summary=Bitmap2LCD+is+a+universal+programming+tool+for+converting+bitmaps%2Fimages+to+GLCD+for+most+graphic+LCD+controllers.+This+software+tool+can+be+used+for%C2%A0programming%C2%A0embedded+systems%C2%A0connected+to+a+Grayscale+Small+Graphic+LCD+%28+OLED+%29+with+a+built-in+COG+LCD+controller%C2%A0similar+to%C2%A0the%C2%A0ST7528.%26hellip%3B\" title=\"Share on Linkedin\" target=\"_blank\"><span class=\"quickshare-linkedin\">Linkedin<\/span><\/a><\/li>\t\t<li><a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fgrayscale-glcd-16-gray-levels-basics%2F\" target=\"_blank\" title=\"Share on Google+\"><span class=\"quickshare-googleplus\">Google+<\/span><\/a><\/li>\t\t\t\t\t\t\t\t<li><a href=\"mailto:?subject=Bitmap2LCD+Software+Tool+Blog+%3A%3A+about+GLCD+displays+and+Programming:+Grayscale+GLCD+%3E%3E+16+gray+levels+basics&amp;body=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fgrayscale-glcd-16-gray-levels-basics%2F\" target=\"_blank\" title=\"Share via Email\"><span class=\"quickshare-email\">Email<\/span><\/a><\/li>\t<\/ul>\r\n\t<\/div>\r\n","protected":false},"excerpt":{"rendered":"<p>Bitmap2LCD is a universal programming tool for converting bitmaps\/images to GLCD for most graphic LCD controllers. This software tool can be used for\u00a0programming\u00a0embedded systems\u00a0connected to a Grayscale Small Graphic LCD ( OLED ) with a built-in COG LCD controller\u00a0similar to\u00a0the\u00a0ST7528. For a start,\u00a0here&#8217;s a short article about 4bpp grayscale (4-bits per pixel ) for displaying [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[81],"tags":[15,88,87,56,83,82,86,33,84,85,63,90,89,80],"class_list":["post-180","post","type-post","status-publish","format-standard","hentry","category-grayscale-glcd","tag-16-gray-levels","tag-array","tag-dot-matrix","tag-glcd","tag-gray","tag-grey","tag-grey-shades","tag-lcd-controller","tag-level","tag-oled","tag-pixel","tag-shades-od-gray","tag-shades-of-grey","tag-st7528"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/posts\/180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/comments?post=180"}],"version-history":[{"count":14,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/posts\/180\/revisions"}],"predecessor-version":[{"id":194,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/posts\/180\/revisions\/194"}],"wp:attachment":[{"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/media?parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/categories?post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/tags?post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}